diff --git a/.gitignore b/.gitignore index a705a35f8b..92f64ba492 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,6 @@ release /test-results/ /playwright-report/ /playwright/.cache/ -.nx/ \ No newline at end of file +.env +*.pem +.nx/ diff --git a/.vscode/settings.json b/.vscode/settings.json index 8786fe0f0e..7469bd1c70 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,5 +13,10 @@ "typescript.tsdk": "node_modules/typescript/lib", "[xml]": { "editor.defaultFormatter": "redhat.vscode-xml" + }, + "scm.defaultViewMode": "tree", + "search.defaultViewMode": "tree", + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" } } diff --git a/docs/package.json b/docs/package.json index a6c69910c5..b380fb13c5 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "docs", - "version": "0.26.0", + "version": "0.30.0", "private": true, "scripts": { "dev": "next dev", diff --git a/docs/pages/docs/_meta.json b/docs/pages/docs/_meta.json index 6be6575dc1..bd0c28d03d 100644 --- a/docs/pages/docs/_meta.json +++ b/docs/pages/docs/_meta.json @@ -8,6 +8,7 @@ "custom-schemas": "Custom Schemas", "collaboration": "Collaboration", "advanced": "Advanced", + "ai": "AI", "discord-link": { "title": "Community ↗", "href": "https://discord.gg/Qc2QTTH5dF", diff --git a/docs/pages/docs/ai.mdx b/docs/pages/docs/ai.mdx new file mode 100644 index 0000000000..d997c378a3 --- /dev/null +++ b/docs/pages/docs/ai.mdx @@ -0,0 +1,43 @@ +--- +title: AI Rich Text Editing +description: Add AI functionality to your BlockNote rich text editor +imageTitle: BlockNote AI +path: /docs/ai +--- + +import { Example } from "@/components/example"; +import { Callout } from "nextra/components"; + +# BlockNote AI integration + +With BlockNote AI, you can add AI functionality to your rich text editor. +Users can work with an AI agent to edit, write and format their documents. + +[VIDEO] + +- Try the [basic AI demo](/examples/ai/minimal) +- ..or try different models in the [AI playground](/examples/ai/playground) +- [Setup documentation](/docs/ai/getting-started) +- TODO + +## Features + +BlockNote AI has been designed to be fully customizable. +BlockNote shows exactly what the AI agent is doing - making it easy for users to +work hand in hand with AI agents. + +- Customize commands to write new content or update existing content or formatting +- Streaming support for quick feedback +- Users can accept or reject AI suggestions +- Connect any LLM model (from Llama to OpenAI, Mistral or Anthropic) +- Customizable prompts +- Built directly on the [Vercel AI SDK](https://sdk.vercel.ai) +- No dependency on our backend - use your own infrastructure or connect directly to a hosted LLM API +- Feature requests? [Get in touch](/about). + + + This feature is provided by the `@blocknote/xl-ai`. `xl-` packages are fully + open source, but released under a copyleft license. A commercial license for + usage in closed source, proprietary products comes as part of the [Business + subscription](/pricing). + diff --git a/docs/pages/docs/ai/_meta.json b/docs/pages/docs/ai/_meta.json new file mode 100644 index 0000000000..0c8ffe7a4c --- /dev/null +++ b/docs/pages/docs/ai/_meta.json @@ -0,0 +1,5 @@ +{ + "setup": "Editor Setup", + "custom-commands": "Customizing Commands", + "reference": "Reference" +} diff --git a/docs/pages/docs/ai/custom-commands.mdx b/docs/pages/docs/ai/custom-commands.mdx new file mode 100644 index 0000000000..f4dc8f417e --- /dev/null +++ b/docs/pages/docs/ai/custom-commands.mdx @@ -0,0 +1,111 @@ +# Customizing AI Menu Items (commands) + +A central part when users are interacting with the AI agent is the _AI Suggestion Menu_ where users can enter a custom prompt or select a pre-defined command. + +- TODO: add image + +This menu is easy to customize so you can expose commands fine-tuned to your application. + +## Defining your own commands + +First, we define a new AI command, let's create one that makes selected text more casual + +```tsx +import { AIMenuSuggestionItem, getAIExtension } from "@blocknote/xl-ai"; + +// Custom item to make the text more informal. +export const makeInformal = ( + editor: BlockNoteEditor, +): AIMenuSuggestionItem => ({ + key: "make_informal", + title: "Make Informal", + aliases: ["informal", "make informal", "casual"], + icon: , + onItemClick: async () => { + await getAIExtension(editor).callLLM({ + // The prompt to send to the LLM: + userPrompt: "Give the selected text a more informal (casual) tone", + // Tell the LLM to specifically use the selected content as context (instead of the whole document) + useSelection: true, + // We only want the LLM to update selected text, not to add / delete blocks + defaultStreamTools: { + add: false, + delete: false, + update: true, + }, + }); + }, + size: "small", +}); +``` + +Now, we let's create a customized AI Menu to show this command when the user has selected some text and opened the AI menu: + +```tsx +import { AIMenu, getDefaultAIMenuItems } from "@blocknote/xl-ai"; + +function CustomAIMenu() { + return ( + , + aiResponseStatus: + | "user-input" + | "thinking" + | "ai-writing" + | "error" + | "user-reviewing" + | "closed", + ) => { + if (aiResponseStatus === "user-input") { + if (editor.getSelection()) { + // When a selection is active (so when the AI Menu is opened via the Formatting Toolbar), + // we add our `makeInformal` command to the default items. + return [ + ...getDefaultAIMenuItems(editor, aiResponseStatus), + makeInformal(editor), + ]; + } else { + return getDefaultAIMenuItems(editor, aiResponseStatus); + } + } + + // for other states, return the default items + return getDefaultAIMenuItems(editor, aiResponseStatus); + }} + /> + ); +} +``` + +Now, let's use this custom AI Menu in our app: + +````tsx + + {/* Creates a new AIMenu with the default items, as well as our custom + ones. */} + + + {/* ...other UI Elements... */} + + + +``` + +# Full example + +Have a look at the full example below, where we also add an AI menu item when no selection is open +(e.g., when the editor is opened by typing `/ai` in the editor). + + + +# Reference + +So far, we've added basic commands to the editor, but it's possible to completely customize low level prompts sent to the LLM. +To learn in detail about the methods available such as `callLLM`, continue to the [AI reference docs](/docs/ai/reference). + +```` diff --git a/docs/pages/docs/ai/reference.mdx b/docs/pages/docs/ai/reference.mdx new file mode 100644 index 0000000000..207703dbb0 --- /dev/null +++ b/docs/pages/docs/ai/reference.mdx @@ -0,0 +1,212 @@ +# BlockNote AI Reference + +## `createAIExtension` + +Use `createAIExtension` to create a new AI new AI Extension that can be registered to an editor when calling `useCreateBlockNote`. + +```typescript +// Usage: +const aiExtension = createAIExtension(opts: AIExtensionOptions); + +// Definition: +type AIExtensionOptions = { + /** + * The default language model to use for LLM calls + */ + model: LanguageModel; + /** + * Whether to stream the LLM response (not all models might support this) + * @default true + */ + stream?: boolean; + /** + * The default data format to use for LLM calls + * "html" is recommended, the other formats are experimental + * @default html + */ + dataFormat?: "html" | "json" | "markdown"; + /** + * A function that can be used to customize the prompt sent to the LLM + * @default undefined + */ + promptBuilder?: PromptBuilder; + /** + * The name and color of the agent cursor when the AI is writing + * + * @default { name: "AI", color: "#8bc6ff" } + */ + agentCursor?: { name: string; color: string }; +}; +``` + +## `getAIExtension` + +Use `getAIExtension` to retrieve the AI extension instance registered to the editor: + +```typescript +getAIExtension(editor: BlockNoteEditor): AIExtension; +``` + +## `AIExtension` + +The `AIExtension` class is the main class for the AI extension. It exposes state and methods to interact with BlockNote's AI features. + +```typescript +class AIExtension { + /** + * Execute a call to an LLM and apply the result to the editor + */ + callLLM(opts: CallSpecificCallLLMOptions): Promise; + /** + * Returns a read-only zustand store with the state of the AI Menu + */ + get store(): ReadonlyStoreApi<{ + aiMenuState: + | { + blockId: string; + status: + | "user-input" + | "thinking" + | "ai-writing" + | "error" + | "user-reviewing"; + } + | "closed"; + }>; + /** + * Returns a zustand store with the global configuration of the AI Extension, + * these options are used as default across all LLM calls when calling {@link callLLM} + */ + readonly options: StoreApi<{ + model: LanguageModel; + dataFormat: "html" | "json" | "markdown"; + stream: boolean; + promptBuilder?: PromptBuilder; + }>; + + /** + * Open the AI menu at a specific block + */ + openAIMenuAtBlock(blockID: string): void; + /** + * Close the AI menu + */ + closeAIMenu(): void; + /** + * Accept the changes made by the LLM + */ + acceptChanges(): void; + /** + * Reject the changes made by the LLM + */ + rejectChanges(): void; + /** + * Update the status of a call to an LLM + * + * @warning This method should usually only be used for advanced use-cases + * if you want to implement how an LLM call is executed. Usually, you should + * use {@link callLLM} instead which will handle the status updates for you. + */ + setAIResponseStatus( + status: + | "user-input" + | "thinking" + | "ai-writing" + | "error" + | "user-reviewing", + ): void; +} +``` + +## `callLLM` + +```typescript +type CallLLMOptions = { + /** + * The language model to use for the LLM call (AI SDK) + */ + model: LanguageModelV1; + /** + * The user prompt to use for the LLM call + */ + userPrompt: string; + /** + * The `PromptBuilder` to use for the LLM call + * + * (A PromptBuilder is a function that takes a BlockNoteEditor and details about the user's prompt + * and turns it into an AI SDK `CoreMessage` array to be passed to the LLM) + * + * @default provided by the format (e.g. `llm.html.defaultPromptBuilder`) + */ + promptBuilder?: PromptBuilder; + /** + * The maximum number of retries for the LLM call + * + * @default 2 + */ + maxRetries?: number; + /** + * Whether to use the editor selection for the LLM call + * + * @default true + */ + useSelection?: boolean; + /** + * Defines whether the LLM can add, update, or delete blocks + * + * @default { add: true, update: true, delete: true } + */ + defaultStreamTools?: { + /** Enable the add tool (default: true) */ + add?: boolean; + /** Enable the update tool (default: true) */ + update?: boolean; + /** Enable the delete tool (default: true) */ + delete?: boolean; + }; + /** + * Whether to stream the LLM response or not + * + * When streaming, we use the AI SDK `streamObject` function, + * otherwise, we use the AI SDK `generateObject` function. + * + * @default true + */ + stream?: boolean; + /** + * If the user's cursor is in an empty paragraph, automatically delete it when the AI + * is starting to write. + * + * (This is used when a user starts typing `/ai` in an empty block) + * + * @default true + */ + deleteEmptyCursorBlock?: boolean; + /** + * Callback when a specific block is updated by the LLM + * + * (used by `AIExtension` to update the `AIMenu` position) + */ + onBlockUpdate?: (blockId: string) => void; + /** + * Callback when the AI Agent starts writing + */ + onStart?: () => void; + /** + * Whether to add delays between text update operations, to make the AI simulate a human typing + * + * @default true + */ + withDelays?: boolean; + /** + * Additional options to pass to the `generateObject` function + * (only used when `stream` is `false`) + */ + _generateObjectOptions?: Partial>[0]>; + /** + * Additional options to pass to the `streamObject` function + * (only used when `stream` is `true`) + */ + _streamObjectOptions?: Partial>[0]>; +}; +``` diff --git a/docs/pages/docs/ai/setup.mdx b/docs/pages/docs/ai/setup.mdx new file mode 100644 index 0000000000..566c04098e --- /dev/null +++ b/docs/pages/docs/ai/setup.mdx @@ -0,0 +1,108 @@ +--- +title: AI Rich Text Editing +description: Add AI functionality to your BlockNote rich text editor +imageTitle: BlockNote AI +path: /docs/ai +--- + +import { Example } from "@/components/example"; +import { Callout } from "nextra/components"; + +# Getting Started with BlockNote AI + +First, install the `@blocknote/xl-ai` package: + +```bash +npm install @blocknote/xl-ai +``` + +## Creating a Model + +BlockNote AI uses the the [AI SDK](https://ai-sdk.dev/docs/foundations/overview) to standardize integrating artificial intelligence (AI) models across [supported providers](https://ai-sdk.dev/docs/foundations/providers-and-models). + +As a first step, you'll need to register a new model with the AI SDK. For example, for Llama hosted on Groq: + +```bash +npm install @ai-sdk/groq +``` + +```ts +import { createGroq } from "@ai-sdk/groq"; + +const provider = createGroq({ + apiKey: "YOUR_GROQ_API_KEY", +}); + +const model = provider("llama-3.3-70b-versatile"); +``` + + + Note that this setup directly calls the provider from the client, and exposes + your API keys on the client. For Production scenarios, a more common approach + is to handle authentication on your own server and proxy requests to a + provider. See our [Demo AI + Server](https://github.com/TypeCellOS/BlockNote/tree/main/packages/xl-ai-server) + for a Node.js example or check the AI SDK best practices. + + +## Setting up the editor + +Now, you can create the editor with the AI Extension enabled: + +```ts +import { createBlockNoteEditor } from "@blocknote/core"; +import { BlockNoteAIExtension } from "@blocknote/xl-ai"; +import { + AIToolbarButton, + AIMenuController, + locales as aiLocales, + createAIExtension, + createBlockNoteAIClient, + getAISlashMenuItems, +} from "@blocknote/xl-ai"; + +const editor = createBlockNoteEditor({ + dictionary: { + ...en, + ai: aiLocales.en, // add default translations for the AI extension + }, + extensions: [ + createAIExtension({ + model, + }), + ], + // ... other editor options +}); +``` + +### The `createAIExtension` method + +TODO + +## Adding AI UI elements + +Now, the only thing left to do is to customize the UI elements of your editor. + +```tsx + + {/* Add the AI Command menu to the editor */} + + + {/* Create you own Formatting Toolbar with an AI button, + (see the full example code below) */} + + + {/* Create you own SlashMenu with an AI option, + (see the full example code below) */} + + +``` + +# Full Example + + diff --git a/docs/pages/examples/_meta.json b/docs/pages/examples/_meta.json index aa81bb87ad..ea06b69523 100644 --- a/docs/pages/examples/_meta.json +++ b/docs/pages/examples/_meta.json @@ -7,5 +7,6 @@ "interoperability": "Interoperability", "custom-schema": "Custom Schemas", "collaboration": "Collaboration", - "extensions": "Extensions" + "extensions": "Extensions", + "ai": "AI" } diff --git a/examples/01-basic/01-minimal/package.json b/examples/01-basic/01-minimal/package.json index 08442399b8..5179e10576 100644 --- a/examples/01-basic/01-minimal/package.json +++ b/examples/01-basic/01-minimal/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-minimal", + "name": "@blocknote/example-basic-minimal", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/01-basic/02-block-objects/package.json b/examples/01-basic/02-block-objects/package.json index 50c78fd245..c65e6e4fab 100644 --- a/examples/01-basic/02-block-objects/package.json +++ b/examples/01-basic/02-block-objects/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-block-objects", + "name": "@blocknote/example-basic-block-objects", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/01-basic/03-multi-column/package.json b/examples/01-basic/03-multi-column/package.json index bcdfe6241e..3a6f333943 100644 --- a/examples/01-basic/03-multi-column/package.json +++ b/examples/01-basic/03-multi-column/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-multi-column", + "name": "@blocknote/example-basic-multi-column", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/01-basic/04-default-blocks/package.json b/examples/01-basic/04-default-blocks/package.json index 21a66addf9..06450ec709 100644 --- a/examples/01-basic/04-default-blocks/package.json +++ b/examples/01-basic/04-default-blocks/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-default-blocks", + "name": "@blocknote/example-basic-default-blocks", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/01-basic/05-removing-default-blocks/package.json b/examples/01-basic/05-removing-default-blocks/package.json index 73d542fc4d..155c5cab12 100644 --- a/examples/01-basic/05-removing-default-blocks/package.json +++ b/examples/01-basic/05-removing-default-blocks/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-removing-default-blocks", + "name": "@blocknote/example-basic-removing-default-blocks", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/01-basic/06-block-manipulation/package.json b/examples/01-basic/06-block-manipulation/package.json index c241565381..4a6310c3d9 100644 --- a/examples/01-basic/06-block-manipulation/package.json +++ b/examples/01-basic/06-block-manipulation/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-block-manipulation", + "name": "@blocknote/example-basic-block-manipulation", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/01-basic/07-selection-blocks/package.json b/examples/01-basic/07-selection-blocks/package.json index cf00a8d5d3..51a4cb7acc 100644 --- a/examples/01-basic/07-selection-blocks/package.json +++ b/examples/01-basic/07-selection-blocks/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-selection-blocks", + "name": "@blocknote/example-basic-selection-blocks", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/01-basic/08-ariakit/package.json b/examples/01-basic/08-ariakit/package.json index 8cb5fb252b..5b12b5ad5e 100644 --- a/examples/01-basic/08-ariakit/package.json +++ b/examples/01-basic/08-ariakit/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-ariakit", + "name": "@blocknote/example-basic-ariakit", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/01-basic/09-shadcn/package.json b/examples/01-basic/09-shadcn/package.json index 9099070e45..076de14c6a 100644 --- a/examples/01-basic/09-shadcn/package.json +++ b/examples/01-basic/09-shadcn/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-shadcn", + "name": "@blocknote/example-basic-shadcn", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/01-basic/10-localization/package.json b/examples/01-basic/10-localization/package.json index 6e9791f93a..e6eba8cdf1 100644 --- a/examples/01-basic/10-localization/package.json +++ b/examples/01-basic/10-localization/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-localization", + "name": "@blocknote/example-basic-localization", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/01-basic/11-custom-placeholder/package.json b/examples/01-basic/11-custom-placeholder/package.json index 5a0f1c4a97..d23a455b6b 100644 --- a/examples/01-basic/11-custom-placeholder/package.json +++ b/examples/01-basic/11-custom-placeholder/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-custom-placeholder", + "name": "@blocknote/example-basic-custom-placeholder", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/01-basic/12-multi-editor/package.json b/examples/01-basic/12-multi-editor/package.json index 0ff9e1bfd4..78e798f03e 100644 --- a/examples/01-basic/12-multi-editor/package.json +++ b/examples/01-basic/12-multi-editor/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-multi-editor", + "name": "@blocknote/example-basic-multi-editor", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/01-basic/13-custom-paste-handler/package.json b/examples/01-basic/13-custom-paste-handler/package.json index 29c51b05ba..676827b542 100644 --- a/examples/01-basic/13-custom-paste-handler/package.json +++ b/examples/01-basic/13-custom-paste-handler/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-custom-paste-handler", + "name": "@blocknote/example-basic-custom-paste-handler", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/01-basic/testing/package.json b/examples/01-basic/testing/package.json index e1d8d76c5e..34af6c470e 100644 --- a/examples/01-basic/testing/package.json +++ b/examples/01-basic/testing/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-testing", + "name": "@blocknote/example-basic-testing", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/02-backend/01-file-uploading/package.json b/examples/02-backend/01-file-uploading/package.json index b03a49a541..115c1caaef 100644 --- a/examples/02-backend/01-file-uploading/package.json +++ b/examples/02-backend/01-file-uploading/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-file-uploading", + "name": "@blocknote/example-backend-file-uploading", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/02-backend/02-saving-loading/package.json b/examples/02-backend/02-saving-loading/package.json index 8bcc9a4272..61e62e68d8 100644 --- a/examples/02-backend/02-saving-loading/package.json +++ b/examples/02-backend/02-saving-loading/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-saving-loading", + "name": "@blocknote/example-backend-saving-loading", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/02-backend/03-s3/package.json b/examples/02-backend/03-s3/package.json index 1dd9e12f87..6f2ceee11a 100644 --- a/examples/02-backend/03-s3/package.json +++ b/examples/02-backend/03-s3/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-s3", + "name": "@blocknote/example-backend-s3", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/02-backend/04-rendering-static-documents/package.json b/examples/02-backend/04-rendering-static-documents/package.json index c3c00afbf2..6d9bf7d440 100644 --- a/examples/02-backend/04-rendering-static-documents/package.json +++ b/examples/02-backend/04-rendering-static-documents/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-rendering-static-documents", + "name": "@blocknote/example-backend-rendering-static-documents", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/01-ui-elements-remove/package.json b/examples/03-ui-components/01-ui-elements-remove/package.json index d773d4c681..6217ceb432 100644 --- a/examples/03-ui-components/01-ui-elements-remove/package.json +++ b/examples/03-ui-components/01-ui-elements-remove/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-ui-elements-remove", + "name": "@blocknote/example-ui-components-ui-elements-remove", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/02-formatting-toolbar-buttons/BlueButton.tsx b/examples/03-ui-components/02-formatting-toolbar-buttons/BlueButton.tsx index 0451aa6a54..c5bad4edaa 100644 --- a/examples/03-ui-components/02-formatting-toolbar-buttons/BlueButton.tsx +++ b/examples/03-ui-components/02-formatting-toolbar-buttons/BlueButton.tsx @@ -1,9 +1,9 @@ +import "@blocknote/mantine/style.css"; import { useBlockNoteEditor, useComponentsContext, useEditorContentOrSelectionChange, } from "@blocknote/react"; -import "@blocknote/mantine/style.css"; import { useState } from "react"; // Custom Formatting Toolbar Button to toggle blue text & background color. diff --git a/examples/03-ui-components/02-formatting-toolbar-buttons/package.json b/examples/03-ui-components/02-formatting-toolbar-buttons/package.json index 42b4c9d0f2..67a1d7bc80 100644 --- a/examples/03-ui-components/02-formatting-toolbar-buttons/package.json +++ b/examples/03-ui-components/02-formatting-toolbar-buttons/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-formatting-toolbar-buttons", + "name": "@blocknote/example-ui-components-formatting-toolbar-buttons", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/03-formatting-toolbar-block-type-items/package.json b/examples/03-ui-components/03-formatting-toolbar-block-type-items/package.json index 74eb9abb28..7a01c4bf85 100644 --- a/examples/03-ui-components/03-formatting-toolbar-block-type-items/package.json +++ b/examples/03-ui-components/03-formatting-toolbar-block-type-items/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-formatting-toolbar-block-type-items", + "name": "@blocknote/example-ui-components-formatting-toolbar-block-type-items", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/04-side-menu-buttons/package.json b/examples/03-ui-components/04-side-menu-buttons/package.json index c5dfa45e36..0503387354 100644 --- a/examples/03-ui-components/04-side-menu-buttons/package.json +++ b/examples/03-ui-components/04-side-menu-buttons/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-side-menu-buttons", + "name": "@blocknote/example-ui-components-side-menu-buttons", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/05-side-menu-drag-handle-items/package.json b/examples/03-ui-components/05-side-menu-drag-handle-items/package.json index de9f04ad5d..1665ffdc67 100644 --- a/examples/03-ui-components/05-side-menu-drag-handle-items/package.json +++ b/examples/03-ui-components/05-side-menu-drag-handle-items/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-side-menu-drag-handle-items", + "name": "@blocknote/example-ui-components-side-menu-drag-handle-items", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/06-suggestion-menus-slash-menu-items/App.tsx b/examples/03-ui-components/06-suggestion-menus-slash-menu-items/App.tsx index 9c81e78841..61fc407ff7 100644 --- a/examples/03-ui-components/06-suggestion-menus-slash-menu-items/App.tsx +++ b/examples/03-ui-components/06-suggestion-menus-slash-menu-items/App.tsx @@ -2,17 +2,16 @@ import { BlockNoteEditor, filterSuggestionItems, insertOrUpdateBlock, - PartialBlock, } from "@blocknote/core"; import "@blocknote/core/fonts/inter.css"; +import { BlockNoteView } from "@blocknote/mantine"; +import "@blocknote/mantine/style.css"; import { DefaultReactSuggestionItem, getDefaultReactSlashMenuItems, SuggestionMenuController, useCreateBlockNote, } from "@blocknote/react"; -import { BlockNoteView } from "@blocknote/mantine"; -import "@blocknote/mantine/style.css"; import { HiOutlineGlobeAlt } from "react-icons/hi"; // Custom Slash Menu item to insert a block after the current one. diff --git a/examples/03-ui-components/06-suggestion-menus-slash-menu-items/package.json b/examples/03-ui-components/06-suggestion-menus-slash-menu-items/package.json index b64b0ef662..fe37b52315 100644 --- a/examples/03-ui-components/06-suggestion-menus-slash-menu-items/package.json +++ b/examples/03-ui-components/06-suggestion-menus-slash-menu-items/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-suggestion-menus-slash-menu-items", + "name": "@blocknote/example-ui-components-suggestion-menus-slash-menu-items", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/07-suggestion-menus-slash-menu-component/package.json b/examples/03-ui-components/07-suggestion-menus-slash-menu-component/package.json index 0dd900a083..ecdf705fe7 100644 --- a/examples/03-ui-components/07-suggestion-menus-slash-menu-component/package.json +++ b/examples/03-ui-components/07-suggestion-menus-slash-menu-component/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-suggestion-menus-slash-menu-component", + "name": "@blocknote/example-ui-components-suggestion-menus-slash-menu-component", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/package.json b/examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/package.json index 0af6a1c397..c933aea6cb 100644 --- a/examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/package.json +++ b/examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-suggestion-menus-emoji-picker-columns", + "name": "@blocknote/example-ui-components-suggestion-menus-emoji-picker-columns", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/09-suggestion-menus-emoji-picker-component/package.json b/examples/03-ui-components/09-suggestion-menus-emoji-picker-component/package.json index 697bc6cc8f..259276ce27 100644 --- a/examples/03-ui-components/09-suggestion-menus-emoji-picker-component/package.json +++ b/examples/03-ui-components/09-suggestion-menus-emoji-picker-component/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-suggestion-menus-emoji-picker-component", + "name": "@blocknote/example-ui-components-suggestion-menus-emoji-picker-component", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/10-suggestion-menus-grid-mentions/package.json b/examples/03-ui-components/10-suggestion-menus-grid-mentions/package.json index 886b3b20c6..ed99e19b43 100644 --- a/examples/03-ui-components/10-suggestion-menus-grid-mentions/package.json +++ b/examples/03-ui-components/10-suggestion-menus-grid-mentions/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-suggestion-menus-grid-mentions", + "name": "@blocknote/example-ui-components-suggestion-menus-grid-mentions", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/11-uppy-file-panel/package.json b/examples/03-ui-components/11-uppy-file-panel/package.json index 74f5905aeb..e1b7a98888 100644 --- a/examples/03-ui-components/11-uppy-file-panel/package.json +++ b/examples/03-ui-components/11-uppy-file-panel/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-uppy-file-panel", + "name": "@blocknote/example-ui-components-uppy-file-panel", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/12-static-formatting-toolbar/package.json b/examples/03-ui-components/12-static-formatting-toolbar/package.json index da4735a601..e3e07cceac 100644 --- a/examples/03-ui-components/12-static-formatting-toolbar/package.json +++ b/examples/03-ui-components/12-static-formatting-toolbar/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-static-formatting-toolbar", + "name": "@blocknote/example-ui-components-static-formatting-toolbar", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/13-custom-ui/package.json b/examples/03-ui-components/13-custom-ui/package.json index c93dab18c5..4f2d67c282 100644 --- a/examples/03-ui-components/13-custom-ui/package.json +++ b/examples/03-ui-components/13-custom-ui/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-custom-ui", + "name": "@blocknote/example-ui-components-custom-ui", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/14-experimental-mobile-formatting-toolbar/package.json b/examples/03-ui-components/14-experimental-mobile-formatting-toolbar/package.json index 69dd64c794..c581485b1e 100644 --- a/examples/03-ui-components/14-experimental-mobile-formatting-toolbar/package.json +++ b/examples/03-ui-components/14-experimental-mobile-formatting-toolbar/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-experimental-mobile-formatting-toolbar", + "name": "@blocknote/example-ui-components-experimental-mobile-formatting-toolbar", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/15-advanced-tables/package.json b/examples/03-ui-components/15-advanced-tables/package.json index 962209faf6..b01ce849e7 100644 --- a/examples/03-ui-components/15-advanced-tables/package.json +++ b/examples/03-ui-components/15-advanced-tables/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-advanced-tables", + "name": "@blocknote/example-ui-components-advanced-tables", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/03-ui-components/link-toolbar-buttons/package.json b/examples/03-ui-components/link-toolbar-buttons/package.json index 4b3c21921b..abf29e935f 100644 --- a/examples/03-ui-components/link-toolbar-buttons/package.json +++ b/examples/03-ui-components/link-toolbar-buttons/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-link-toolbar-buttons", + "name": "@blocknote/example-ui-components-link-toolbar-buttons", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/04-theming/01-theming-dom-attributes/package.json b/examples/04-theming/01-theming-dom-attributes/package.json index a9688166e7..f2b71c3e2d 100644 --- a/examples/04-theming/01-theming-dom-attributes/package.json +++ b/examples/04-theming/01-theming-dom-attributes/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-theming-dom-attributes", + "name": "@blocknote/example-theming-theming-dom-attributes", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/04-theming/02-changing-font/package.json b/examples/04-theming/02-changing-font/package.json index 338f6a9886..fb4f54d6f5 100644 --- a/examples/04-theming/02-changing-font/package.json +++ b/examples/04-theming/02-changing-font/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-changing-font", + "name": "@blocknote/example-theming-changing-font", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/04-theming/03-theming-css/package.json b/examples/04-theming/03-theming-css/package.json index 7b6fa317c3..d3d9b61829 100644 --- a/examples/04-theming/03-theming-css/package.json +++ b/examples/04-theming/03-theming-css/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-theming-css", + "name": "@blocknote/example-theming-theming-css", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/04-theming/04-theming-css-variables/package.json b/examples/04-theming/04-theming-css-variables/package.json index 91b5b6b6ae..aafb4cfcf9 100644 --- a/examples/04-theming/04-theming-css-variables/package.json +++ b/examples/04-theming/04-theming-css-variables/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-theming-css-variables", + "name": "@blocknote/example-theming-theming-css-variables", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/04-theming/05-theming-css-variables-code/package.json b/examples/04-theming/05-theming-css-variables-code/package.json index ba67913af9..bea27d77ea 100644 --- a/examples/04-theming/05-theming-css-variables-code/package.json +++ b/examples/04-theming/05-theming-css-variables-code/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-theming-css-variables-code", + "name": "@blocknote/example-theming-theming-css-variables-code", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/04-theming/06-code-block/package.json b/examples/04-theming/06-code-block/package.json index dac4dc03a6..a71e44df2d 100644 --- a/examples/04-theming/06-code-block/package.json +++ b/examples/04-theming/06-code-block/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-code-block", + "name": "@blocknote/example-theming-code-block", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/04-theming/07-custom-code-block/package.json b/examples/04-theming/07-custom-code-block/package.json index a5fe5530c3..33aa535e85 100644 --- a/examples/04-theming/07-custom-code-block/package.json +++ b/examples/04-theming/07-custom-code-block/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-custom-code-block", + "name": "@blocknote/example-theming-custom-code-block", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/05-interoperability/01-converting-blocks-to-html/package.json b/examples/05-interoperability/01-converting-blocks-to-html/package.json index 43b5b3df06..bead14a025 100644 --- a/examples/05-interoperability/01-converting-blocks-to-html/package.json +++ b/examples/05-interoperability/01-converting-blocks-to-html/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-converting-blocks-to-html", + "name": "@blocknote/example-interoperability-converting-blocks-to-html", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/05-interoperability/02-converting-blocks-from-html/package.json b/examples/05-interoperability/02-converting-blocks-from-html/package.json index f31ad9ff6a..d1dbd7037d 100644 --- a/examples/05-interoperability/02-converting-blocks-from-html/package.json +++ b/examples/05-interoperability/02-converting-blocks-from-html/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-converting-blocks-from-html", + "name": "@blocknote/example-interoperability-converting-blocks-from-html", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/05-interoperability/03-converting-blocks-to-md/package.json b/examples/05-interoperability/03-converting-blocks-to-md/package.json index de3151f165..b48fde48e6 100644 --- a/examples/05-interoperability/03-converting-blocks-to-md/package.json +++ b/examples/05-interoperability/03-converting-blocks-to-md/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-converting-blocks-to-md", + "name": "@blocknote/example-interoperability-converting-blocks-to-md", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/05-interoperability/04-converting-blocks-from-md/package.json b/examples/05-interoperability/04-converting-blocks-from-md/package.json index 3c733ea46c..c8148fb197 100644 --- a/examples/05-interoperability/04-converting-blocks-from-md/package.json +++ b/examples/05-interoperability/04-converting-blocks-from-md/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-converting-blocks-from-md", + "name": "@blocknote/example-interoperability-converting-blocks-from-md", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/05-interoperability/05-converting-blocks-to-pdf/package.json b/examples/05-interoperability/05-converting-blocks-to-pdf/package.json index d28a48de5f..a20a4011c4 100644 --- a/examples/05-interoperability/05-converting-blocks-to-pdf/package.json +++ b/examples/05-interoperability/05-converting-blocks-to-pdf/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-converting-blocks-to-pdf", + "name": "@blocknote/example-interoperability-converting-blocks-to-pdf", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/05-interoperability/06-converting-blocks-to-docx/package.json b/examples/05-interoperability/06-converting-blocks-to-docx/package.json index 1947c68d54..092a4761c2 100644 --- a/examples/05-interoperability/06-converting-blocks-to-docx/package.json +++ b/examples/05-interoperability/06-converting-blocks-to-docx/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-converting-blocks-to-docx", + "name": "@blocknote/example-interoperability-converting-blocks-to-docx", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/05-interoperability/07-converting-blocks-to-odt/package.json b/examples/05-interoperability/07-converting-blocks-to-odt/package.json index e5e81bfaa8..4318d50d5b 100644 --- a/examples/05-interoperability/07-converting-blocks-to-odt/package.json +++ b/examples/05-interoperability/07-converting-blocks-to-odt/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-converting-blocks-to-odt", + "name": "@blocknote/example-interoperability-converting-blocks-to-odt", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/06-custom-schema/01-alert-block/package.json b/examples/06-custom-schema/01-alert-block/package.json index 86988599a5..724ada3572 100644 --- a/examples/06-custom-schema/01-alert-block/package.json +++ b/examples/06-custom-schema/01-alert-block/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-alert-block", + "name": "@blocknote/example-custom-schema-alert-block", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/06-custom-schema/02-suggestion-menus-mentions/package.json b/examples/06-custom-schema/02-suggestion-menus-mentions/package.json index 05f9ea4cbf..21f885a9e4 100644 --- a/examples/06-custom-schema/02-suggestion-menus-mentions/package.json +++ b/examples/06-custom-schema/02-suggestion-menus-mentions/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-suggestion-menus-mentions", + "name": "@blocknote/example-custom-schema-suggestion-menus-mentions", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/06-custom-schema/03-font-style/package.json b/examples/06-custom-schema/03-font-style/package.json index ef3214b29b..d08215b00e 100644 --- a/examples/06-custom-schema/03-font-style/package.json +++ b/examples/06-custom-schema/03-font-style/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-font-style", + "name": "@blocknote/example-custom-schema-font-style", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/06-custom-schema/04-pdf-file-block/package.json b/examples/06-custom-schema/04-pdf-file-block/package.json index 4d18a9546f..f817dbae28 100644 --- a/examples/06-custom-schema/04-pdf-file-block/package.json +++ b/examples/06-custom-schema/04-pdf-file-block/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-pdf-file-block", + "name": "@blocknote/example-custom-schema-pdf-file-block", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/06-custom-schema/05-alert-block-full-ux/App.tsx b/examples/06-custom-schema/05-alert-block-full-ux/App.tsx index bfaf162f90..9e72f9904a 100644 --- a/examples/06-custom-schema/05-alert-block-full-ux/App.tsx +++ b/examples/06-custom-schema/05-alert-block-full-ux/App.tsx @@ -8,13 +8,13 @@ import "@blocknote/core/fonts/inter.css"; import { BlockNoteView } from "@blocknote/mantine"; import "@blocknote/mantine/style.css"; import { + BlockTypeSelectItem, + FormattingToolbar, FormattingToolbarController, SuggestionMenuController, blockTypeSelectItems, getDefaultReactSlashMenuItems, useCreateBlockNote, - BlockTypeSelectItem, - FormattingToolbar, } from "@blocknote/react"; import { RiAlertFill } from "react-icons/ri"; diff --git a/examples/06-custom-schema/05-alert-block-full-ux/package.json b/examples/06-custom-schema/05-alert-block-full-ux/package.json index a5ca782e7a..635d86536f 100644 --- a/examples/06-custom-schema/05-alert-block-full-ux/package.json +++ b/examples/06-custom-schema/05-alert-block-full-ux/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-alert-block-full-ux", + "name": "@blocknote/example-custom-schema-alert-block-full-ux", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/06-custom-schema/react-custom-blocks/package.json b/examples/06-custom-schema/react-custom-blocks/package.json index 1998f1ca1a..ef9df33b4a 100644 --- a/examples/06-custom-schema/react-custom-blocks/package.json +++ b/examples/06-custom-schema/react-custom-blocks/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-react-custom-blocks", + "name": "@blocknote/example-custom-schema-react-custom-blocks", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/06-custom-schema/react-custom-inline-content/package.json b/examples/06-custom-schema/react-custom-inline-content/package.json index 02e0da5c3c..1dc9b17734 100644 --- a/examples/06-custom-schema/react-custom-inline-content/package.json +++ b/examples/06-custom-schema/react-custom-inline-content/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-react-custom-inline-content", + "name": "@blocknote/example-custom-schema-react-custom-inline-content", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/06-custom-schema/react-custom-styles/App.tsx b/examples/06-custom-schema/react-custom-styles/App.tsx index c0b5075376..706931cabd 100644 --- a/examples/06-custom-schema/react-custom-styles/App.tsx +++ b/examples/06-custom-schema/react-custom-styles/App.tsx @@ -1,17 +1,17 @@ import { BlockNoteSchema, defaultStyleSpecs } from "@blocknote/core"; import "@blocknote/core/fonts/inter.css"; +import { BlockNoteView } from "@blocknote/mantine"; +import "@blocknote/mantine/style.css"; import { - createReactStyleSpec, FormattingToolbar, FormattingToolbarController, FormattingToolbarProps, + createReactStyleSpec, useActiveStyles, useBlockNoteEditor, useComponentsContext, useCreateBlockNote, } from "@blocknote/react"; -import { BlockNoteView } from "@blocknote/mantine"; -import "@blocknote/mantine/style.css"; const small = createReactStyleSpec( { diff --git a/examples/06-custom-schema/react-custom-styles/package.json b/examples/06-custom-schema/react-custom-styles/package.json index f3cf3bf4fb..a2d9f585a2 100644 --- a/examples/06-custom-schema/react-custom-styles/package.json +++ b/examples/06-custom-schema/react-custom-styles/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-react-custom-styles", + "name": "@blocknote/example-custom-schema-react-custom-styles", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/07-collaboration/01-partykit/package.json b/examples/07-collaboration/01-partykit/package.json index c39e06c134..c50ea40320 100644 --- a/examples/07-collaboration/01-partykit/package.json +++ b/examples/07-collaboration/01-partykit/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-partykit", + "name": "@blocknote/example-collaboration-partykit", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/07-collaboration/02-liveblocks/package.json b/examples/07-collaboration/02-liveblocks/package.json index f5b01c872b..def2998319 100644 --- a/examples/07-collaboration/02-liveblocks/package.json +++ b/examples/07-collaboration/02-liveblocks/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-liveblocks", + "name": "@blocknote/example-collaboration-liveblocks", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/07-collaboration/03-y-sweet/package.json b/examples/07-collaboration/03-y-sweet/package.json index abd2912846..cb8d1492a1 100644 --- a/examples/07-collaboration/03-y-sweet/package.json +++ b/examples/07-collaboration/03-y-sweet/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-y-sweet", + "name": "@blocknote/example-collaboration-y-sweet", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/07-collaboration/04-comments/package.json b/examples/07-collaboration/04-comments/package.json index 84e0105849..45cebf7075 100644 --- a/examples/07-collaboration/04-comments/package.json +++ b/examples/07-collaboration/04-comments/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-comments", + "name": "@blocknote/example-collaboration-comments", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/07-collaboration/05-comments-with-sidebar/package.json b/examples/07-collaboration/05-comments-with-sidebar/package.json index c49f1dcb9a..2b7d33d0c8 100644 --- a/examples/07-collaboration/05-comments-with-sidebar/package.json +++ b/examples/07-collaboration/05-comments-with-sidebar/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-comments-with-sidebar", + "name": "@blocknote/example-collaboration-comments-with-sidebar", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/07-collaboration/06-ghost-writer/package.json b/examples/07-collaboration/06-ghost-writer/package.json index 44b1e1c3ac..5f37787686 100644 --- a/examples/07-collaboration/06-ghost-writer/package.json +++ b/examples/07-collaboration/06-ghost-writer/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-ghost-writer", + "name": "@blocknote/example-collaboration-ghost-writer", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/08-extensions/01-tiptap-arrow-conversion/package.json b/examples/08-extensions/01-tiptap-arrow-conversion/package.json index 464decdddd..9d973b019f 100644 --- a/examples/08-extensions/01-tiptap-arrow-conversion/package.json +++ b/examples/08-extensions/01-tiptap-arrow-conversion/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-tiptap-arrow-conversion", + "name": "@blocknote/example-extensions-tiptap-arrow-conversion", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/09-ai/01-minimal/.bnexample.json b/examples/09-ai/01-minimal/.bnexample.json new file mode 100644 index 0000000000..19b3413f5e --- /dev/null +++ b/examples/09-ai/01-minimal/.bnexample.json @@ -0,0 +1,13 @@ +{ + "playground": true, + "docs": true, + "author": "yousefed", + "tags": ["AI", "llm"], + "dependencies": { + "@blocknote/xl-ai": "latest", + "@mantine/core": "^7.10.1", + "ai": "^4.3.15", + "@ai-sdk/groq": "^1.2.9", + "zustand": "^5.0.3" + } +} diff --git a/examples/09-ai/01-minimal/App.tsx b/examples/09-ai/01-minimal/App.tsx new file mode 100644 index 0000000000..ffb3cb673b --- /dev/null +++ b/examples/09-ai/01-minimal/App.tsx @@ -0,0 +1,158 @@ +import { createGroq } from "@ai-sdk/groq"; +import { BlockNoteEditor, filterSuggestionItems } from "@blocknote/core"; +import "@blocknote/core/fonts/inter.css"; +import { en } from "@blocknote/core/locales"; +import { BlockNoteView } from "@blocknote/mantine"; +import "@blocknote/mantine/style.css"; +import { + FormattingToolbar, + FormattingToolbarController, + SuggestionMenuController, + getDefaultReactSlashMenuItems, + getFormattingToolbarItems, + useCreateBlockNote, +} from "@blocknote/react"; +import { + AIMenuController, + AIToolbarButton, + locales as aiLocales, + createAIExtension, + createBlockNoteAIClient, + getAISlashMenuItems, +} from "@blocknote/xl-ai"; +import "@blocknote/xl-ai/style.css"; +import { getEnv } from "./getEnv.js"; + +// Optional: proxy requests through the `@blocknote/xl-ai-server` proxy server +// so that we don't have to expose our API keys to the client +const client = createBlockNoteAIClient({ + apiKey: getEnv("BLOCKNOTE_AI_SERVER_API_KEY") || "PLACEHOLDER", + baseURL: + getEnv("BLOCKNOTE_AI_SERVER_BASE_URL") || "https://localhost:3000/ai", +}); + +// Use an "open" model such as llama, in this case via groq.com +const model = createGroq({ + // call via our proxy client + ...client.getProviderSettings("groq"), +})("llama-3.3-70b-versatile"); + +/* +ALTERNATIVES: + +Call a model directly (without the proxy): + +const model = createGroq({ + apiKey: "", +})("llama-3.3-70b-versatile"); + +Or, use a different provider like OpenAI: + +const model = createOpenAI({ + ...client.getProviderSettings("openai"), +})("gpt-4", {}); +*/ + +export default function App() { + // Creates a new editor instance. + const editor = useCreateBlockNote({ + dictionary: { + ...en, + ai: aiLocales.en, // add default translations for the AI extension + }, + // Register the AI extension + extensions: [ + createAIExtension({ + model, + }), + ], + // We set some initial content for demo purposes + initialContent: [ + { + type: "heading", + props: { + level: 1, + }, + content: "I love cats", + }, + { + type: "paragraph", + content: + "Cats are one of the most beloved and fascinating animals in the world. Known for their agility, independence, and charm, cats have been companions to humans for thousands of years. Domesticated cats, scientifically named Felis catus, come in various breeds, colors, and personalities, making them a popular choice for pet owners everywhere. Their mysterious behavior, sharp reflexes, and quiet affection have earned them a special place in countless households.", + }, + { + type: "paragraph", + content: + "Beyond their role as pets, cats have a rich history and cultural significance. In ancient Egypt, they were revered and even worshipped as symbols of protection and grace. Throughout history, they’ve appeared in folklore, art, and literature, often associated with curiosity, luck, and mystery. Despite superstitions surrounding black cats in some cultures, many societies around the world admire and cherish these sleek and graceful animals.", + }, + { + type: "paragraph", + content: + "Cats also offer emotional and physical benefits to their owners. Studies have shown that interacting with cats can reduce stress, lower blood pressure, and improve mental well-being. Their gentle purring, playful antics, and warm companionship provide comfort to people of all ages. Whether lounging in the sun, chasing a toy, or curling up on a lap, cats bring joy, peace, and a bit of magic to the lives of those who welcome them into their homes.", + }, + ], + }); + + // Renders the editor instance using a React component. + return ( +
+ + {/* Add the AI Command menu to the editor */} + + + {/* We disabled the default formatting toolbar with `formattingToolbar=false` + and replace it for one with an "AI button" (defined below). + (See "Formatting Toolbar" in docs) + */} + + + {/* We disabled the default SlashMenu with `slashMenu=false` + and replace it for one with an AI option (defined below). + (See "Suggestion Menus" in docs) + */} + + +
+ ); +} + +// Formatting toolbar with the `AIToolbarButton` added +function FormattingToolbarWithAI() { + return ( + ( + + {...getFormattingToolbarItems()} + {/* Add the AI button */} + + + )} + /> + ); +} + +// Slash menu with the AI option added +function SuggestionMenuWithAI(props: { + editor: BlockNoteEditor; +}) { + return ( + + filterSuggestionItems( + [ + ...getDefaultReactSlashMenuItems(props.editor), + // add the default AI slash menu items, or define your own + ...getAISlashMenuItems(props.editor), + ], + query, + ) + } + /> + ); +} diff --git a/examples/09-ai/01-minimal/README.md b/examples/09-ai/01-minimal/README.md new file mode 100644 index 0000000000..309a6d94ec --- /dev/null +++ b/examples/09-ai/01-minimal/README.md @@ -0,0 +1,12 @@ +# Rich Text editor AI integration + +This example shows the minimal setup to add AI integration to your BlockNote rich text editor. + +Select some text and click the AI (magic wand) button, or type `/ai` anywhere in the editor to access AI functionality. + +**Relevant Docs:** + +- [Editor Setup](/docs/editor-basics/setup) +- [Changing the Formatting Toolbar](/docs/ui-components/formatting-toolbar#changing-the-formatting-toolbar) +- [Changing Slash Menu Items](/docs/ui-components/suggestion-menus#changing-slash-menu-items) +- [Getting Stared with BlockNote AI](/docs/ai/setup) diff --git a/examples/09-ai/01-minimal/getEnv.ts b/examples/09-ai/01-minimal/getEnv.ts new file mode 100644 index 0000000000..b225fc462e --- /dev/null +++ b/examples/09-ai/01-minimal/getEnv.ts @@ -0,0 +1,20 @@ +// helper function to get env variables across next / vite +// only needed so this example works in BlockNote demos and docs +export function getEnv(key: string) { + const env = (import.meta as any).env + ? { + BLOCKNOTE_AI_SERVER_API_KEY: (import.meta as any).env + .VITE_BLOCKNOTE_AI_SERVER_API_KEY, + BLOCKNOTE_AI_SERVER_BASE_URL: (import.meta as any).env + .VITE_BLOCKNOTE_AI_SERVER_BASE_URL, + } + : { + BLOCKNOTE_AI_SERVER_API_KEY: + process.env.NEXT_PUBLIC_BLOCKNOTE_AI_SERVER_API_KEY, + BLOCKNOTE_AI_SERVER_BASE_URL: + process.env.NEXT_PUBLIC_BLOCKNOTE_AI_SERVER_BASE_URL, + }; + + const value = env[key as keyof typeof env]; + return value; +} diff --git a/examples/09-ai/01-minimal/index.html b/examples/09-ai/01-minimal/index.html new file mode 100644 index 0000000000..6e9c4e44a1 --- /dev/null +++ b/examples/09-ai/01-minimal/index.html @@ -0,0 +1,14 @@ + + + + + + Rich Text editor AI integration + + +
+ + + diff --git a/examples/09-ai/01-minimal/main.tsx b/examples/09-ai/01-minimal/main.tsx new file mode 100644 index 0000000000..6284417d60 --- /dev/null +++ b/examples/09-ai/01-minimal/main.tsx @@ -0,0 +1,11 @@ +// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY +import React from "react"; +import { createRoot } from "react-dom/client"; +import App from "./App.jsx"; + +const root = createRoot(document.getElementById("root")!); +root.render( + + + +); diff --git a/examples/09-ai/01-minimal/package.json b/examples/09-ai/01-minimal/package.json new file mode 100644 index 0000000000..aabe636163 --- /dev/null +++ b/examples/09-ai/01-minimal/package.json @@ -0,0 +1,32 @@ +{ + "name": "@blocknote/example-ai-minimal", + "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", + "private": true, + "version": "0.12.4", + "scripts": { + "start": "vite", + "dev": "vite", + "build:prod": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@blocknote/core": "latest", + "@blocknote/react": "latest", + "@blocknote/ariakit": "latest", + "@blocknote/mantine": "latest", + "@blocknote/shadcn": "latest", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "@blocknote/xl-ai": "latest", + "@mantine/core": "^7.10.1", + "ai": "^4.3.15", + "@ai-sdk/groq": "^1.2.9", + "zustand": "^5.0.3" + }, + "devDependencies": { + "@types/react": "^18.0.25", + "@types/react-dom": "^18.0.9", + "@vitejs/plugin-react": "^4.3.1", + "vite": "^5.3.4" + } +} \ No newline at end of file diff --git a/examples/09-ai/01-minimal/tsconfig.json b/examples/09-ai/01-minimal/tsconfig.json new file mode 100644 index 0000000000..dbe3e6f62d --- /dev/null +++ b/examples/09-ai/01-minimal/tsconfig.json @@ -0,0 +1,36 @@ +{ + "__comment": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "lib": [ + "DOM", + "DOM.Iterable", + "ESNext" + ], + "allowJs": false, + "skipLibCheck": true, + "esModuleInterop": false, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "ESNext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + "composite": true + }, + "include": [ + "." + ], + "__ADD_FOR_LOCAL_DEV_references": [ + { + "path": "../../../packages/core/" + }, + { + "path": "../../../packages/react/" + } + ] +} \ No newline at end of file diff --git a/examples/09-ai/01-minimal/vite.config.ts b/examples/09-ai/01-minimal/vite.config.ts new file mode 100644 index 0000000000..f62ab20bc2 --- /dev/null +++ b/examples/09-ai/01-minimal/vite.config.ts @@ -0,0 +1,32 @@ +// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY +import react from "@vitejs/plugin-react"; +import * as fs from "fs"; +import * as path from "path"; +import { defineConfig } from "vite"; +// import eslintPlugin from "vite-plugin-eslint"; +// https://vitejs.dev/config/ +export default defineConfig((conf) => ({ + plugins: [react()], + optimizeDeps: {}, + build: { + sourcemap: true, + }, + resolve: { + alias: + conf.command === "build" || + !fs.existsSync(path.resolve(__dirname, "../../packages/core/src")) + ? {} + : ({ + // Comment out the lines below to load a built version of blocknote + // or, keep as is to load live from sources with live reload working + "@blocknote/core": path.resolve( + __dirname, + "../../packages/core/src/" + ), + "@blocknote/react": path.resolve( + __dirname, + "../../packages/react/src/" + ), + } as any), + }, +})); diff --git a/examples/09-ai/02-playground/.bnexample.json b/examples/09-ai/02-playground/.bnexample.json new file mode 100644 index 0000000000..dc5849f4d4 --- /dev/null +++ b/examples/09-ai/02-playground/.bnexample.json @@ -0,0 +1,17 @@ +{ + "playground": true, + "docs": true, + "author": "yousefed", + "tags": ["AI", "llm"], + "dependencies": { + "@blocknote/xl-ai": "latest", + "@mantine/core": "^7.10.1", + "ai": "^4.3.15", + "@ai-sdk/openai": "^1.3.22", + "@ai-sdk/openai-compatible": "^0.2.14", + "@ai-sdk/groq": "^1.2.9", + "@ai-sdk/anthropic": "^1.2.11", + "@ai-sdk/mistral": "^1.2.8", + "zustand": "^5.0.3" + } +} diff --git a/examples/09-ai/02-playground/App.tsx b/examples/09-ai/02-playground/App.tsx new file mode 100644 index 0000000000..f2c45a869e --- /dev/null +++ b/examples/09-ai/02-playground/App.tsx @@ -0,0 +1,236 @@ +import { createAnthropic } from "@ai-sdk/anthropic"; +import { createGroq } from "@ai-sdk/groq"; +import { createMistral } from "@ai-sdk/mistral"; +import { createOpenAI } from "@ai-sdk/openai"; +import { createOpenAICompatible } from "@ai-sdk/openai-compatible"; +import { BlockNoteEditor, filterSuggestionItems } from "@blocknote/core"; +import "@blocknote/core/fonts/inter.css"; +import { en } from "@blocknote/core/locales"; +import { BlockNoteView } from "@blocknote/mantine"; +import "@blocknote/mantine/style.css"; +import { + FormattingToolbar, + FormattingToolbarController, + SuggestionMenuController, + getDefaultReactSlashMenuItems, + getFormattingToolbarItems, + useCreateBlockNote, +} from "@blocknote/react"; +import { + AIMenuController, + AIToolbarButton, + locales as aiLocales, + createAIExtension, + createBlockNoteAIClient, + getAIExtension, + getAISlashMenuItems, + llmFormats, +} from "@blocknote/xl-ai"; +import "@blocknote/xl-ai/style.css"; +import { Fieldset, Switch } from "@mantine/core"; +import { LanguageModelV1 } from "ai"; +import { useEffect, useMemo, useState } from "react"; +import { useStore } from "zustand"; +import { BasicAutocomplete } from "./AutoComplete.js"; +import RadioGroupComponent from "./components/RadioGroupComponent.js"; +import { getEnv } from "./getEnv.js"; +// Optional: proxy requests through the `@blocknote/xl-ai-server` proxy server +// so that we don't have to expose our API keys to the client +const client = createBlockNoteAIClient({ + apiKey: getEnv("BLOCKNOTE_AI_SERVER_API_KEY") || "PLACEHOLDER", + baseURL: + getEnv("BLOCKNOTE_AI_SERVER_BASE_URL") || "https://localhost:3000/ai", +}); + +// return the AI SDK model based on the selected model string +function getModel(aiModelString: string) { + const [provider, ...modelNameParts] = aiModelString.split("/"); + const modelName = modelNameParts.join("/"); + if (provider === "openai.chat") { + return createOpenAI({ + ...client.getProviderSettings("openai"), + })(modelName, {}); + } else if (provider === "groq.chat") { + return createGroq({ + ...client.getProviderSettings("groq"), + })(modelName); + } else if (provider === "albert-etalab.chat") { + return createOpenAICompatible({ + name: "albert-etalab", + baseURL: "https://albert.api.etalab.gouv.fr/v1", + ...client.getProviderSettings("albert-etalab"), + })(modelName); + } else if (provider === "mistral.chat") { + return createMistral({ + ...client.getProviderSettings("mistral"), + })(modelName); + } else if (provider === "anthropic.chat") { + return createAnthropic({ + ...client.getProviderSettings("anthropic"), + })(modelName); + } else { + return "unknown-model" as const; + } +} + +export default function App() { + const [modelString, setModelString] = useState( + "groq.chat/llama-3.3-70b-versatile", + ); + + const model = useMemo(() => { + return getModel(modelString); + }, [modelString]); + + // Creates a new editor instance. + const editor = useCreateBlockNote({ + dictionary: { + ...en, + ai: aiLocales.en, // add default translations for the AI extension + }, + // Register the AI extension + extensions: [ + createAIExtension({ + model: model as LanguageModelV1, // (type because initially it's valid) + }), + ], + // We set some initial content for demo purposes + initialContent: [ + { + type: "heading", + props: { + level: 1, + }, + content: "I love cats", + }, + { + type: "paragraph", + content: + "Cats are one of the most beloved and fascinating animals in the world. Known for their agility, independence, and charm, cats have been companions to humans for thousands of years. Domesticated cats, scientifically named Felis catus, come in various breeds, colors, and personalities, making them a popular choice for pet owners everywhere. Their mysterious behavior, sharp reflexes, and quiet affection have earned them a special place in countless households.", + }, + { + type: "paragraph", + content: + "Beyond their role as pets, cats have a rich history and cultural significance. In ancient Egypt, they were revered and even worshipped as symbols of protection and grace. Throughout history, they’ve appeared in folklore, art, and literature, often associated with curiosity, luck, and mystery. Despite superstitions surrounding black cats in some cultures, many societies around the world admire and cherish these sleek and graceful animals.", + }, + { + type: "paragraph", + content: + "Cats also offer emotional and physical benefits to their owners. Studies have shown that interacting with cats can reduce stress, lower blood pressure, and improve mental well-being. Their gentle purring, playful antics, and warm companionship provide comfort to people of all ages. Whether lounging in the sun, chasing a toy, or curling up on a lap, cats bring joy, peace, and a bit of magic to the lives of those who welcome them into their homes.", + }, + ], + }); + + const ai = getAIExtension(editor); + + // TODO: fix typing in autocompletion box + + useEffect(() => { + // update the default model in the extension + if (model !== "unknown-model") { + ai.options.setState({ model }); + } + }, [model, ai.options]); + + const [dataFormat, setDataFormat] = useState("html"); + + const stream = useStore(ai.options, (state) => state.stream); + + return ( +
+
+ + { + const dataFormat = + value === "markdown" + ? llmFormats._experimental_markdown + : value === "json" + ? llmFormats._experimental_json + : llmFormats.html; + ai.options.setState({ + dataFormat, + }); + setDataFormat(value); + }} + /> + + ai.options.setState({ stream: e.target.checked })} + label="Streaming" + /> +
+ + + {/* Add the AI Command menu to the editor */} + + + {/* We disabled the default formatting toolbar with `formattingToolbar=false` + and replace it for one with an "AI button" (defined below). + (See "Formatting Toolbar" in docs) + */} + + + {/* We disabled the default SlashMenu with `slashMenu=false` + and replace it for one with an AI option (defined below). + (See "Suggestion Menus" in docs) + */} + + +
+ ); +} + +// Formatting toolbar with the `AIToolbarButton` added +function FormattingToolbarWithAI() { + return ( + ( + + {...getFormattingToolbarItems()} + + + )} + /> + ); +} + +// Slash menu with the AI option added +function SuggestionMenuWithAI(props: { + editor: BlockNoteEditor; +}) { + return ( + + filterSuggestionItems( + [ + ...getDefaultReactSlashMenuItems(props.editor), + ...getAISlashMenuItems(props.editor), + ], + query, + ) + } + /> + ); +} diff --git a/examples/09-ai/02-playground/AutoComplete.tsx b/examples/09-ai/02-playground/AutoComplete.tsx new file mode 100644 index 0000000000..8503c91f1d --- /dev/null +++ b/examples/09-ai/02-playground/AutoComplete.tsx @@ -0,0 +1,63 @@ +import { Combobox, TextInput, useCombobox } from "@mantine/core"; +import { AI_MODELS } from "./data/aimodels.js"; + +// https://mantine.dev/combobox/?e=BasicAutocomplete +// This is used for the AI Model selector in the example +export function BasicAutocomplete(props: { + value: string; + onChange: (value: string) => void; + error?: string; +}) { + const { value, onChange } = props; + const combobox = useCombobox(); + + const shouldFilterOptions = !AI_MODELS.some((item) => item === value); + const filteredOptions = shouldFilterOptions + ? AI_MODELS.filter((item) => + item.toLowerCase().includes(value.toLowerCase().trim()), + ) + : AI_MODELS; + + const options = filteredOptions.map((item) => ( + + {item} + + )); + + return ( + { + onChange(optionValue); + combobox.closeDropdown(); + }} + store={combobox} + withinPortal={false}> + + { + onChange(event.currentTarget.value); + combobox.openDropdown(); + combobox.updateSelectedOptionIndex(); + }} + onClick={() => combobox.openDropdown()} + onFocus={() => combobox.openDropdown()} + onBlur={() => combobox.closeDropdown()} + error={props.error} + /> + + + + + {options.length === 0 ? ( + Nothing found + ) : ( + options + )} + + + + ); +} diff --git a/examples/09-ai/02-playground/README.md b/examples/09-ai/02-playground/README.md new file mode 100644 index 0000000000..9a42631199 --- /dev/null +++ b/examples/09-ai/02-playground/README.md @@ -0,0 +1,12 @@ +# AI Playground + +The AI Playground example shows how to customize different options of the AI Extension such as model type and streaming mode. + +Change the configuration, the highlight some text to access the AI menu, or type `/ai` anywhere in the editor. + +**Relevant Docs:** + +- [Editor Setup](/docs/editor-basics/setup) +- [Changing the Formatting Toolbar](/docs/ui-components/formatting-toolbar#changing-the-formatting-toolbar) +- [Changing Slash Menu Items](/docs/ui-components/suggestion-menus#changing-slash-menu-items) +- [Getting Stared with BlockNote AI](/docs/ai/setup) diff --git a/examples/09-ai/02-playground/components/RadioGroupComponent.module.css b/examples/09-ai/02-playground/components/RadioGroupComponent.module.css new file mode 100644 index 0000000000..46eedff7db --- /dev/null +++ b/examples/09-ai/02-playground/components/RadioGroupComponent.module.css @@ -0,0 +1,33 @@ +.root { + position: relative; + padding: var(--mantine-spacing-md); + transition: border-color 150ms ease; + + &[data-checked] { + border-color: var(--mantine-primary-color-filled); + } + + @mixin hover { + @mixin light { + background-color: var(--mantine-color-gray-0); + } + + @mixin dark { + background-color: var(--mantine-color-dark-6); + } + } +} + +.label { + font-family: var(--mantine-font-family-monospace); + font-weight: bold; + font-size: var(--mantine-font-size-md); + line-height: 1.3; + color: var(--mantine-color-bright); +} + +.description { + margin-top: 8px; + color: var(--mantine-color-dimmed); + font-size: var(--mantine-font-size-xs); +} diff --git a/examples/09-ai/02-playground/components/RadioGroupComponent.tsx b/examples/09-ai/02-playground/components/RadioGroupComponent.tsx new file mode 100644 index 0000000000..f1cbed1508 --- /dev/null +++ b/examples/09-ai/02-playground/components/RadioGroupComponent.tsx @@ -0,0 +1,44 @@ +import { Radio, Stack } from "@mantine/core"; +import React from "react"; + +interface RadioGroupComponentProps { + label: string; + items: Array<{ + name: string; + description: string; + value: string; + }>; + value: string; + onChange: (value: string) => void; +} + +const RadioGroupComponent: React.FC = ({ + label, + items, + value, + onChange, +}) => ( + + + {items.map((item) => ( + + // TODO: doesn't work well with our mantive version or styles + // + // + // + //
+ // {item.name} + // {item.description} + //
+ //
+ //
+ ))} +
+
+); + +export default RadioGroupComponent; diff --git a/examples/09-ai/02-playground/data/aimodels.ts b/examples/09-ai/02-playground/data/aimodels.ts new file mode 100644 index 0000000000..174618d11c --- /dev/null +++ b/examples/09-ai/02-playground/data/aimodels.ts @@ -0,0 +1,17 @@ +export const AI_MODELS = [ + "openai.chat/gpt-4o", + "openai.chat/gpt-4o-mini", + "openai.chat/gpt-4.1", + "groq.chat/llama-3.3-70b-versatile", + "groq.chat/llama-3.1-8b-instant", + "groq.chat/llama3-70b-8192", + "groq.chat/deepseek-r1-distill-llama-70b", + "groq.chat/qwen-qwq-32b", + "mistral.chat/mistral-large-latest", + "mistral.chat/mistral-medium-latest", + "mistral.chat/ministral-3b-latest", + "mistral.chat/ministral-8b-latest", + "anthropic.chat/claude-3-7-sonnet-latest", + "anthropic.chat/claude-3-5-haiku-latest", + "albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8", +]; diff --git a/examples/09-ai/02-playground/getEnv.ts b/examples/09-ai/02-playground/getEnv.ts new file mode 100644 index 0000000000..b225fc462e --- /dev/null +++ b/examples/09-ai/02-playground/getEnv.ts @@ -0,0 +1,20 @@ +// helper function to get env variables across next / vite +// only needed so this example works in BlockNote demos and docs +export function getEnv(key: string) { + const env = (import.meta as any).env + ? { + BLOCKNOTE_AI_SERVER_API_KEY: (import.meta as any).env + .VITE_BLOCKNOTE_AI_SERVER_API_KEY, + BLOCKNOTE_AI_SERVER_BASE_URL: (import.meta as any).env + .VITE_BLOCKNOTE_AI_SERVER_BASE_URL, + } + : { + BLOCKNOTE_AI_SERVER_API_KEY: + process.env.NEXT_PUBLIC_BLOCKNOTE_AI_SERVER_API_KEY, + BLOCKNOTE_AI_SERVER_BASE_URL: + process.env.NEXT_PUBLIC_BLOCKNOTE_AI_SERVER_BASE_URL, + }; + + const value = env[key as keyof typeof env]; + return value; +} diff --git a/examples/09-ai/02-playground/index.html b/examples/09-ai/02-playground/index.html new file mode 100644 index 0000000000..402f74d225 --- /dev/null +++ b/examples/09-ai/02-playground/index.html @@ -0,0 +1,14 @@ + + + + + + AI Playground + + +
+ + + diff --git a/examples/09-ai/02-playground/main.tsx b/examples/09-ai/02-playground/main.tsx new file mode 100644 index 0000000000..6284417d60 --- /dev/null +++ b/examples/09-ai/02-playground/main.tsx @@ -0,0 +1,11 @@ +// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY +import React from "react"; +import { createRoot } from "react-dom/client"; +import App from "./App.jsx"; + +const root = createRoot(document.getElementById("root")!); +root.render( + + + +); diff --git a/examples/09-ai/02-playground/package.json b/examples/09-ai/02-playground/package.json new file mode 100644 index 0000000000..f2874ba52c --- /dev/null +++ b/examples/09-ai/02-playground/package.json @@ -0,0 +1,36 @@ +{ + "name": "@blocknote/example-ai-playground", + "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", + "private": true, + "version": "0.12.4", + "scripts": { + "start": "vite", + "dev": "vite", + "build:prod": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@blocknote/core": "latest", + "@blocknote/react": "latest", + "@blocknote/ariakit": "latest", + "@blocknote/mantine": "latest", + "@blocknote/shadcn": "latest", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "@blocknote/xl-ai": "latest", + "@mantine/core": "^7.10.1", + "ai": "^4.3.15", + "@ai-sdk/openai": "^1.3.22", + "@ai-sdk/openai-compatible": "^0.2.14", + "@ai-sdk/groq": "^1.2.9", + "@ai-sdk/anthropic": "^1.2.11", + "@ai-sdk/mistral": "^1.2.8", + "zustand": "^5.0.3" + }, + "devDependencies": { + "@types/react": "^18.0.25", + "@types/react-dom": "^18.0.9", + "@vitejs/plugin-react": "^4.3.1", + "vite": "^5.3.4" + } +} \ No newline at end of file diff --git a/examples/09-ai/02-playground/tsconfig.json b/examples/09-ai/02-playground/tsconfig.json new file mode 100644 index 0000000000..dbe3e6f62d --- /dev/null +++ b/examples/09-ai/02-playground/tsconfig.json @@ -0,0 +1,36 @@ +{ + "__comment": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "lib": [ + "DOM", + "DOM.Iterable", + "ESNext" + ], + "allowJs": false, + "skipLibCheck": true, + "esModuleInterop": false, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "ESNext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + "composite": true + }, + "include": [ + "." + ], + "__ADD_FOR_LOCAL_DEV_references": [ + { + "path": "../../../packages/core/" + }, + { + "path": "../../../packages/react/" + } + ] +} \ No newline at end of file diff --git a/examples/09-ai/02-playground/vite.config.ts b/examples/09-ai/02-playground/vite.config.ts new file mode 100644 index 0000000000..f62ab20bc2 --- /dev/null +++ b/examples/09-ai/02-playground/vite.config.ts @@ -0,0 +1,32 @@ +// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY +import react from "@vitejs/plugin-react"; +import * as fs from "fs"; +import * as path from "path"; +import { defineConfig } from "vite"; +// import eslintPlugin from "vite-plugin-eslint"; +// https://vitejs.dev/config/ +export default defineConfig((conf) => ({ + plugins: [react()], + optimizeDeps: {}, + build: { + sourcemap: true, + }, + resolve: { + alias: + conf.command === "build" || + !fs.existsSync(path.resolve(__dirname, "../../packages/core/src")) + ? {} + : ({ + // Comment out the lines below to load a built version of blocknote + // or, keep as is to load live from sources with live reload working + "@blocknote/core": path.resolve( + __dirname, + "../../packages/core/src/" + ), + "@blocknote/react": path.resolve( + __dirname, + "../../packages/react/src/" + ), + } as any), + }, +})); diff --git a/examples/09-ai/03-custom-ai-menu-items/.bnexample.json b/examples/09-ai/03-custom-ai-menu-items/.bnexample.json new file mode 100644 index 0000000000..94929e4e36 --- /dev/null +++ b/examples/09-ai/03-custom-ai-menu-items/.bnexample.json @@ -0,0 +1,15 @@ +{ + "playground": true, + "docs": true, + "author": "matthewlipski", + "tags": ["AI", "llm"], + "dependencies": { + "@blocknote/xl-ai": "latest", + "@mantine/core": "^7.10.1", + "ai": "^4.1.0", + "@ai-sdk/openai": "^1.1.0", + "@ai-sdk/groq": "^1.1.0", + "react-icons": "^5.2.1", + "zustand": "^5.0.3" + } +} diff --git a/examples/09-ai/03-custom-ai-menu-items/App.tsx b/examples/09-ai/03-custom-ai-menu-items/App.tsx new file mode 100644 index 0000000000..39d05a116b --- /dev/null +++ b/examples/09-ai/03-custom-ai-menu-items/App.tsx @@ -0,0 +1,203 @@ +import { createGroq } from "@ai-sdk/groq"; +import { BlockNoteEditor, filterSuggestionItems } from "@blocknote/core"; +import "@blocknote/core/fonts/inter.css"; +import { en } from "@blocknote/core/locales"; +import { BlockNoteView } from "@blocknote/mantine"; +import "@blocknote/mantine/style.css"; +import { + FormattingToolbar, + FormattingToolbarController, + SuggestionMenuController, + getDefaultReactSlashMenuItems, + getFormattingToolbarItems, + useCreateBlockNote, +} from "@blocknote/react"; +import { + AIMenu, + AIMenuController, + AIToolbarButton, + locales as aiLocales, + createAIExtension, + createBlockNoteAIClient, + getAISlashMenuItems, + getDefaultAIMenuItems, +} from "@blocknote/xl-ai"; +import "@blocknote/xl-ai/style.css"; +import { getEnv } from "./getEnv.js"; + +import { addRelatedTopics, makeInformal } from "./customAIMenuItems.js"; + +// Optional: proxy requests through the `@blocknote/xl-ai-server` proxy server +// so that we don't have to expose our API keys to the client +const client = createBlockNoteAIClient({ + apiKey: getEnv("BLOCKNOTE_AI_SERVER_API_KEY") || "PLACEHOLDER", + baseURL: + getEnv("BLOCKNOTE_AI_SERVER_BASE_URL") || "https://localhost:3000/ai", +}); + +// Use an "open" model such as llama, in this case via groq.com +const model = createGroq({ + // call via our proxy client + ...client.getProviderSettings("groq"), +})("llama-3.3-70b-versatile"); + +/* +ALTERNATIVES: + +Call a model directly (without the proxy): + +const model = createGroq({ + apiKey: "", +})("llama-3.3-70b-versatile"); + +Or, use a different provider like OpenAI: + +const model = createOpenAI({ + ...client.getProviderSettings("openai"), +})("gpt-4", {}); +*/ + +export default function App() { + // Creates a new editor instance. + const editor = useCreateBlockNote({ + dictionary: { + ...en, + ai: aiLocales.en, // add default translations for the AI extension + }, + // Register the AI extension + extensions: [ + createAIExtension({ + model, + }), + ], + // We set some initial content for demo purposes + initialContent: [ + { + type: "heading", + props: { + level: 1, + }, + content: "I love cats", + }, + { + type: "paragraph", + content: + "Cats are one of the most beloved and fascinating animals in the world. Known for their agility, independence, and charm, cats have been companions to humans for thousands of years. Domesticated cats, scientifically named Felis catus, come in various breeds, colors, and personalities, making them a popular choice for pet owners everywhere. Their mysterious behavior, sharp reflexes, and quiet affection have earned them a special place in countless households.", + }, + { + type: "paragraph", + content: + "Beyond their role as pets, cats have a rich history and cultural significance. In ancient Egypt, they were revered and even worshipped as symbols of protection and grace. Throughout history, they’ve appeared in folklore, art, and literature, often associated with curiosity, luck, and mystery. Despite superstitions surrounding black cats in some cultures, many societies around the world admire and cherish these sleek and graceful animals.", + }, + { + type: "paragraph", + content: + "Cats also offer emotional and physical benefits to their owners. Studies have shown that interacting with cats can reduce stress, lower blood pressure, and improve mental well-being. Their gentle purring, playful antics, and warm companionship provide comfort to people of all ages. Whether lounging in the sun, chasing a toy, or curling up on a lap, cats bring joy, peace, and a bit of magic to the lives of those who welcome them into their homes.", + }, + ], + }); + + // Renders the editor instance using a React component. + return ( +
+ + {/* Creates a new AIMenu with the default items, + as well as our custom ones. */} + + + {/* We disabled the default formatting toolbar with `formattingToolbar=false` + and replace it for one with an "AI button" (defined below). + (See "Formatting Toolbar" in docs) + */} + + + {/* We disabled the default SlashMenu with `slashMenu=false` + and replace it for one with an AI option (defined below). + (See "Suggestion Menus" in docs) + */} + + +
+ ); +} + +function CustomAIMenu() { + return ( + , + aiResponseStatus: + | "user-input" + | "thinking" + | "ai-writing" + | "error" + | "user-reviewing" + | "closed", + ) => { + if (aiResponseStatus === "user-input") { + // Returns different items based on whether the AI Menu was + // opened via the Formatting Toolbar or the Slash Menu. + if (editor.getSelection()) { + return [ + // Gets the default AI Menu items + ...getDefaultAIMenuItems(editor, aiResponseStatus), + // Adds our custom item to make the text more casual. + // Only appears when the AI Menu is opened via the + // Formatting Toolbar. + makeInformal(editor), + ]; + } else { + return [ + // Gets the default AI Menu items + ...getDefaultAIMenuItems(editor, aiResponseStatus), + // Adds our custom item to find related topics. Only + // appears when the AI Menu is opened via the Slash + // Menu. + addRelatedTopics(editor), + ]; + } + } + // for other states, return the default items + return getDefaultAIMenuItems(editor, aiResponseStatus); + }} + /> + ); +} + +// Formatting toolbar with the `AIToolbarButton` added +function FormattingToolbarWithAI() { + return ( + ( + + {...getFormattingToolbarItems()} + + + )} + /> + ); +} + +// Slash menu with the AI option added +function SuggestionMenuWithAI(props: { + editor: BlockNoteEditor; +}) { + return ( + + filterSuggestionItems( + [ + ...getDefaultReactSlashMenuItems(props.editor), + ...getAISlashMenuItems(props.editor), + ], + query, + ) + } + /> + ); +} diff --git a/examples/09-ai/03-custom-ai-menu-items/README.md b/examples/09-ai/03-custom-ai-menu-items/README.md new file mode 100644 index 0000000000..96ccc89571 --- /dev/null +++ b/examples/09-ai/03-custom-ai-menu-items/README.md @@ -0,0 +1,10 @@ +# Adding AI Menu Items + +In this example, we add two items to the AI Menu. The first prompts the AI to make the selected text more casual, and can be found by selecting some text and click the AI (magic wand) button. The second prompts the AI to give ideas on related topics to extend the document with, and can be found by clicking the "Ask AI" Slash Menu item. + +Select some text and click the AI (magic wand) button, or type `/ai` anywhere in the editor to access AI functionality. + +**Relevant Docs:** + +- [Getting Stared with BlockNote AI](/docs/ai/setup) +- [Custom AI Menu Items](/docs/ai/custom-commands) diff --git a/examples/09-ai/03-custom-ai-menu-items/customAIMenuItems.tsx b/examples/09-ai/03-custom-ai-menu-items/customAIMenuItems.tsx new file mode 100644 index 0000000000..4752756416 --- /dev/null +++ b/examples/09-ai/03-custom-ai-menu-items/customAIMenuItems.tsx @@ -0,0 +1,63 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { AIMenuSuggestionItem, getAIExtension } from "@blocknote/xl-ai"; +import { RiApps2AddFill, RiEmotionHappyFill } from "react-icons/ri"; + +// Custom item to make the text more informal. +export const makeInformal = ( + editor: BlockNoteEditor, +): AIMenuSuggestionItem => ({ + key: "make_informal", + title: "Make Informal", + // Aliases used when filtering AI Menu items from + // text in prompt input. + aliases: ["informal", "make informal", "casual"], + icon: , + onItemClick: async () => { + await getAIExtension(editor).callLLM({ + userPrompt: "Give the selected text a more informal (casual) tone", + // Set to true to tell the LLM to specifically + // use the selected content as context. Defaults + // to false. + useSelection: true, + // Sets what operations the LLM is allowed to do. + // In this case, we only want to allow updating + // the selected content, so only `update` is set + // to true. Defaults to `true` for all + // operations. + defaultStreamTools: { + add: false, + delete: false, + update: true, + }, + }); + }, + size: "small", +}); + +// Custom item to write about related topics. +export const addRelatedTopics = ( + editor: BlockNoteEditor, +): AIMenuSuggestionItem => ({ + key: "add_related_topics", + title: "Add Related Topics", + // Aliases used when filtering AI Menu items from + // text in prompt input. + aliases: ["related topics", "find topics"], + icon: , + onItemClick: async () => { + await getAIExtension(editor).callLLM({ + userPrompt: + "Think of some related topics to the current text and write a sentence about each", + // Sets what operations the LLM is allowed to do. + // In this case, we only want to allow adding new + // content, so only `add` is set to true. + // Defaults to `true` for all operations. + defaultStreamTools: { + add: true, + delete: false, + update: false, + }, + }); + }, + size: "small", +}); diff --git a/examples/09-ai/03-custom-ai-menu-items/getEnv.ts b/examples/09-ai/03-custom-ai-menu-items/getEnv.ts new file mode 100644 index 0000000000..b225fc462e --- /dev/null +++ b/examples/09-ai/03-custom-ai-menu-items/getEnv.ts @@ -0,0 +1,20 @@ +// helper function to get env variables across next / vite +// only needed so this example works in BlockNote demos and docs +export function getEnv(key: string) { + const env = (import.meta as any).env + ? { + BLOCKNOTE_AI_SERVER_API_KEY: (import.meta as any).env + .VITE_BLOCKNOTE_AI_SERVER_API_KEY, + BLOCKNOTE_AI_SERVER_BASE_URL: (import.meta as any).env + .VITE_BLOCKNOTE_AI_SERVER_BASE_URL, + } + : { + BLOCKNOTE_AI_SERVER_API_KEY: + process.env.NEXT_PUBLIC_BLOCKNOTE_AI_SERVER_API_KEY, + BLOCKNOTE_AI_SERVER_BASE_URL: + process.env.NEXT_PUBLIC_BLOCKNOTE_AI_SERVER_BASE_URL, + }; + + const value = env[key as keyof typeof env]; + return value; +} diff --git a/examples/09-ai/03-custom-ai-menu-items/index.html b/examples/09-ai/03-custom-ai-menu-items/index.html new file mode 100644 index 0000000000..8a9ab3594f --- /dev/null +++ b/examples/09-ai/03-custom-ai-menu-items/index.html @@ -0,0 +1,14 @@ + + + + + + Adding AI Menu Items + + +
+ + + diff --git a/examples/09-ai/03-custom-ai-menu-items/main.tsx b/examples/09-ai/03-custom-ai-menu-items/main.tsx new file mode 100644 index 0000000000..6284417d60 --- /dev/null +++ b/examples/09-ai/03-custom-ai-menu-items/main.tsx @@ -0,0 +1,11 @@ +// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY +import React from "react"; +import { createRoot } from "react-dom/client"; +import App from "./App.jsx"; + +const root = createRoot(document.getElementById("root")!); +root.render( + + + +); diff --git a/examples/09-ai/03-custom-ai-menu-items/package.json b/examples/09-ai/03-custom-ai-menu-items/package.json new file mode 100644 index 0000000000..6a2f4b2b77 --- /dev/null +++ b/examples/09-ai/03-custom-ai-menu-items/package.json @@ -0,0 +1,34 @@ +{ + "name": "@blocknote/example-ai-ai-menu-items", + "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", + "private": true, + "version": "0.12.4", + "scripts": { + "start": "vite", + "dev": "vite", + "build:prod": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@blocknote/core": "latest", + "@blocknote/react": "latest", + "@blocknote/ariakit": "latest", + "@blocknote/mantine": "latest", + "@blocknote/shadcn": "latest", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "@blocknote/xl-ai": "latest", + "@mantine/core": "^7.10.1", + "ai": "^4.1.0", + "@ai-sdk/openai": "^1.1.0", + "@ai-sdk/groq": "^1.1.0", + "react-icons": "^5.2.1", + "zustand": "^5.0.3" + }, + "devDependencies": { + "@types/react": "^18.0.25", + "@types/react-dom": "^18.0.9", + "@vitejs/plugin-react": "^4.3.1", + "vite": "^5.3.4" + } +} \ No newline at end of file diff --git a/examples/09-ai/03-custom-ai-menu-items/tsconfig.json b/examples/09-ai/03-custom-ai-menu-items/tsconfig.json new file mode 100644 index 0000000000..dbe3e6f62d --- /dev/null +++ b/examples/09-ai/03-custom-ai-menu-items/tsconfig.json @@ -0,0 +1,36 @@ +{ + "__comment": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "lib": [ + "DOM", + "DOM.Iterable", + "ESNext" + ], + "allowJs": false, + "skipLibCheck": true, + "esModuleInterop": false, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "ESNext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + "composite": true + }, + "include": [ + "." + ], + "__ADD_FOR_LOCAL_DEV_references": [ + { + "path": "../../../packages/core/" + }, + { + "path": "../../../packages/react/" + } + ] +} \ No newline at end of file diff --git a/examples/09-ai/03-custom-ai-menu-items/vite.config.ts b/examples/09-ai/03-custom-ai-menu-items/vite.config.ts new file mode 100644 index 0000000000..f62ab20bc2 --- /dev/null +++ b/examples/09-ai/03-custom-ai-menu-items/vite.config.ts @@ -0,0 +1,32 @@ +// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY +import react from "@vitejs/plugin-react"; +import * as fs from "fs"; +import * as path from "path"; +import { defineConfig } from "vite"; +// import eslintPlugin from "vite-plugin-eslint"; +// https://vitejs.dev/config/ +export default defineConfig((conf) => ({ + plugins: [react()], + optimizeDeps: {}, + build: { + sourcemap: true, + }, + resolve: { + alias: + conf.command === "build" || + !fs.existsSync(path.resolve(__dirname, "../../packages/core/src")) + ? {} + : ({ + // Comment out the lines below to load a built version of blocknote + // or, keep as is to load live from sources with live reload working + "@blocknote/core": path.resolve( + __dirname, + "../../packages/core/src/" + ), + "@blocknote/react": path.resolve( + __dirname, + "../../packages/react/src/" + ), + } as any), + }, +})); diff --git a/examples/vanilla-js/react-vanilla-custom-blocks/package.json b/examples/vanilla-js/react-vanilla-custom-blocks/package.json index e33728d57c..6349cd5574 100644 --- a/examples/vanilla-js/react-vanilla-custom-blocks/package.json +++ b/examples/vanilla-js/react-vanilla-custom-blocks/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-react-vanilla-custom-blocks", + "name": "@blocknote/example-vanilla-js-react-vanilla-custom-blocks", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/vanilla-js/react-vanilla-custom-inline-content/package.json b/examples/vanilla-js/react-vanilla-custom-inline-content/package.json index 132a7e48f8..e8664135bd 100644 --- a/examples/vanilla-js/react-vanilla-custom-inline-content/package.json +++ b/examples/vanilla-js/react-vanilla-custom-inline-content/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-react-vanilla-custom-inline-content", + "name": "@blocknote/example-vanilla-js-react-vanilla-custom-inline-content", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/examples/vanilla-js/react-vanilla-custom-styles/App.tsx b/examples/vanilla-js/react-vanilla-custom-styles/App.tsx index 96ddc2c4fe..3d64681178 100644 --- a/examples/vanilla-js/react-vanilla-custom-styles/App.tsx +++ b/examples/vanilla-js/react-vanilla-custom-styles/App.tsx @@ -4,6 +4,8 @@ import { defaultStyleSpecs, } from "@blocknote/core"; import "@blocknote/core/fonts/inter.css"; +import { BlockNoteView } from "@blocknote/mantine"; +import "@blocknote/mantine/style.css"; import { FormattingToolbar, FormattingToolbarController, @@ -13,8 +15,6 @@ import { useComponentsContext, useCreateBlockNote, } from "@blocknote/react"; -import { BlockNoteView } from "@blocknote/mantine"; -import "@blocknote/mantine/style.css"; const small = createStyleSpec( { diff --git a/examples/vanilla-js/react-vanilla-custom-styles/package.json b/examples/vanilla-js/react-vanilla-custom-styles/package.json index 358013df6f..a3c95ac913 100644 --- a/examples/vanilla-js/react-vanilla-custom-styles/package.json +++ b/examples/vanilla-js/react-vanilla-custom-styles/package.json @@ -1,5 +1,5 @@ { - "name": "@blocknote/example-react-vanilla-custom-styles", + "name": "@blocknote/example-vanilla-js-react-vanilla-custom-styles", "description": "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", "private": true, "version": "0.12.4", diff --git a/package.json b/package.json index 1a95339eb6..a4fa628456 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,5 @@ { + "name": "root", "devDependencies": { "@nx/js": "20.6.4", "@typescript-eslint/eslint-plugin": "^5.5.0", @@ -16,7 +17,6 @@ "vitest": "^2.0.3", "wait-on": "8.0.3" }, - "name": "root", "pnpm": { "ignoredBuiltDependencies": [ "sharp", diff --git a/packages/ariakit/src/input/TextInput.tsx b/packages/ariakit/src/input/TextInput.tsx index 9da81c8f15..d4b9817f4a 100644 --- a/packages/ariakit/src/input/TextInput.tsx +++ b/packages/ariakit/src/input/TextInput.tsx @@ -15,13 +15,17 @@ export const TextInput = forwardRef< className, name, label, + variant, icon, value, autoFocus, placeholder, + disabled, onKeyDown, onChange, onSubmit, + autoComplete, + rightSection, ...rest } = props; @@ -33,16 +37,23 @@ export const TextInput = forwardRef<
{icon} + {rightSection}
); diff --git a/packages/ariakit/src/style.css b/packages/ariakit/src/style.css index c1ec4bc105..23ab0d04fa 100644 --- a/packages/ariakit/src/style.css +++ b/packages/ariakit/src/style.css @@ -11,6 +11,10 @@ gap: 0.5rem; } +.bn-ak-input-wrapper svg { + width: 24px; +} + .bn-ak-toolbar { height: fit-content; overflow: scroll; @@ -68,9 +72,11 @@ overflow: visible; } -.bn-ariakit .bn-suggestion-menu { +.bn-ariakit .bn-suggestion-menu, +.bn-ariakit .ai-suggestion-menu { height: fit-content; max-height: inherit; + overflow: auto; } .bn-ariakit .bn-color-picker-dropdown { @@ -81,14 +87,31 @@ flex: 1; } +.bn-suggestion-menu-item-small .bn-ak-suggestion-menu-item-title { + font-size: 0.875rem; +} + .bn-ak-suggestion-menu-item-subtitle { font-size: 0.7rem; } +.bn-suggestion-menu-item-small .bn-ak-suggestion-menu-item-subtitle { + display: none; +} + .bn-ak-suggestion-menu-item-section[data-position="left"] { + align-items: center; + display: flex; + justify-content: center; + padding: 8px; } +.bn-suggestion-menu-item-small + .bn-ak-suggestion-menu-item-section[data-position="left"] { + padding: 0; +} + .bn-ak-suggestion-menu-item-section[data-position="right"] { --border: rgb(0 0 0/13%); --highlight: rgb(255 255 255/20%); @@ -103,6 +126,24 @@ padding-inline: 4px; } +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} + +.bn-ariakit .bn-suggestion-menu-loader { + align-items: center; + animation: spin 1s linear infinite; + display: flex; + height: 16px; + justify-content: center; + width: 16px; +} + .bn-ariakit .bn-grid-suggestion-menu { background: var(--bn-colors-menu-background); border-radius: var(--bn-border-radius-large); @@ -309,6 +350,48 @@ padding: 0; } +.bn-ariakit .bn-combobox .bn-ak-input-wrapper { + display: flex; + border-radius: 0.5rem; + border-width: 1px; + border-style: solid; + border-color: hsl(204 20% 88%); + background-color: hsl(204 20% 100%); + padding: 0.5rem; + color: hsl(204 4% 0%); + box-shadow: + 0 10px 15px -3px rgb(0 0 0 / 0.1), + 0 4px 6px -4px rgb(0 0 0 / 0.1); +} + +.bn-ariakit .bn-combobox .bn-ak-input-wrapper:where(.dark, .dark *) { + border-color: hsl(204 4% 24%); + background-color: hsl(204 4% 16%); + color: hsl(204 20% 100%); + box-shadow: + 0 10px 15px -3px rgb(0 0 0 / 0.25), + 0 4px 6px -4px rgb(0 0 0 / 0.1); +} + +.bn-ariakit .bn-combobox .bn-ak-input { + background: transparent; + border: none; + box-shadow: none; + outline: none; +} + +.bn-ariakit .bn-combobox .bn-combobox-icon, +.bn-ariakit .bn-combobox .bn-combobox-right-section { + align-items: start; + display: flex; + justify-content: center; + width: 24px; +} + +.bn-ariakit .bn-combobox .bn-combobox-error { + color: var(--bn-colors-highlights-red-background); +} + .bn-ariakit .bn-comment-actions-wrapper { align-items: start; display: flex; diff --git a/packages/ariakit/src/suggestionMenu/SuggestionMenuItem.tsx b/packages/ariakit/src/suggestionMenu/SuggestionMenuItem.tsx index fab49329f4..68e3c6a7d4 100644 --- a/packages/ariakit/src/suggestionMenu/SuggestionMenuItem.tsx +++ b/packages/ariakit/src/suggestionMenu/SuggestionMenuItem.tsx @@ -19,7 +19,7 @@ export const SuggestionMenuItem = forwardRef< const overflow = elementOverflow( itemRef.current, - document.querySelector(".bn-suggestion-menu")!, + document.querySelector(".bn-suggestion-menu, #ai-suggestion-menu")!, // TODO ); if (overflow === "top") { @@ -34,6 +34,7 @@ export const SuggestionMenuItem = forwardRef< className={mergeCSSClasses("bn-ak-menu-item", className || "")} ref={mergeRefs([ref, itemRef])} id={id} + onMouseDown={(event) => event.preventDefault()} onClick={onClick} role="option" aria-selected={isSelected || undefined} diff --git a/packages/ariakit/src/suggestionMenu/SuggestionMenuLoader.tsx b/packages/ariakit/src/suggestionMenu/SuggestionMenuLoader.tsx index ff43ed5ea8..987142824b 100644 --- a/packages/ariakit/src/suggestionMenu/SuggestionMenuLoader.tsx +++ b/packages/ariakit/src/suggestionMenu/SuggestionMenuLoader.tsx @@ -6,13 +6,22 @@ export const SuggestionMenuLoader = forwardRef< HTMLDivElement, ComponentProps["SuggestionMenu"]["Loader"] >((props, ref) => { - const { className, children, ...rest } = props; + const { className, ...rest } = props; assertEmpty(rest); return (
- {children} + {/* Taken from Google Material Icons */} + {/* https://fonts.google.com/icons?selected=Material+Symbols+Rounded:progress_activity:FILL@0;wght@400;GRAD@0;opsz@24&icon.query=load&icon.size=24&icon.color=%23e8eaed&icon.set=Material+Symbols&icon.style=Rounded&icon.platform=web */} + + +
); }); diff --git a/packages/ariakit/src/toolbar/Toolbar.tsx b/packages/ariakit/src/toolbar/Toolbar.tsx index be498bc6ed..0d2e38e345 100644 --- a/packages/ariakit/src/toolbar/Toolbar.tsx +++ b/packages/ariakit/src/toolbar/Toolbar.tsx @@ -4,8 +4,7 @@ import { assertEmpty, mergeCSSClasses } from "@blocknote/core"; import { ComponentProps } from "@blocknote/react"; import { forwardRef } from "react"; -type ToolbarProps = ComponentProps["FormattingToolbar"]["Root"] & - ComponentProps["LinkToolbar"]["Root"]; +type ToolbarProps = ComponentProps["Generic"]["Toolbar"]["Root"]; export const Toolbar = forwardRef( (props, ref) => { diff --git a/packages/ariakit/src/toolbar/ToolbarButton.tsx b/packages/ariakit/src/toolbar/ToolbarButton.tsx index ad4e15f0a9..0fddcb5905 100644 --- a/packages/ariakit/src/toolbar/ToolbarButton.tsx +++ b/packages/ariakit/src/toolbar/ToolbarButton.tsx @@ -9,8 +9,7 @@ import { assertEmpty, isSafari, mergeCSSClasses } from "@blocknote/core"; import { ComponentProps } from "@blocknote/react"; import { forwardRef } from "react"; -type ToolbarButtonProps = ComponentProps["FormattingToolbar"]["Button"] & - ComponentProps["LinkToolbar"]["Button"]; +type ToolbarButtonProps = ComponentProps["Generic"]["Toolbar"]["Button"]; /** * Helper for basic buttons that show in the formatting toolbar. diff --git a/packages/core/package.json b/packages/core/package.json index 0632fe0724..a2d30c886d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -88,7 +88,6 @@ "@tiptap/extension-strike": "^2.11.5", "@tiptap/extension-table-cell": "^2.11.5", "@tiptap/extension-table-header": "^2.11.5", - "@tiptap/extension-table-row": "^2.11.5", "@tiptap/extension-text": "^2.11.5", "@tiptap/extension-underline": "^2.11.5", "@tiptap/pm": "^2.11.5", @@ -99,7 +98,7 @@ "prosemirror-model": "^1.25.1", "prosemirror-state": "^1.4.3", "prosemirror-tables": "^1.6.4", - "prosemirror-transform": "^1.10.2", + "prosemirror-transform": "^1.10.4", "prosemirror-view": "^1.38.1", "rehype-format": "^5.0.1", "rehype-parse": "^9.0.1", diff --git a/packages/core/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts b/packages/core/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts index 0daf3a4517..56163fdcc5 100644 --- a/packages/core/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +++ b/packages/core/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts @@ -1,5 +1,6 @@ import { Fragment, Slice } from "prosemirror-model"; - +import type { Transaction } from "prosemirror-state"; +import { ReplaceStep } from "prosemirror-transform"; import { Block, PartialBlock } from "../../../../blocks/defaultBlocks.js"; import { BlockIdentifier, @@ -10,8 +11,6 @@ import { import { blockToNode } from "../../../nodeConversions/blockToNode.js"; import { nodeToBlock } from "../../../nodeConversions/nodeToBlock.js"; import { getNodeById } from "../../../nodeUtil.js"; -import { ReplaceStep } from "prosemirror-transform"; -import type { Transaction } from "prosemirror-state"; import { getPmSchema } from "../../../pmUtil.js"; export function insertBlocks< diff --git a/packages/core/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts b/packages/core/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts index afa97afe04..2bfdba24e5 100644 --- a/packages/core/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +++ b/packages/core/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts @@ -105,4 +105,4 @@ export function removeAndInsertBlocks< ); return { insertedBlocks, removedBlocks }; -} +} \ No newline at end of file diff --git a/packages/core/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap b/packages/core/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap index 4849b8bebe..87d1cedfce 100644 --- a/packages/core/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +++ b/packages/core/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap @@ -6722,6 +6722,2822 @@ exports[`Test updateBlock > Update no content to table content 2`] = ` ] `; +exports[`Test updateBlock > Update partial (offset start + end) 1`] = ` +[ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 0", + "type": "text", + }, + ], + "id": "paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 1", + "type": "text", + }, + ], + "id": "paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [ + { + "children": [ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Double Nested Paragraph 0", + "type": "text", + }, + ], + "id": "double-nested-paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 0", + "type": "text", + }, + ], + "id": "nested-paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Paragraph with children", + "type": "text", + }, + ], + "id": "paragraph-with-children", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 2", + "type": "text", + }, + ], + "id": "paragraph-2", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph with props", + "type": "text", + }, + ], + "id": "paragraph-with-props", + "props": { + "backgroundColor": "default", + "textAlignment": "center", + "textColor": "red", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 3", + "type": "text", + }, + ], + "id": "paragraph-3", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": { + "bold": true, + }, + "text": "Paragraph", + "type": "text", + }, + { + "styles": {}, + "text": " with styled ", + "type": "text", + }, + { + "styles": { + "italic": true, + }, + "text": "content", + "type": "text", + }, + ], + "id": "paragraph-with-styled-content", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 4", + "type": "text", + }, + ], + "id": "paragraph-4", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Heading 1", + "type": "text", + }, + ], + "id": "heading-0", + "props": { + "backgroundColor": "default", + "level": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 5", + "type": "text", + }, + ], + "id": "paragraph-5", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": undefined, + "id": "image-0", + "props": { + "backgroundColor": "default", + "caption": "", + "name": "", + "showPreview": true, + "textAlignment": "left", + "url": "https://via.placeholder.com/150", + }, + "type": "image", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 6", + "type": "text", + }, + ], + "id": "paragraph-6", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": { + "columnWidths": [ + undefined, + undefined, + undefined, + ], + "headerCols": undefined, + "headerRows": undefined, + "rows": [ + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "Cell 1", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 2", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 3", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "Cell 4", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 5", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 6", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "Cell 7", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 8", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 9", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + ], + "type": "tableContent", + }, + "id": "table-0", + "props": { + "textColor": "default", + }, + "type": "table", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 7", + "type": "text", + }, + ], + "id": "paragraph-7", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [], + "id": "empty-paragraph", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 8", + "type": "text", + }, + ], + "id": "paragraph-8", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [ + { + "children": [ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Double Nested Paragraph 1", + "type": "text", + }, + ], + "id": "double-nested-paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 1", + "type": "text", + }, + ], + "id": "nested-paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": { + "bold": true, + }, + "text": "Heading", + "type": "text", + }, + { + "styles": {}, + "text": " without styles and with styled ", + "type": "text", + }, + { + "styles": { + "italic": true, + }, + "text": "content", + "type": "text", + }, + ], + "id": "heading-with-everything", + "props": { + "backgroundColor": "red", + "level": 2, + "textAlignment": "center", + "textColor": "red", + }, + "type": "heading", + }, + { + "children": [], + "content": [], + "id": "trailing-paragraph", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, +] +`; + +exports[`Test updateBlock > Update partial (offset start) 1`] = ` +[ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 0", + "type": "text", + }, + ], + "id": "paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 1", + "type": "text", + }, + ], + "id": "paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [ + { + "children": [ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Double Nested Paragraph 0", + "type": "text", + }, + ], + "id": "double-nested-paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 0", + "type": "text", + }, + ], + "id": "nested-paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Paragraph with children", + "type": "text", + }, + ], + "id": "paragraph-with-children", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 2", + "type": "text", + }, + ], + "id": "paragraph-2", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph with props", + "type": "text", + }, + ], + "id": "paragraph-with-props", + "props": { + "backgroundColor": "default", + "textAlignment": "center", + "textColor": "red", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 3", + "type": "text", + }, + ], + "id": "paragraph-3", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": { + "bold": true, + }, + "text": "Paragraph", + "type": "text", + }, + { + "styles": {}, + "text": " with styled ", + "type": "text", + }, + { + "styles": { + "italic": true, + }, + "text": "content", + "type": "text", + }, + ], + "id": "paragraph-with-styled-content", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 4", + "type": "text", + }, + ], + "id": "paragraph-4", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Heading 1", + "type": "text", + }, + ], + "id": "heading-0", + "props": { + "backgroundColor": "default", + "level": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 5", + "type": "text", + }, + ], + "id": "paragraph-5", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": undefined, + "id": "image-0", + "props": { + "backgroundColor": "default", + "caption": "", + "name": "", + "showPreview": true, + "textAlignment": "left", + "url": "https://via.placeholder.com/150", + }, + "type": "image", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 6", + "type": "text", + }, + ], + "id": "paragraph-6", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": { + "columnWidths": [ + undefined, + undefined, + undefined, + ], + "headerCols": undefined, + "headerRows": undefined, + "rows": [ + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "Cell 1", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 2", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 3", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "Cell 4", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 5", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 6", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "Cell 7", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 8", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 9", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + ], + "type": "tableContent", + }, + "id": "table-0", + "props": { + "textColor": "default", + }, + "type": "table", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 7", + "type": "text", + }, + ], + "id": "paragraph-7", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [], + "id": "empty-paragraph", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 8", + "type": "text", + }, + ], + "id": "paragraph-8", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [ + { + "children": [ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Double Nested Paragraph 1", + "type": "text", + }, + ], + "id": "double-nested-paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 1", + "type": "text", + }, + ], + "id": "nested-paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": { + "bold": true, + }, + "text": "Heading", + "type": "text", + }, + { + "styles": {}, + "text": " without styles", + "type": "text", + }, + ], + "id": "heading-with-everything", + "props": { + "backgroundColor": "red", + "level": 2, + "textAlignment": "center", + "textColor": "red", + }, + "type": "heading", + }, + { + "children": [], + "content": [], + "id": "trailing-paragraph", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, +] +`; + +exports[`Test updateBlock > Update partial (props + offset end) 1`] = ` +[ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 0", + "type": "text", + }, + ], + "id": "paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 1", + "type": "text", + }, + ], + "id": "paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [ + { + "children": [ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Double Nested Paragraph 0", + "type": "text", + }, + ], + "id": "double-nested-paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 0", + "type": "text", + }, + ], + "id": "nested-paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Paragraph with children", + "type": "text", + }, + ], + "id": "paragraph-with-children", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 2", + "type": "text", + }, + ], + "id": "paragraph-2", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph with props", + "type": "text", + }, + ], + "id": "paragraph-with-props", + "props": { + "backgroundColor": "default", + "textAlignment": "center", + "textColor": "red", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 3", + "type": "text", + }, + ], + "id": "paragraph-3", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": { + "bold": true, + }, + "text": "Paragraph", + "type": "text", + }, + { + "styles": {}, + "text": " with styled ", + "type": "text", + }, + { + "styles": { + "italic": true, + }, + "text": "content", + "type": "text", + }, + ], + "id": "paragraph-with-styled-content", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 4", + "type": "text", + }, + ], + "id": "paragraph-4", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Heading 1", + "type": "text", + }, + ], + "id": "heading-0", + "props": { + "backgroundColor": "default", + "level": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 5", + "type": "text", + }, + ], + "id": "paragraph-5", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": undefined, + "id": "image-0", + "props": { + "backgroundColor": "default", + "caption": "", + "name": "", + "showPreview": true, + "textAlignment": "left", + "url": "https://via.placeholder.com/150", + }, + "type": "image", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 6", + "type": "text", + }, + ], + "id": "paragraph-6", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": { + "columnWidths": [ + undefined, + undefined, + undefined, + ], + "headerCols": undefined, + "headerRows": undefined, + "rows": [ + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "Cell 1", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 2", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 3", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "Cell 4", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 5", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 6", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "Cell 7", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 8", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 9", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + ], + "type": "tableContent", + }, + "id": "table-0", + "props": { + "textColor": "default", + }, + "type": "table", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 7", + "type": "text", + }, + ], + "id": "paragraph-7", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [], + "id": "empty-paragraph", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 8", + "type": "text", + }, + ], + "id": "paragraph-8", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [ + { + "children": [ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Double Nested Paragraph 1", + "type": "text", + }, + ], + "id": "double-nested-paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 1", + "type": "text", + }, + ], + "id": "nested-paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Title with styled ", + "type": "text", + }, + { + "styles": { + "italic": true, + }, + "text": "content", + "type": "text", + }, + ], + "id": "heading-with-everything", + "props": { + "backgroundColor": "red", + "level": 1, + "textAlignment": "center", + "textColor": "red", + }, + "type": "heading", + }, + { + "children": [], + "content": [], + "id": "trailing-paragraph", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, +] +`; + +exports[`Test updateBlock > Update partial (table cell) 1`] = ` +[ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 0", + "type": "text", + }, + ], + "id": "paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 1", + "type": "text", + }, + ], + "id": "paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [ + { + "children": [ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Double Nested Paragraph 0", + "type": "text", + }, + ], + "id": "double-nested-paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 0", + "type": "text", + }, + ], + "id": "nested-paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Paragraph with children", + "type": "text", + }, + ], + "id": "paragraph-with-children", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 2", + "type": "text", + }, + ], + "id": "paragraph-2", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph with props", + "type": "text", + }, + ], + "id": "paragraph-with-props", + "props": { + "backgroundColor": "default", + "textAlignment": "center", + "textColor": "red", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 3", + "type": "text", + }, + ], + "id": "paragraph-3", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": { + "bold": true, + }, + "text": "Paragraph", + "type": "text", + }, + { + "styles": {}, + "text": " with styled ", + "type": "text", + }, + { + "styles": { + "italic": true, + }, + "text": "content", + "type": "text", + }, + ], + "id": "paragraph-with-styled-content", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 4", + "type": "text", + }, + ], + "id": "paragraph-4", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Heading 1", + "type": "text", + }, + ], + "id": "heading-0", + "props": { + "backgroundColor": "default", + "level": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 5", + "type": "text", + }, + ], + "id": "paragraph-5", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": undefined, + "id": "image-0", + "props": { + "backgroundColor": "default", + "caption": "", + "name": "", + "showPreview": true, + "textAlignment": "left", + "url": "https://via.placeholder.com/150", + }, + "type": "image", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 6", + "type": "text", + }, + ], + "id": "paragraph-6", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": { + "columnWidths": [ + undefined, + undefined, + undefined, + ], + "headerCols": undefined, + "headerRows": undefined, + "rows": [ + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "updated cell 1", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 2", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 3", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "Cell 4", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 5", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 6", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "Cell 7", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 8", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 9", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + ], + "type": "tableContent", + }, + "id": "table-0", + "props": { + "textColor": "default", + }, + "type": "table", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 7", + "type": "text", + }, + ], + "id": "paragraph-7", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [], + "id": "empty-paragraph", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 8", + "type": "text", + }, + ], + "id": "paragraph-8", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [ + { + "children": [ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Double Nested Paragraph 1", + "type": "text", + }, + ], + "id": "double-nested-paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 1", + "type": "text", + }, + ], + "id": "nested-paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": { + "bold": true, + }, + "text": "Heading", + "type": "text", + }, + { + "styles": {}, + "text": " with styled ", + "type": "text", + }, + { + "styles": { + "italic": true, + }, + "text": "content", + "type": "text", + }, + ], + "id": "heading-with-everything", + "props": { + "backgroundColor": "red", + "level": 2, + "textAlignment": "center", + "textColor": "red", + }, + "type": "heading", + }, + { + "children": [], + "content": [], + "id": "trailing-paragraph", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, +] +`; + +exports[`Test updateBlock > Update partial (table row) 1`] = ` +[ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 0", + "type": "text", + }, + ], + "id": "paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 1", + "type": "text", + }, + ], + "id": "paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [ + { + "children": [ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Double Nested Paragraph 0", + "type": "text", + }, + ], + "id": "double-nested-paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 0", + "type": "text", + }, + ], + "id": "nested-paragraph-0", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Paragraph with children", + "type": "text", + }, + ], + "id": "paragraph-with-children", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 2", + "type": "text", + }, + ], + "id": "paragraph-2", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph with props", + "type": "text", + }, + ], + "id": "paragraph-with-props", + "props": { + "backgroundColor": "default", + "textAlignment": "center", + "textColor": "red", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 3", + "type": "text", + }, + ], + "id": "paragraph-3", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": { + "bold": true, + }, + "text": "Paragraph", + "type": "text", + }, + { + "styles": {}, + "text": " with styled ", + "type": "text", + }, + { + "styles": { + "italic": true, + }, + "text": "content", + "type": "text", + }, + ], + "id": "paragraph-with-styled-content", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 4", + "type": "text", + }, + ], + "id": "paragraph-4", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Heading 1", + "type": "text", + }, + ], + "id": "heading-0", + "props": { + "backgroundColor": "default", + "level": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "heading", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 5", + "type": "text", + }, + ], + "id": "paragraph-5", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": undefined, + "id": "image-0", + "props": { + "backgroundColor": "default", + "caption": "", + "name": "", + "showPreview": true, + "textAlignment": "left", + "url": "https://via.placeholder.com/150", + }, + "type": "image", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 6", + "type": "text", + }, + ], + "id": "paragraph-6", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": { + "columnWidths": [ + undefined, + undefined, + undefined, + ], + "headerCols": undefined, + "headerRows": undefined, + "rows": [ + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "updated cell 1", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "updated cell 2", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "updated cell 3", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "Cell 4", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 5", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 6", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + { + "cells": [ + { + "content": [ + { + "styles": {}, + "text": "Cell 7", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 8", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + { + "content": [ + { + "styles": {}, + "text": "Cell 9", + "type": "text", + }, + ], + "props": { + "backgroundColor": "default", + "colspan": 1, + "rowspan": 1, + "textAlignment": "left", + "textColor": "default", + }, + "type": "tableCell", + }, + ], + }, + ], + "type": "tableContent", + }, + "id": "table-0", + "props": { + "textColor": "default", + }, + "type": "table", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 7", + "type": "text", + }, + ], + "id": "paragraph-7", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [], + "id": "empty-paragraph", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 8", + "type": "text", + }, + ], + "id": "paragraph-8", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [ + { + "children": [ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Double Nested Paragraph 1", + "type": "text", + }, + ], + "id": "double-nested-paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 1", + "type": "text", + }, + ], + "id": "nested-paragraph-1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": { + "bold": true, + }, + "text": "Heading", + "type": "text", + }, + { + "styles": {}, + "text": " with styled ", + "type": "text", + }, + { + "styles": { + "italic": true, + }, + "text": "content", + "type": "text", + }, + ], + "id": "heading-with-everything", + "props": { + "backgroundColor": "red", + "level": 2, + "textAlignment": "center", + "textColor": "red", + }, + "type": "heading", + }, + { + "children": [], + "content": [], + "id": "trailing-paragraph", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, +] +`; + exports[`Test updateBlock > Update single prop 1`] = ` { "children": [ diff --git a/packages/core/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts b/packages/core/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts index 0cc82a15a2..95ea4dc4e7 100644 --- a/packages/core/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts +++ b/packages/core/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts @@ -1,5 +1,7 @@ import { describe, expect, it } from "vitest"; +import { getBlockInfo } from "../../../getBlockInfoFromPos.js"; +import { getNodeById } from "../../../nodeUtil.js"; import { setupTestEnv } from "../../setupTestEnv.js"; import { updateBlock } from "./updateBlock.js"; @@ -173,6 +175,162 @@ describe("Test updateBlock", () => { expect(getEditor().document).toMatchSnapshot(); }); + it("Update partial (offset start)", () => { + const info = getBlockInfo( + getNodeById("heading-with-everything", getEditor().prosemirrorState.doc)!, + ); + + if (!info.isBlockContainer) { + throw new Error("heading-with-everything is not a block container"); + } + + getEditor().transact((tr) => + updateBlock( + tr, + "heading-with-everything", + { + content: [ + { + type: "text", + text: "without styles", + styles: {}, + }, + ], + }, + info.blockContent.beforePos + 9, + ), + ); + + expect(getEditor().document).toMatchSnapshot(); + }); + + it("Update partial (offset start + end)", () => { + const info = getBlockInfo( + getNodeById("heading-with-everything", getEditor().prosemirrorState.doc)!, + ); + + if (!info.isBlockContainer) { + throw new Error("heading-with-everything is not a block container"); + } + + getEditor().transact((tr) => + updateBlock( + tr, + "heading-with-everything", + { + content: [ + { + type: "text", + text: "without styles and ", + styles: {}, + }, + ], + }, + info.blockContent.beforePos + 9, + info.blockContent.beforePos + 9, + ), + ); + + expect(getEditor().document).toMatchSnapshot(); + }); + + it("Update partial (props + offset end)", () => { + const info = getBlockInfo( + getNodeById("heading-with-everything", getEditor().prosemirrorState.doc)!, + ); + + if (!info.isBlockContainer) { + throw new Error("heading-with-everything is not a block container"); + } + + getEditor().transact((tr) => { + updateBlock( + tr, + "heading-with-everything", + { + props: { + level: 1, + }, + content: [ + { + type: "text", + text: "Title", + styles: {}, + }, + ], + }, + undefined, + info.blockContent.beforePos + 8, + ); + }); + + expect(getEditor().document).toMatchSnapshot(); + }); + + it("Update partial (table cell)", () => { + const info = getBlockInfo( + getNodeById("table-0", getEditor().prosemirrorState.doc)!, + ); + + if (!info.isBlockContainer) { + throw new Error("table-0 is not a block container"); + } + + const cell = info.blockContent.node.resolve(2); + + getEditor().transact((tr) => + updateBlock( + tr, + "table-0", + { + type: "table", + content: { + type: "tableContent", + rows: [{ cells: ["updated cell 1"] }], + }, + }, + info.blockContent.beforePos + 2, + info.blockContent.beforePos + 2 + cell.node().nodeSize, + ), + ); + + expect(getEditor().document).toMatchSnapshot(); + }); + + it("Update partial (table row)", () => { + const info = getBlockInfo( + getNodeById("table-0", getEditor().prosemirrorState.doc)!, + ); + + if (!info.isBlockContainer) { + throw new Error("table-0 is not a block container"); + } + + const cell = info.blockContent.node.resolve(1); + + getEditor().transact((tr) => + updateBlock( + tr, + "table-0", + { + type: "table", + content: { + type: "tableContent", + rows: [ + { + cells: ["updated cell 1", "updated cell 2", "updated cell 3"], + }, + ], + }, + }, + info.blockContent.beforePos + 1, + info.blockContent.beforePos + 1 + cell.node().nodeSize, + ), + ); + + expect(getEditor().document).toMatchSnapshot(); + }); + it("Update children", () => { expect( getEditor().transact((tr) => diff --git a/packages/core/src/api/blockManipulation/commands/updateBlock/updateBlock.ts b/packages/core/src/api/blockManipulation/commands/updateBlock/updateBlock.ts index 8510f8974d..663d63a542 100644 --- a/packages/core/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +++ b/packages/core/src/api/blockManipulation/commands/updateBlock/updateBlock.ts @@ -6,7 +6,7 @@ import { } from "prosemirror-model"; import type { Transaction } from "prosemirror-state"; -import { ReplaceStep } from "prosemirror-transform"; +import { ReplaceStep, Transform } from "prosemirror-transform"; import type { Block, PartialBlock } from "../../../../blocks/defaultBlocks.js"; import type { BlockIdentifier, @@ -28,6 +28,7 @@ import { nodeToBlock } from "../../../nodeConversions/nodeToBlock.js"; import { getNodeById } from "../../../nodeUtil.js"; import { getPmSchema } from "../../../pmUtil.js"; +// for compatibility with tiptap. TODO: remove as we want to remove dependency on tiptap command interface export const updateBlockCommand = < BSchema extends BlockSchema, I extends InlineContentSchema, @@ -50,18 +51,29 @@ export const updateBlockCommand = < }; }; -const updateBlockTr = < +export function updateBlockTr< BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema, >( - tr: Transaction, + tr: Transform, posBeforeBlock: number, block: PartialBlock, -) => { + replaceFromPos?: number, + replaceToPos?: number, +) { const blockInfo = getBlockInfoFromResolvedPos(tr.doc.resolve(posBeforeBlock)); const pmSchema = getPmSchema(tr); + + if ( + replaceFromPos !== undefined && + replaceToPos !== undefined && + replaceFromPos > replaceToPos + ) { + throw new Error("Invalid replaceFromPos or replaceToPos"); + } + // Adds blockGroup node with child blocks if necessary. const oldNodeType = pmSchema.nodes[blockInfo.blockNoteType]; @@ -71,10 +83,32 @@ const updateBlockTr = < : pmSchema.nodes["blockContainer"]; if (blockInfo.isBlockContainer && newNodeType.isInGroup("blockContent")) { + const replaceFromOffset = + replaceFromPos !== undefined && + replaceFromPos > blockInfo.blockContent.beforePos && + replaceFromPos < blockInfo.blockContent.afterPos + ? replaceFromPos - blockInfo.blockContent.beforePos - 1 + : undefined; + + const replaceToOffset = + replaceToPos !== undefined && + replaceToPos > blockInfo.blockContent.beforePos && + replaceToPos < blockInfo.blockContent.afterPos + ? replaceToPos - blockInfo.blockContent.beforePos - 1 + : undefined; + updateChildren(block, tr, blockInfo); // The code below determines the new content of the block. // or "keep" to keep as-is - updateBlockContentNode(block, tr, oldNodeType, newNodeType, blockInfo); + updateBlockContentNode( + block, + tr, + oldNodeType, + newNodeType, + blockInfo, + replaceFromOffset, + replaceToOffset, + ); } else if (!blockInfo.isBlockContainer && newNodeType.isInGroup("bnBlock")) { updateChildren(block, tr, blockInfo); // old node was a bnBlock type (like column or columnList) and new block as well @@ -109,7 +143,7 @@ const updateBlockTr = < ...blockInfo.bnBlock.node.attrs, ...block.props, }); -}; +} function updateBlockContentNode< BSchema extends BlockSchema, @@ -117,7 +151,7 @@ function updateBlockContentNode< S extends StyleSchema, >( block: PartialBlock, - tr: Transaction, + tr: Transform, oldNodeType: NodeType, newNodeType: NodeType, blockInfo: { @@ -126,6 +160,8 @@ function updateBlockContentNode< | undefined; blockContent: { node: PMNode; beforePos: number; afterPos: number }; }, + replaceFromOffset?: number, + replaceToOffset?: number, ) { const pmSchema = getPmSchema(tr); let content: PMNode[] | "keep" = "keep"; @@ -172,17 +208,43 @@ function updateBlockContentNode< // content is being replaced or not. if (content === "keep") { // use setNodeMarkup to only update the type and attributes - tr.setNodeMarkup( - blockInfo.blockContent.beforePos, - block.type === undefined ? undefined : pmSchema.nodes[block.type], - { - ...blockInfo.blockContent.node.attrs, - ...block.props, - }, + tr.setNodeMarkup(blockInfo.blockContent.beforePos, newNodeType, { + ...blockInfo.blockContent.node.attrs, + ...block.props, + }); + } else if (replaceFromOffset !== undefined || replaceToOffset !== undefined) { + // first update markup of the containing node + tr.setNodeMarkup(blockInfo.blockContent.beforePos, newNodeType, { + ...blockInfo.blockContent.node.attrs, + ...block.props, + }); + + const start = + blockInfo.blockContent.beforePos + 1 + (replaceFromOffset ?? 0); + const end = + blockInfo.blockContent.beforePos + + 1 + + (replaceToOffset ?? blockInfo.blockContent.node.content.size); + + // for content like table cells (where the blockcontent has nested PM nodes), + // we need to figure out the correct openStart and openEnd for the slice when replacing + + const contentDepth = tr.doc.resolve(blockInfo.blockContent.beforePos).depth; + const startDepth = tr.doc.resolve(start).depth; + const endDepth = tr.doc.resolve(end).depth; + + tr.replace( + start, + end, + new Slice( + Fragment.from(content), + startDepth - contentDepth - 1, + endDepth - contentDepth - 1, + ), ); } else { // use replaceWith to replace the content and the block itself - // also reset the selection since replacing the block content + // also reset the selection since replacing the block content // sets it to the next block. tr.replaceWith( blockInfo.blockContent.beforePos, @@ -202,7 +264,7 @@ function updateChildren< BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema, ->(block: PartialBlock, tr: Transaction, blockInfo: BlockInfo) { +>(block: PartialBlock, tr: Transform, blockInfo: BlockInfo) { const pmSchema = getPmSchema(tr); if (block.children !== undefined && block.children.length > 0) { const childNodes = block.children.map((child) => { @@ -242,6 +304,8 @@ export function updateBlock< tr: Transaction, blockToUpdate: BlockIdentifier, update: PartialBlock, + replaceFromPos?: number, + replaceToPos?: number, ): Block { const id = typeof blockToUpdate === "string" ? blockToUpdate : blockToUpdate.id; @@ -250,7 +314,13 @@ export function updateBlock< throw new Error(`Block with ID ${id} not found`); } - updateBlockTr(tr, posInfo.posBeforeNode, update); + updateBlockTr( + tr, + posInfo.posBeforeNode, + update, + replaceFromPos, + replaceToPos, + ); const blockContainerNode = tr.doc .resolve(posInfo.posBeforeNode + 1) // TODO: clean? diff --git a/packages/core/src/api/blockManipulation/selections/__snapshots__/selection.test.ts.snap b/packages/core/src/api/blockManipulation/selections/__snapshots__/selection.test.ts.snap deleted file mode 100644 index b5bde19afc..0000000000 --- a/packages/core/src/api/blockManipulation/selections/__snapshots__/selection.test.ts.snap +++ /dev/null @@ -1,844 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`Test getSelection & setSelection > Basic 1`] = ` -{ - "blocks": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 0", - "type": "text", - }, - ], - "id": "paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 1", - "type": "text", - }, - ], - "id": "paragraph-1", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], -} -`; - -exports[`Test getSelection & setSelection > Contains block with children 1`] = ` -{ - "blocks": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 1", - "type": "text", - }, - ], - "id": "paragraph-1", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - { - "children": [ - { - "children": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Double Nested Paragraph 0", - "type": "text", - }, - ], - "id": "double-nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Nested Paragraph 0", - "type": "text", - }, - ], - "id": "nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Paragraph with children", - "type": "text", - }, - ], - "id": "paragraph-with-children", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 2", - "type": "text", - }, - ], - "id": "paragraph-2", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], -} -`; - -exports[`Test getSelection & setSelection > Ends in block with children 1`] = ` -{ - "blocks": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 1", - "type": "text", - }, - ], - "id": "paragraph-1", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - { - "children": [ - { - "children": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Double Nested Paragraph 0", - "type": "text", - }, - ], - "id": "double-nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Nested Paragraph 0", - "type": "text", - }, - ], - "id": "nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Paragraph with children", - "type": "text", - }, - ], - "id": "paragraph-with-children", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], -} -`; - -exports[`Test getSelection & setSelection > Ends in nested block 1`] = ` -{ - "blocks": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 1", - "type": "text", - }, - ], - "id": "paragraph-1", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - { - "children": [ - { - "children": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Double Nested Paragraph 0", - "type": "text", - }, - ], - "id": "double-nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Nested Paragraph 0", - "type": "text", - }, - ], - "id": "nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Paragraph with children", - "type": "text", - }, - ], - "id": "paragraph-with-children", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], -} -`; - -exports[`Test getSelection & setSelection > Ends in table 1`] = ` -{ - "blocks": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 6", - "type": "text", - }, - ], - "id": "paragraph-6", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - { - "children": [], - "content": { - "columnWidths": [ - undefined, - undefined, - undefined, - ], - "headerCols": undefined, - "headerRows": undefined, - "rows": [ - { - "cells": [ - { - "content": [ - { - "styles": {}, - "text": "Cell 1", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - { - "content": [ - { - "styles": {}, - "text": "Cell 2", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - { - "content": [ - { - "styles": {}, - "text": "Cell 3", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - ], - }, - { - "cells": [ - { - "content": [ - { - "styles": {}, - "text": "Cell 4", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - { - "content": [ - { - "styles": {}, - "text": "Cell 5", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - { - "content": [ - { - "styles": {}, - "text": "Cell 6", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - ], - }, - { - "cells": [ - { - "content": [ - { - "styles": {}, - "text": "Cell 7", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - { - "content": [ - { - "styles": {}, - "text": "Cell 8", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - { - "content": [ - { - "styles": {}, - "text": "Cell 9", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - ], - }, - ], - "type": "tableContent", - }, - "id": "table-0", - "props": { - "textColor": "default", - }, - "type": "table", - }, - ], -} -`; - -exports[`Test getSelection & setSelection > Starts in block with children 1`] = ` -{ - "blocks": [ - { - "children": [ - { - "children": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Double Nested Paragraph 0", - "type": "text", - }, - ], - "id": "double-nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Nested Paragraph 0", - "type": "text", - }, - ], - "id": "nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Paragraph with children", - "type": "text", - }, - ], - "id": "paragraph-with-children", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 2", - "type": "text", - }, - ], - "id": "paragraph-2", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], -} -`; - -exports[`Test getSelection & setSelection > Starts in nested block 1`] = ` -{ - "blocks": [ - { - "children": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Double Nested Paragraph 0", - "type": "text", - }, - ], - "id": "double-nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Nested Paragraph 0", - "type": "text", - }, - ], - "id": "nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 2", - "type": "text", - }, - ], - "id": "paragraph-2", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], -} -`; - -exports[`Test getSelection & setSelection > Starts in table 1`] = ` -{ - "blocks": [ - { - "children": [], - "content": { - "columnWidths": [ - undefined, - undefined, - undefined, - ], - "headerCols": undefined, - "headerRows": undefined, - "rows": [ - { - "cells": [ - { - "content": [ - { - "styles": {}, - "text": "Cell 1", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - { - "content": [ - { - "styles": {}, - "text": "Cell 2", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - { - "content": [ - { - "styles": {}, - "text": "Cell 3", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - ], - }, - { - "cells": [ - { - "content": [ - { - "styles": {}, - "text": "Cell 4", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - { - "content": [ - { - "styles": {}, - "text": "Cell 5", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - { - "content": [ - { - "styles": {}, - "text": "Cell 6", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - ], - }, - { - "cells": [ - { - "content": [ - { - "styles": {}, - "text": "Cell 7", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - { - "content": [ - { - "styles": {}, - "text": "Cell 8", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - { - "content": [ - { - "styles": {}, - "text": "Cell 9", - "type": "text", - }, - ], - "props": { - "backgroundColor": "default", - "colspan": 1, - "rowspan": 1, - "textAlignment": "left", - "textColor": "default", - }, - "type": "tableCell", - }, - ], - }, - ], - "type": "tableContent", - }, - "id": "table-0", - "props": { - "textColor": "default", - }, - "type": "table", - }, - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 7", - "type": "text", - }, - ], - "id": "paragraph-7", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], -} -`; diff --git a/packages/core/src/api/blockManipulation/selections/selection.test.ts b/packages/core/src/api/blockManipulation/selections/selection.test.ts deleted file mode 100644 index d39869b4be..0000000000 --- a/packages/core/src/api/blockManipulation/selections/selection.test.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { describe, expect, it } from "vitest"; - -import { setupTestEnv } from "../setupTestEnv.js"; -import { getSelection, setSelection } from "./selection.js"; - -const getEditor = setupTestEnv(); - -describe("Test getSelection & setSelection", () => { - it("Basic", () => { - getEditor().transact((tr) => { - setSelection(tr, "paragraph-0", "paragraph-1"); - }); - - expect(getEditor().transact((tr) => getSelection(tr))).toMatchSnapshot(); - }); - - it("Starts in block with children", () => { - getEditor().transact((tr) => { - setSelection(tr, "paragraph-with-children", "paragraph-2"); - }); - - expect(getEditor().transact((tr) => getSelection(tr))).toMatchSnapshot(); - }); - - it("Starts in nested block", () => { - getEditor().transact((tr) => { - setSelection(tr, "nested-paragraph-0", "paragraph-2"); - }); - - expect(getEditor().transact((tr) => getSelection(tr))).toMatchSnapshot(); - }); - - it("Ends in block with children", () => { - getEditor().transact((tr) => { - setSelection(tr, "paragraph-1", "paragraph-with-children"); - }); - - expect(getEditor().transact((tr) => getSelection(tr))).toMatchSnapshot(); - }); - - it("Ends in nested block", () => { - getEditor().transact((tr) => { - setSelection(tr, "paragraph-1", "nested-paragraph-0"); - }); - - expect(getEditor().transact((tr) => getSelection(tr))).toMatchSnapshot(); - }); - - it("Contains block with children", () => { - getEditor().transact((tr) => { - setSelection(tr, "paragraph-1", "paragraph-2"); - }); - - expect(getEditor().transact((tr) => getSelection(tr))).toMatchSnapshot(); - }); - - it("Starts in table", () => { - getEditor().transact((tr) => { - setSelection(tr, "table-0", "paragraph-7"); - }); - - expect(getEditor().transact((tr) => getSelection(tr))).toMatchSnapshot(); - }); - - it("Ends in table", () => { - getEditor().transact((tr) => { - setSelection(tr, "paragraph-6", "table-0"); - }); - - expect(getEditor().transact((tr) => getSelection(tr))).toMatchSnapshot(); - }); -}); diff --git a/packages/core/src/api/blockManipulation/selections/selection.ts b/packages/core/src/api/blockManipulation/selections/selection.ts index a3019dd802..a56c80b28f 100644 --- a/packages/core/src/api/blockManipulation/selections/selection.ts +++ b/packages/core/src/api/blockManipulation/selections/selection.ts @@ -10,7 +10,10 @@ import { StyleSchema, } from "../../../schema/index.js"; import { getBlockInfo, getNearestBlockPos } from "../../getBlockInfoFromPos.js"; -import { nodeToBlock } from "../../nodeConversions/nodeToBlock.js"; +import { + nodeToBlock, + prosemirrorSliceToSlicedBlocks, +} from "../../nodeConversions/nodeToBlock.js"; import { getNodeById } from "../../nodeUtil.js"; import { getBlockNoteSchema, getPmSchema } from "../../pmUtil.js"; @@ -216,3 +219,47 @@ export function setSelection( // restriction that the start/end blocks must have content. tr.setSelection(TextSelection.create(tr.doc, startPos, endPos)); } + +export function getSelectionCutBlocks(tr: Transaction) { + // TODO: fix image node selection + + const pmSchema = getPmSchema(tr); + let start = tr.selection.$from; + let end = tr.selection.$to; + + // the selection moves below are used to make sure `prosemirrorSliceToSlicedBlocks` returns + // the correct information about whether content is cut at the start or end of a block + + // if the end is at the end of a node (|

) move it forward so we include all closing tags (

|) + while (end.parentOffset >= end.parent.nodeSize - 2 && end.depth > 0) { + end = tr.doc.resolve(end.pos + 1); + } + + // if the end is at the start of an empty node (

|) move it backwards so we drop empty start tags (

|) + while (end.parentOffset === 0 && end.depth > 0) { + end = tr.doc.resolve(end.pos - 1); + } + + // if the start is at the start of a node (

|) move it backwards so we include all open tags (|

) + while (start.parentOffset === 0 && start.depth > 0) { + start = tr.doc.resolve(start.pos - 1); + } + + // if the start is at the end of a node (|

|) move it forwards so we drop all closing tags (|

) + while (start.parentOffset >= start.parent.nodeSize - 2 && start.depth > 0) { + start = tr.doc.resolve(start.pos + 1); + } + + const selectionInfo = prosemirrorSliceToSlicedBlocks( + tr.doc.slice(start.pos, end.pos, true), + pmSchema, + ); + + return { + _meta: { + startPos: start.pos, + endPos: end.pos, + }, + ...selectionInfo, + }; +} diff --git a/packages/core/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts b/packages/core/src/api/blockManipulation/selections/textCursorPosition.ts similarity index 89% rename from packages/core/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts rename to packages/core/src/api/blockManipulation/selections/textCursorPosition.ts index 19a890976c..83f5340698 100644 --- a/packages/core/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts +++ b/packages/core/src/api/blockManipulation/selections/textCursorPosition.ts @@ -4,21 +4,21 @@ import { TextSelection, type Transaction, } from "prosemirror-state"; -import type { TextCursorPosition } from "../../../../editor/cursorPositionTypes.js"; +import type { TextCursorPosition } from "../../../editor/cursorPositionTypes.js"; import type { BlockIdentifier, BlockSchema, InlineContentSchema, StyleSchema, -} from "../../../../schema/index.js"; -import { UnreachableCaseError } from "../../../../util/typescript.js"; +} from "../../../schema/index.js"; +import { UnreachableCaseError } from "../../../util/typescript.js"; import { getBlockInfo, getBlockInfoFromTransaction, -} from "../../../getBlockInfoFromPos.js"; -import { nodeToBlock } from "../../../nodeConversions/nodeToBlock.js"; -import { getNodeById } from "../../../nodeUtil.js"; -import { getBlockNoteSchema, getPmSchema } from "../../../pmUtil.js"; +} from "../../getBlockInfoFromPos.js"; +import { nodeToBlock } from "../../nodeConversions/nodeToBlock.js"; +import { getNodeById } from "../../nodeUtil.js"; +import { getBlockNoteSchema, getPmSchema } from "../../pmUtil.js"; export function getTextCursorPosition< BSchema extends BlockSchema, diff --git a/packages/core/src/api/blockManipulation/selections/textCursorPosition/__snapshots__/textCursorPosition.test.ts.snap b/packages/core/src/api/blockManipulation/selections/textCursorPosition/__snapshots__/textCursorPosition.test.ts.snap deleted file mode 100644 index 7e506a213e..0000000000 --- a/packages/core/src/api/blockManipulation/selections/textCursorPosition/__snapshots__/textCursorPosition.test.ts.snap +++ /dev/null @@ -1,316 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`Test getTextCursorPosition & setTextCursorPosition > Basic 1`] = ` -{ - "block": { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 1", - "type": "text", - }, - ], - "id": "paragraph-1", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - "nextBlock": { - "children": [ - { - "children": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Double Nested Paragraph 0", - "type": "text", - }, - ], - "id": "double-nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Nested Paragraph 0", - "type": "text", - }, - ], - "id": "nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Paragraph with children", - "type": "text", - }, - ], - "id": "paragraph-with-children", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - "parentBlock": undefined, - "prevBlock": { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 0", - "type": "text", - }, - ], - "id": "paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, -} -`; - -exports[`Test getTextCursorPosition & setTextCursorPosition > First block 1`] = ` -{ - "block": { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 0", - "type": "text", - }, - ], - "id": "paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - "nextBlock": { - "children": [], - "content": [ - { - "styles": {}, - "text": "Paragraph 1", - "type": "text", - }, - ], - "id": "paragraph-1", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - "parentBlock": undefined, - "prevBlock": undefined, -} -`; - -exports[`Test getTextCursorPosition & setTextCursorPosition > Last block 1`] = ` -{ - "block": { - "children": [], - "content": [], - "id": "trailing-paragraph", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - "nextBlock": undefined, - "parentBlock": undefined, - "prevBlock": { - "children": [ - { - "children": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Double Nested Paragraph 1", - "type": "text", - }, - ], - "id": "double-nested-paragraph-1", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Nested Paragraph 1", - "type": "text", - }, - ], - "id": "nested-paragraph-1", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": { - "bold": true, - }, - "text": "Heading", - "type": "text", - }, - { - "styles": {}, - "text": " with styled ", - "type": "text", - }, - { - "styles": { - "italic": true, - }, - "text": "content", - "type": "text", - }, - ], - "id": "heading-with-everything", - "props": { - "backgroundColor": "red", - "level": 2, - "textAlignment": "center", - "textColor": "red", - }, - "type": "heading", - }, -} -`; - -exports[`Test getTextCursorPosition & setTextCursorPosition > Nested block 1`] = ` -{ - "block": { - "children": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Double Nested Paragraph 0", - "type": "text", - }, - ], - "id": "double-nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Nested Paragraph 0", - "type": "text", - }, - ], - "id": "nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - "nextBlock": undefined, - "parentBlock": { - "children": [ - { - "children": [ - { - "children": [], - "content": [ - { - "styles": {}, - "text": "Double Nested Paragraph 0", - "type": "text", - }, - ], - "id": "double-nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Nested Paragraph 0", - "type": "text", - }, - ], - "id": "nested-paragraph-0", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - ], - "content": [ - { - "styles": {}, - "text": "Paragraph with children", - "type": "text", - }, - ], - "id": "paragraph-with-children", - "props": { - "backgroundColor": "default", - "textAlignment": "left", - "textColor": "default", - }, - "type": "paragraph", - }, - "prevBlock": undefined, -} -`; diff --git a/packages/core/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.ts b/packages/core/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.ts deleted file mode 100644 index 21f4578652..0000000000 --- a/packages/core/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { describe, expect, it } from "vitest"; - -import { setupTestEnv } from "../../setupTestEnv.js"; -import { - getTextCursorPosition, - setTextCursorPosition, -} from "./textCursorPosition.js"; - -const getEditor = setupTestEnv(); - -describe("Test getTextCursorPosition & setTextCursorPosition", () => { - it("Basic", () => { - getEditor().transact((tr) => { - setTextCursorPosition(tr, "paragraph-1"); - }); - - expect( - getEditor().transact((tr) => getTextCursorPosition(tr)), - ).toMatchSnapshot(); - }); - - it("First block", () => { - getEditor().transact((tr) => { - setTextCursorPosition(tr, "paragraph-0"); - }); - - expect( - getEditor().transact((tr) => getTextCursorPosition(tr)), - ).toMatchSnapshot(); - }); - - it("Last block", () => { - getEditor().transact((tr) => { - setTextCursorPosition(tr, "trailing-paragraph"); - }); - - expect( - getEditor().transact((tr) => getTextCursorPosition(tr)), - ).toMatchSnapshot(); - }); - - it("Nested block", () => { - getEditor().transact((tr) => { - setTextCursorPosition(tr, "nested-paragraph-0"); - }); - - expect( - getEditor().transact((tr) => getTextCursorPosition(tr)), - ).toMatchSnapshot(); - }); - - it("Set to start", () => { - getEditor().transact((tr) => { - setTextCursorPosition(tr, "paragraph-1", "start"); - }); - - expect( - getEditor().transact((tr) => tr.selection.$from.parentOffset) === 0, - ).toBeTruthy(); - }); - - it("Set to end", () => { - getEditor().transact((tr) => { - setTextCursorPosition(tr, "paragraph-1", "end"); - }); - - expect( - getEditor().transact((tr) => tr.selection.$from.parentOffset) === - getEditor().transact( - (tr) => tr.selection.$from.node().firstChild!.nodeSize, - ), - ).toBeTruthy(); - }); -}); diff --git a/packages/core/src/api/getBlockInfoFromPos.ts b/packages/core/src/api/getBlockInfoFromPos.ts index 019c89f9ed..b0768a2cc8 100644 --- a/packages/core/src/api/getBlockInfoFromPos.ts +++ b/packages/core/src/api/getBlockInfoFromPos.ts @@ -126,7 +126,7 @@ export function getBlockInfoWithManualOffset( ): BlockInfo { if (!node.type.isInGroup("bnBlock")) { throw new Error( - `Attempted to get bnBlock node at position but found node of different type ${node.type}`, + `Attempted to get bnBlock node at position but found node of different type ${node.type.name}`, ); } diff --git a/packages/core/src/api/nodeConversions/blockToNode.ts b/packages/core/src/api/nodeConversions/blockToNode.ts index 8035f32d2b..cfcf22586f 100644 --- a/packages/core/src/api/nodeConversions/blockToNode.ts +++ b/packages/core/src/api/nodeConversions/blockToNode.ts @@ -33,7 +33,7 @@ function styledTextToNodes( ): Node[] { const marks: Mark[] = []; - for (const [style, value] of Object.entries(styledText.styles)) { + for (const [style, value] of Object.entries(styledText.styles || {})) { const config = styleSchema[style]; if (!config) { throw new Error(`style ${style} not found in styleSchema`); @@ -51,7 +51,9 @@ function styledTextToNodes( const parseHardBreaks = !blockType || !schema.nodes[blockType].spec.code; if (!parseHardBreaks) { - return [schema.text(styledText.text, marks)]; + return styledText.text.length > 0 + ? [schema.text(styledText.text, marks)] + : []; } return ( @@ -259,6 +261,7 @@ export function tableContentToNodes< ); columnNodes.push(cellNode); } + const rowNode = schema.nodes["tableRow"].createChecked({}, columnNodes); rowNodes.push(rowNode); } diff --git a/packages/core/src/api/nodeConversions/nodeToBlock.ts b/packages/core/src/api/nodeConversions/nodeToBlock.ts index 6ad2236ef4..1f5d2c75d4 100644 --- a/packages/core/src/api/nodeConversions/nodeToBlock.ts +++ b/packages/core/src/api/nodeConversions/nodeToBlock.ts @@ -1,5 +1,5 @@ -import { Mark, Node, Schema } from "@tiptap/pm/model"; - +import { Mark, Node, Schema, Slice } from "@tiptap/pm/model"; +import type { Block } from "../../blocks/defaultBlocks.js"; import UniqueID from "../../extensions/UniqueID/UniqueID.js"; import type { BlockSchema, @@ -13,17 +13,18 @@ import type { TableCell, TableContent, } from "../../schema/index.js"; -import { getBlockInfoWithManualOffset } from "../getBlockInfoFromPos.js"; - -import type { Block } from "../../blocks/defaultBlocks.js"; import { isLinkInlineContent, isStyledTextInlineContent, } from "../../schema/inlineContent/types.js"; import { UnreachableCaseError } from "../../util/typescript.js"; -import { getBlockCache, getStyleSchema } from "../pmUtil.js"; -import { getInlineContentSchema } from "../pmUtil.js"; -import { getBlockSchema } from "../pmUtil.js"; +import { getBlockInfoWithManualOffset } from "../getBlockInfoFromPos.js"; +import { + getBlockCache, + getBlockSchema, + getInlineContentSchema, + getStyleSchema, +} from "../pmUtil.js"; /** * Converts an internal (prosemirror) table node contentto a BlockNote Tablecontent @@ -492,3 +493,197 @@ export function nodeToBlock< return block; } + +/** + * Convert a Prosemirror document to a BlockNote document (array of blocks) + */ +export function docToBlocks< + BSchema extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>( + doc: Node, + schema: Schema, + blockSchema: BSchema = getBlockSchema(schema) as BSchema, + inlineContentSchema: I = getInlineContentSchema(schema) as I, + styleSchema: S = getStyleSchema(schema) as S, + blockCache = getBlockCache(schema), +) { + const blocks: Block[] = []; + doc.firstChild!.descendants((node) => { + blocks.push( + nodeToBlock( + node, + schema, + blockSchema, + inlineContentSchema, + styleSchema, + blockCache, + ), + ); + return false; + }); + return blocks; +} + +/** + * + * Parse a Prosemirror Slice into a BlockNote selection. The prosemirror schema looks like this: + * + * + * (main content of block) + * + * (only if blocks has children) + * (child block) + * + * + * (child block 2) + * + * + * + * + * + * + */ +export function prosemirrorSliceToSlicedBlocks< + BSchema extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>( + slice: Slice, + schema: Schema, + blockSchema: BSchema = getBlockSchema(schema) as BSchema, + inlineContentSchema: I = getInlineContentSchema(schema) as I, + styleSchema: S = getStyleSchema(schema) as S, + blockCache: WeakMap> = getBlockCache(schema), +): { + /** + * The blocks that are included in the selection. + */ + blocks: Block[]; + /** + * If a block was "cut" at the start of the selection, this will be the id of the block that was cut. + */ + blockCutAtStart: string | undefined; + /** + * If a block was "cut" at the end of the selection, this will be the id of the block that was cut. + */ + blockCutAtEnd: string | undefined; +} { + // console.log(JSON.stringify(slice.toJSON())); + function processNode( + node: Node, + openStart: number, + openEnd: number, + ): { + blocks: Block[]; + blockCutAtStart: string | undefined; + blockCutAtEnd: string | undefined; + } { + if (node.type.name !== "blockGroup") { + throw new Error("unexpected"); + } + const blocks: Block[] = []; + let blockCutAtStart: string | undefined; + let blockCutAtEnd: string | undefined; + + node.forEach((blockContainer, _offset, index) => { + if (blockContainer.type.name !== "blockContainer") { + throw new Error("unexpected"); + } + if (blockContainer.childCount === 0) { + return; + } + if (blockContainer.childCount === 0 || blockContainer.childCount > 2) { + throw new Error( + "unexpected, blockContainer.childCount: " + blockContainer.childCount, + ); + } + + const isFirstBlock = index === 0; + const isLastBlock = index === node.childCount - 1; + + if (blockContainer.firstChild!.type.name === "blockGroup") { + // this is the parent where a selection starts within one of its children, + // e.g.: + // A + // ├── B + // selection starts within B, then this blockContainer is A, but we don't care about A + // so let's descend into B and continue processing + if (!isFirstBlock) { + throw new Error("unexpected"); + } + const ret = processNode( + blockContainer.firstChild!, + Math.max(0, openStart - 1), + isLastBlock ? Math.max(0, openEnd - 1) : 0, + ); + blockCutAtStart = ret.blockCutAtStart; + if (isLastBlock) { + blockCutAtEnd = ret.blockCutAtEnd; + } + blocks.push(...ret.blocks); + return; + } + + const block = nodeToBlock( + blockContainer, + schema, + blockSchema, + inlineContentSchema, + styleSchema, + blockCache, + ); + const childGroup = + blockContainer.childCount > 1 ? blockContainer.child(1) : undefined; + + let childBlocks: Block[] = []; + if (childGroup) { + const ret = processNode( + childGroup, + 0, // TODO: can this be anything other than 0? + isLastBlock ? Math.max(0, openEnd - 1) : 0, + ); + childBlocks = ret.blocks; + if (isLastBlock) { + blockCutAtEnd = ret.blockCutAtEnd; + } + } + + if (isLastBlock && !childGroup && openEnd > 1) { + blockCutAtEnd = block.id; + } + + if (isFirstBlock && openStart > 1) { + blockCutAtStart = block.id; + } + + blocks.push({ + ...(block as any), + children: childBlocks, + }); + }); + + return { blocks, blockCutAtStart, blockCutAtEnd }; + } + + if (slice.content.childCount === 0) { + return { + blocks: [], + blockCutAtStart: undefined, + blockCutAtEnd: undefined, + }; + } + + if (slice.content.childCount !== 1) { + throw new Error( + "slice must be a single block, did you forget includeParents=true?", + ); + } + + return processNode( + slice.content.firstChild!, + Math.max(slice.openStart - 1, 0), + Math.max(slice.openEnd - 1, 0), + ); +} diff --git a/packages/core/src/api/pmUtil.ts b/packages/core/src/api/pmUtil.ts index 0d4be4ee08..3ed699ded4 100644 --- a/packages/core/src/api/pmUtil.ts +++ b/packages/core/src/api/pmUtil.ts @@ -1,12 +1,12 @@ import type { Node, Schema } from "prosemirror-model"; -import type { Transaction } from "prosemirror-state"; +import { Transform } from "prosemirror-transform"; import type { BlockNoteEditor } from "../editor/BlockNoteEditor.js"; +import { BlockNoteSchema } from "../editor/BlockNoteSchema.js"; import type { BlockSchema } from "../schema/blocks/types.js"; import type { InlineContentSchema } from "../schema/inlineContent/types.js"; import type { StyleSchema } from "../schema/styles/types.js"; -import { BlockNoteSchema } from "../editor/BlockNoteSchema.js"; -export function getPmSchema(trOrNode: Transaction | Node) { +export function getPmSchema(trOrNode: Transform | Node) { if ("doc" in trOrNode) { return trOrNode.doc.type.schema; } diff --git a/packages/core/src/blocks/CodeBlockContent/CodeBlockContent.ts b/packages/core/src/blocks/CodeBlockContent/CodeBlockContent.ts index 239add82b4..e322a83be9 100644 --- a/packages/core/src/blocks/CodeBlockContent/CodeBlockContent.ts +++ b/packages/core/src/blocks/CodeBlockContent/CodeBlockContent.ts @@ -1,15 +1,15 @@ +import type { HighlighterGeneric } from "@shikijs/types"; import { InputRule, isTextSelection } from "@tiptap/core"; import { TextSelection } from "@tiptap/pm/state"; -import { createHighlightPlugin, Parser } from "prosemirror-highlight"; +import { Parser, createHighlightPlugin } from "prosemirror-highlight"; import { createParser } from "prosemirror-highlight/shiki"; +import { BlockNoteEditor } from "../../index.js"; import { + PropSchema, createBlockSpecFromStronglyTypedTiptapNode, createStronglyTypedTiptapNode, - PropSchema, } from "../../schema/index.js"; import { createDefaultBlockDOMOutputSpec } from "../defaultBlockHelpers.js"; -import type { HighlighterGeneric } from "@shikijs/types"; -import { BlockNoteEditor } from "../../index.js"; export type CodeBlockOptions = { /** @@ -76,7 +76,7 @@ const CodeBlockContent = createStronglyTypedTiptapNode({ name: "codeBlock", content: "inline*", group: "blockContent", - marks: "", + marks: "insertion deletion modification", code: true, defining: true, addOptions() { @@ -152,7 +152,7 @@ const CodeBlockContent = createStronglyTypedTiptapNode({ // Parse from external HTML. { tag: "pre", - contentElement: "code", + // contentElement: "code", preserveWhitespace: "full", }, ]; diff --git a/packages/core/src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts b/packages/core/src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts index 686b1acf0d..0c026257ea 100644 --- a/packages/core/src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts +++ b/packages/core/src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts @@ -33,7 +33,7 @@ export const createAddFileButton = ( // Opens the file toolbar. const addFileButtonClickHandler = () => { editor.transact((tr) => - tr.setMeta(editor.filePanel!.plugin, { + tr.setMeta(editor.filePanel!.plugins[0], { block: block, }), ); diff --git a/packages/core/src/blocks/TableBlockContent/TableBlockContent.ts b/packages/core/src/blocks/TableBlockContent/TableBlockContent.ts index f56de3b4b1..6d26b8ec54 100644 --- a/packages/core/src/blocks/TableBlockContent/TableBlockContent.ts +++ b/packages/core/src/blocks/TableBlockContent/TableBlockContent.ts @@ -1,9 +1,8 @@ +import { Node, mergeAttributes } from "@tiptap/core"; import { TableCell } from "@tiptap/extension-table-cell"; import { TableHeader } from "@tiptap/extension-table-header"; -import { TableRow } from "@tiptap/extension-table-row"; import { DOMParser, Fragment, Node as PMNode, Schema } from "prosemirror-model"; import { TableView } from "prosemirror-tables"; - import { NodeView } from "prosemirror-view"; import { createBlockSpecFromStronglyTypedTiptapNode, @@ -24,6 +23,7 @@ export const TableBlockContent = createStronglyTypedTiptapNode({ group: "blockContent", tableRole: "table", + marks: "deletion insertion modification", isolating: true, parseHTML() { @@ -152,6 +152,36 @@ const TableParagraph = createStronglyTypedTiptapNode({ }); /** + * This extension allows you to create table rows. + * @see https://www.tiptap.dev/api/nodes/table-row + */ +export const TableRow = Node.create<{ HTMLAttributes: Record }>({ + name: "tableRow", + + addOptions() { + return { + HTMLAttributes: {}, + }; + }, + + content: "(tableCell | tableHeader)+", + + tableRole: "row", + marks: "deletion insertion modification", + parseHTML() { + return [{ tag: "tr" }]; + }, + + renderHTML({ HTMLAttributes }) { + return [ + "tr", + mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), + 0, + ]; + }, +}); + +/* * This will flatten a node's content to fit into a table cell's paragraph. */ function parseTableContent(node: HTMLElement, schema: Schema) { diff --git a/packages/core/src/editor/Block.css b/packages/core/src/editor/Block.css index a246b30cdb..bd0422e582 100644 --- a/packages/core/src/editor/Block.css +++ b/packages/core/src/editor/Block.css @@ -144,6 +144,11 @@ NESTED BLOCKS .bn-block-outer:not([data-prev-type]) > .bn-block + > .bn-block-content[data-content-type="heading"], +.bn-block-outer:not([data-prev-type]) + > .bn-block + > div[data-type="modification"] + > div[data-type="modification"] > .bn-block-content[data-content-type="heading"] { font-size: var(--level); font-weight: bold; @@ -187,6 +192,10 @@ NESTED BLOCKS .bn-block-outer:not([data-prev-type]) > .bn-block + > .bn-block-content[data-content-type="numberedListItem"]::before, +.bn-block-outer:not([data-prev-type]) + > .bn-block + > div[data-type="modification"] > .bn-block-content[data-content-type="numberedListItem"]::before { content: var(--index) "."; } @@ -231,6 +240,10 @@ NESTED BLOCKS .bn-block-outer:not([data-prev-type]) > .bn-block + > .bn-block-content[data-content-type="bulletListItem"]::before, +.bn-block-outer:not([data-prev-type]) + > .bn-block + > div[data-type="modification"] > .bn-block-content[data-content-type="bulletListItem"]::before { content: "•"; } @@ -248,6 +261,12 @@ NESTED BLOCKS ~ .bn-block-group > .bn-block-outer:not([data-prev-type]) > .bn-block + > .bn-block-content[data-content-type="bulletListItem"]::before, +[data-content-type="bulletListItem"] + ~ .bn-block-group + > .bn-block-outer:not([data-prev-type]) + > .bn-block + > div[data-type="modification"] > .bn-block-content[data-content-type="bulletListItem"]::before { content: "◦"; } @@ -269,6 +288,14 @@ NESTED BLOCKS ~ .bn-block-group > .bn-block-outer:not([data-prev-type]) > .bn-block + > .bn-block-content[data-content-type="bulletListItem"]::before, +[data-content-type="bulletListItem"] + ~ .bn-block-group + [data-content-type="bulletListItem"] + ~ .bn-block-group + > .bn-block-outer:not([data-prev-type]) + > .bn-block + > div[data-type="modification"] > .bn-block-content[data-content-type="bulletListItem"]::before { content: "▪"; } @@ -434,7 +461,6 @@ NESTED BLOCKS position: absolute; font-style: italic; } - /* TODO: should this be here? */ /* TEXT COLORS */ diff --git a/packages/core/src/editor/BlockNoteEditor.test.ts b/packages/core/src/editor/BlockNoteEditor.test.ts index 62aeb3585c..1a2f061c98 100644 --- a/packages/core/src/editor/BlockNoteEditor.test.ts +++ b/packages/core/src/editor/BlockNoteEditor.test.ts @@ -75,6 +75,13 @@ it("adds id attribute when requested", async () => { ); }); +it("updates block", () => { + const editor = BlockNoteEditor.create(); + editor.updateBlock(editor.document[0], { + content: "hello", + }); +}); + it("block prop types", () => { // this test checks whether the block props are correctly typed in typescript const editor = BlockNoteEditor.create(); diff --git a/packages/core/src/editor/BlockNoteEditor.ts b/packages/core/src/editor/BlockNoteEditor.ts index 18be707664..2c2f1993dc 100644 --- a/packages/core/src/editor/BlockNoteEditor.ts +++ b/packages/core/src/editor/BlockNoteEditor.ts @@ -33,12 +33,13 @@ import { import { insertContentAt } from "../api/blockManipulation/insertContentAt.js"; import { getSelection, + getSelectionCutBlocks, setSelection, } from "../api/blockManipulation/selections/selection.js"; import { getTextCursorPosition, setTextCursorPosition, -} from "../api/blockManipulation/selections/textCursorPosition/textCursorPosition.js"; +} from "../api/blockManipulation/selections/textCursorPosition.js"; import { createExternalHTMLExporter } from "../api/exporters/html/externalHTMLExporter.js"; import { blocksToMarkdown } from "../api/exporters/markdown/markdownExporter.js"; import { HTMLToBlocks } from "../api/parsers/html/parseHTML.js"; @@ -93,6 +94,7 @@ import { import { Dictionary } from "../i18n/dictionary.js"; import { en } from "../i18n/locales/index.js"; +import { redo, undo } from "@tiptap/pm/history"; import { TextSelection, type Command, @@ -101,11 +103,10 @@ import { } from "@tiptap/pm/state"; import { dropCursor } from "prosemirror-dropcursor"; import { EditorView } from "prosemirror-view"; -import { undoCommand, redoCommand, ySyncPluginKey } from "y-prosemirror"; -import { undo, redo } from "@tiptap/pm/history"; +import { redoCommand, undoCommand, ySyncPluginKey } from "y-prosemirror"; import { createInternalHTMLSerializer } from "../api/exporters/html/internalHTMLSerializer.js"; import { inlineContentToNodes } from "../api/nodeConversions/blockToNode.js"; -import { nodeToBlock } from "../api/nodeConversions/nodeToBlock.js"; +import { docToBlocks } from "../api/nodeConversions/nodeToBlock.js"; import { BlocksChanged, getBlocksChangedByTransaction, @@ -113,20 +114,24 @@ import { import { nestedListsToBlockNoteStructure } from "../api/parsers/html/util/nestedLists.js"; import { CodeBlockOptions } from "../blocks/CodeBlockContent/CodeBlockContent.js"; import type { ThreadStore, User } from "../comments/index.js"; +import { CursorPlugin } from "../extensions/Collaboration/CursorPlugin.js"; import "../style.css"; import { EventEmitter } from "../util/EventEmitter.js"; -import { CursorPlugin } from "../extensions/Collaboration/CursorPlugin.js"; +import { BlockNoteExtension } from "./BlockNoteExtension.js"; +/** + * A factory function that returns a BlockNoteExtension + * This is useful so we can create extensions that require an editor instance + * in the constructor + */ export type BlockNoteExtensionFactory = ( editor: BlockNoteEditor, ) => BlockNoteExtension; -export type BlockNoteExtension = - | AnyExtension - | { - plugin: Plugin; - priority?: number; - }; +/** + * We support Tiptap extensions and BlockNoteExtension based extensions + */ +export type SupportedExtension = AnyExtension | BlockNoteExtension; export type BlockCache< BSchema extends BlockSchema = any, @@ -369,10 +374,17 @@ export type BlockNoteEditorOptions< _tiptapOptions: Partial; /** - * (experimental) add extra prosemirror plugins or tiptap extensions to the editor + * (experimental) add extra extensions to the editor + * + * @deprecated, should use `extensions` instead */ _extensions: Record; + /** + * Register + */ + extensions: Array; + /** * Boolean indicating whether the editor is in headless mode. * Headless mode means we can use features like importing / exporting blocks, @@ -404,7 +416,7 @@ export class BlockNoteEditor< /** * extensions that are added to the editor, can be tiptap extensions or prosemirror plugins */ - public readonly extensions: Record = {}; + public readonly extensions: Record = {}; /** * Boolean indicating whether the editor is in headless mode. @@ -609,6 +621,16 @@ export class BlockNoteEditor< }); // add extensions from options + for (let ext of newOptions.extensions || []) { + if (typeof ext === "function") { + // factory + ext = ext(this); + } + const key = (ext.constructor as any).name(); + this.extensions[key] = ext; + } + + // (when passed in via the deprecated `_extensions` option) Object.entries(newOptions._extensions || {}).forEach(([key, ext]) => { if (typeof ext === "function") { // factory @@ -691,20 +713,19 @@ export class BlockNoteEditor< return ext; } - if (!ext.plugin) { - throw new Error( - "Extension should either be a TipTap extension or a ProseMirror plugin in a plugin property", - ); + if (ext instanceof BlockNoteExtension && !ext.plugins.length) { + return undefined; } // "blocknote" extensions (prosemirror plugins) return Extension.create({ name: key, priority: ext.priority, - addProseMirrorPlugins: () => [ext.plugin], + addProseMirrorPlugins: () => ext.plugins, }); }), - ]; + ].filter((ext): ext is Extension => ext !== undefined); + const tiptapOptions: BlockNoteTipTapEditorOptions = { ...blockNoteTipTapOptions, ...newOptions._tiptapOptions, @@ -865,6 +886,26 @@ export class BlockNoteEditor< } } + // TO DISCUSS + /** + * Shorthand to get a typed extension from the editor, by + * just passing in the extension class. + * + * @param ext - The extension class to get + * @param key - optional, the key of the extension in the extensions object (defaults to the extension name) + * @returns The extension instance + */ + public extension( + ext: { new (...args: any[]): T } & typeof BlockNoteExtension, + key = ext.name(), + ): T { + const extension = this.extensions[key] as T; + if (!extension) { + throw new Error(`Extension ${key} not found`); + } + return extension; + } + /** * Mount the editor to a parent DOM element. Call mount(undefined) to clean up * @@ -946,15 +987,7 @@ export class BlockNoteEditor< */ public get document(): Block[] { return this.transact((tr) => { - const blocks: Block[] = []; - - tr.doc.firstChild!.descendants((node) => { - blocks.push(nodeToBlock(node, this.pmSchema)); - - return false; - }); - - return blocks; + return docToBlocks(tr.doc, this.pmSchema); }); } @@ -1099,12 +1132,26 @@ export class BlockNoteEditor< } /** - * Gets a snapshot of the current selection. + * Gets a snapshot of the current selection. This contains all blocks (included nested blocks) + * that the selection spans across. + * + * If the selection starts / ends halfway through a block, the returned data will contain the entire block. */ public getSelection(): Selection | undefined { return this.transact((tr) => getSelection(tr)); } + /** + * Gets a snapshot of the current selection. This contains all blocks (included nested blocks) + * that the selection spans across. + * + * If the selection starts / ends halfway through a block, the returned block will be + * only the part of the block that is included in the selection. + */ + public getSelectionCutBlocks() { + return this.transact((tr) => getSelectionCutBlocks(tr)); + } + /** * Sets the selection to a range of blocks. * @param startBlock The identifier of the block that should be the start of the selection. @@ -1595,8 +1642,8 @@ export class BlockNoteEditor< if (!this.prosemirrorView) { return undefined; } - const state = this.prosemirrorView?.state; - const { selection } = state; + + const { selection } = this.prosemirrorState; // support for CellSelections const { ranges } = selection; @@ -1641,7 +1688,7 @@ export class BlockNoteEditor< if (pluginState?.deleteTriggerCharacter) { tr.insertText(triggerCharacter); } - tr.scrollIntoView().setMeta(this.suggestionMenus.plugin, { + tr.scrollIntoView().setMeta(this.suggestionMenus.plugins[0], { triggerCharacter: triggerCharacter, deleteTriggerCharacter: pluginState?.deleteTriggerCharacter || false, ignoreQueryLength: pluginState?.ignoreQueryLength || false, diff --git a/packages/core/src/editor/BlockNoteExtension.ts b/packages/core/src/editor/BlockNoteExtension.ts new file mode 100644 index 0000000000..32650f74ab --- /dev/null +++ b/packages/core/src/editor/BlockNoteExtension.ts @@ -0,0 +1,24 @@ +import { Plugin } from "prosemirror-state"; +import { EventEmitter } from "../util/EventEmitter.js"; + +export abstract class BlockNoteExtension extends EventEmitter { + public static name(): string { + throw new Error("You must implement the name method in your extension"); + } + + protected addProsemirrorPlugin(plugin: Plugin) { + this.plugins.push(plugin); + } + + public readonly plugins: Plugin[] = []; + public get priority(): number | undefined { + return undefined; + } + + // eslint-disable-next-line + constructor(..._args: any[]) { + super(); + // Allow subclasses to have constructors with parameters + // without this, we can't easily implement BlockNoteEditor.extension(MyExtension) pattern + } +} diff --git a/packages/core/src/editor/BlockNoteExtensions.ts b/packages/core/src/editor/BlockNoteExtensions.ts index e7ed226899..3593aa77c7 100644 --- a/packages/core/src/editor/BlockNoteExtensions.ts +++ b/packages/core/src/editor/BlockNoteExtensions.ts @@ -9,13 +9,13 @@ import * as Y from "yjs"; import { createDropFileExtension } from "../api/clipboard/fromClipboard/fileDropExtension.js"; import { createPasteFromClipboardExtension } from "../api/clipboard/fromClipboard/pasteExtension.js"; import { createCopyToClipboardExtension } from "../api/clipboard/toClipboard/copyExtension.js"; +import type { ThreadStore } from "../comments/index.js"; import { BackgroundColorExtension } from "../extensions/BackgroundColor/BackgroundColorExtension.js"; import { CursorPlugin } from "../extensions/Collaboration/CursorPlugin.js"; -import { UndoPlugin } from "../extensions/Collaboration/UndoPlugin.js"; import { SyncPlugin } from "../extensions/Collaboration/SyncPlugin.js"; +import { UndoPlugin } from "../extensions/Collaboration/UndoPlugin.js"; import { CommentMark } from "../extensions/Comments/CommentMark.js"; import { CommentsPlugin } from "../extensions/Comments/CommentsPlugin.js"; -import type { ThreadStore } from "../comments/index.js"; import { FilePanelProsemirrorPlugin } from "../extensions/FilePanel/FilePanelPlugin.js"; import { FormattingToolbarProsemirrorPlugin } from "../extensions/FormattingToolbar/FormattingToolbarPlugin.js"; import { HardBreak } from "../extensions/HardBreak/HardBreak.js"; @@ -31,6 +31,11 @@ import { PreviousBlockTypePlugin } from "../extensions/PreviousBlockType/Previou import { ShowSelectionPlugin } from "../extensions/ShowSelection/ShowSelectionPlugin.js"; import { SideMenuProsemirrorPlugin } from "../extensions/SideMenu/SideMenuPlugin.js"; import { SuggestionMenuProseMirrorPlugin } from "../extensions/SuggestionMenu/SuggestionPlugin.js"; +import { + SuggestionAddMark, + SuggestionDeleteMark, + SuggestionModificationMark, +} from "../extensions/Suggestions/SuggestionMarks.js"; import { TableHandlesProsemirrorPlugin } from "../extensions/TableHandles/TableHandlesPlugin.js"; import { TextAlignmentExtension } from "../extensions/TextAlignment/TextAlignmentExtension.js"; import { TextColorExtension } from "../extensions/TextColor/TextColorExtension.js"; @@ -49,7 +54,7 @@ import { import type { BlockNoteEditor, BlockNoteEditorOptions, - BlockNoteExtension, + SupportedExtension, } from "./BlockNoteEditor.js"; type ExtensionOptions< @@ -101,7 +106,7 @@ export const getBlockNoteExtensions = < >( opts: ExtensionOptions, ) => { - const ret: Record = {}; + const ret: Record = {}; const tiptapExtensions = getTipTapExtensions(opts); for (const ext of tiptapExtensions) { @@ -139,14 +144,6 @@ export const getBlockNoteExtensions = < ret["tableHandles"] = new TableHandlesProsemirrorPlugin(opts.editor as any); } - ret["dropCursor"] = { - plugin: opts.dropCursor({ - width: 5, - color: "#ddeeff", - editor: opts.editor, - }), - }; - ret["nodeSelectionKeyboard"] = new NodeSelectionKeyboardPlugin(); ret["showSelection"] = new ShowSelectionPlugin(opts.editor); @@ -190,6 +187,17 @@ const getTipTapExtensions = < Gapcursor, // DropCursor, + Extension.create({ + name: "dropCursor", + addProseMirrorPlugins: () => [ + opts.dropCursor({ + width: 5, + color: "#ddeeff", + editor: opts.editor, + }), + ], + }), + UniqueID.configure({ // everything from bnBlock group (nodes that represent a BlockNote block should have an id) types: ["blockContainer", "columnList", "column"], @@ -202,6 +210,9 @@ const getTipTapExtensions = < Text, // marks: + SuggestionAddMark, + SuggestionDeleteMark, + SuggestionModificationMark, Link.extend({ inclusive: false, }).configure({ diff --git a/packages/core/src/editor/BlockNoteTipTapEditor.ts b/packages/core/src/editor/BlockNoteTipTapEditor.ts index 6dd7b2e853..f6458692ea 100644 --- a/packages/core/src/editor/BlockNoteTipTapEditor.ts +++ b/packages/core/src/editor/BlockNoteTipTapEditor.ts @@ -1,5 +1,9 @@ -import { Editor, EditorOptions, createDocument } from "@tiptap/core"; -import { Editor as TiptapEditor } from "@tiptap/core"; +import { + Editor, + EditorOptions, + Editor as TiptapEditor, + createDocument, +} from "@tiptap/core"; import { Node } from "@tiptap/pm/model"; @@ -141,6 +145,10 @@ export class BlockNoteTipTapEditor extends TiptapEditor { if (!this.view) { // before view has been initialized this._state = this.state.apply(transaction); + this.emit("transaction", { + editor: this, + transaction, + }); return; } // This is a verbatim copy of the default dispatch method, but with the following changes: @@ -216,6 +224,19 @@ export class BlockNoteTipTapEditor extends TiptapEditor { }); } + // a helper method that can enable plugins before the view has been initialized + // currently only used for testing + forceEnablePlugins() { + if (this.view) { + throw new Error( + "forcePluginsEnabled called after view has been initialized", + ); + } + this._state = this.state.reconfigure({ + plugins: this.extensionManager.plugins, + }); + } + /** * Replace the default `createView` method with a custom one - which we call on mount */ diff --git a/packages/core/src/extensions/Collaboration/CursorPlugin.ts b/packages/core/src/extensions/Collaboration/CursorPlugin.ts index 6a6b9896f1..fa16582ec4 100644 --- a/packages/core/src/extensions/Collaboration/CursorPlugin.ts +++ b/packages/core/src/extensions/Collaboration/CursorPlugin.ts @@ -1,7 +1,7 @@ -import { Plugin } from "prosemirror-state"; import { defaultSelectionBuilder, yCursorPlugin } from "y-prosemirror"; import { Awareness } from "y-protocols/awareness.js"; import * as Y from "yjs"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; export type CollaborationUser = { name: string; @@ -9,8 +9,7 @@ export type CollaborationUser = { [key: string]: string; }; -export class CursorPlugin { - public plugin: Plugin; +export class CursorPlugin extends BlockNoteExtension { private provider: { awareness: Awareness }; private recentlyUpdatedCursors: Map< number, @@ -25,6 +24,7 @@ export class CursorPlugin { showCursorLabels?: "always" | "activity"; }, ) { + super(); this.provider = collaboration.provider; this.recentlyUpdatedCursors = new Map(); @@ -62,10 +62,12 @@ export class CursorPlugin { ); } - this.plugin = yCursorPlugin(this.provider.awareness, { - selectionBuilder: defaultSelectionBuilder, - cursorBuilder: this.renderCursor, - }); + this.addProsemirrorPlugin( + yCursorPlugin(this.provider.awareness, { + selectionBuilder: defaultSelectionBuilder, + cursorBuilder: this.renderCursor, + }), + ); } public get priority() { diff --git a/packages/core/src/extensions/Collaboration/SyncPlugin.ts b/packages/core/src/extensions/Collaboration/SyncPlugin.ts index 00e3cc7006..58a2abdc4b 100644 --- a/packages/core/src/extensions/Collaboration/SyncPlugin.ts +++ b/packages/core/src/extensions/Collaboration/SyncPlugin.ts @@ -1,12 +1,11 @@ -import { Plugin } from "prosemirror-state"; import { ySyncPlugin } from "y-prosemirror"; import type * as Y from "yjs"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; -export class SyncPlugin { - public plugin: Plugin; - +export class SyncPlugin extends BlockNoteExtension { constructor(fragment: Y.XmlFragment) { - this.plugin = ySyncPlugin(fragment); + super(); + this.addProsemirrorPlugin(ySyncPlugin(fragment)); } public get priority() { diff --git a/packages/core/src/extensions/Collaboration/UndoPlugin.ts b/packages/core/src/extensions/Collaboration/UndoPlugin.ts index 87d39ee5ec..09a5493427 100644 --- a/packages/core/src/extensions/Collaboration/UndoPlugin.ts +++ b/packages/core/src/extensions/Collaboration/UndoPlugin.ts @@ -1,11 +1,10 @@ -import { Plugin } from "prosemirror-state"; import { yUndoPlugin } from "y-prosemirror"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; -export class UndoPlugin { - public plugin: Plugin; - +export class UndoPlugin extends BlockNoteExtension { constructor() { - this.plugin = yUndoPlugin(); + super(); + this.addProsemirrorPlugin(yUndoPlugin()); } public get priority() { diff --git a/packages/core/src/extensions/Comments/CommentsPlugin.ts b/packages/core/src/extensions/Comments/CommentsPlugin.ts index f28e27a6b3..d21a9bd088 100644 --- a/packages/core/src/extensions/Comments/CommentsPlugin.ts +++ b/packages/core/src/extensions/Comments/CommentsPlugin.ts @@ -9,7 +9,7 @@ import type { User, } from "../../comments/index.js"; import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js"; -import { EventEmitter } from "../../util/EventEmitter.js"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; import { UserStore } from "./userstore/UserStore.js"; const PLUGIN_KEY = new PluginKey(`blocknote-comments`); @@ -56,8 +56,7 @@ function getUpdatedThreadPositions(doc: Node, markType: string) { return threadPositions; } -export class CommentsPlugin extends EventEmitter { - public readonly plugin: Plugin; +export class CommentsPlugin extends BlockNoteExtension { public readonly userStore: UserStore; /** @@ -103,6 +102,7 @@ export class CommentsPlugin extends EventEmitter { const trimmedTo = Math.min( pos + node.nodeSize, tr.doc.content.size - 1, + tr.doc.content.size - 1, ); tr.removeMark(trimmedFrom, trimmedTo, mark); tr.addMark( @@ -156,86 +156,91 @@ export class CommentsPlugin extends EventEmitter { // eslint-disable-next-line @typescript-eslint/no-this-alias const self = this; - this.plugin = new Plugin({ - key: PLUGIN_KEY, - state: { - init() { - return { - decorations: DecorationSet.empty, - }; - }, - apply(tr, state) { - const action = tr.getMeta(PLUGIN_KEY); - - if (!tr.docChanged && !action) { - return state; - } + this.addProsemirrorPlugin( + new Plugin({ + key: PLUGIN_KEY, + state: { + init() { + return { + decorations: DecorationSet.empty, + }; + }, + apply(tr, state) { + const action = tr.getMeta(PLUGIN_KEY); + + if (!tr.docChanged && !action) { + return state; + } - // only update threadPositions if the doc changed - const threadPositions = tr.docChanged - ? getUpdatedThreadPositions(tr.doc, self.markType) - : self.threadPositions; + // only update threadPositions if the doc changed + const threadPositions = tr.docChanged + ? getUpdatedThreadPositions(tr.doc, self.markType) + : self.threadPositions; - if (threadPositions.size > 0 || self.threadPositions.size > 0) { - // small optimization; don't emit event if threadPositions before / after were both empty - self.threadPositions = threadPositions; - self.emitStateUpdate(); - } - - // update decorations if doc or selected thread changed - const decorations = []; + if (threadPositions.size > 0 || self.threadPositions.size > 0) { + // small optimization; don't emit event if threadPositions before / after were both empty + self.threadPositions = threadPositions; + self.emitStateUpdate(); + } - if (self.selectedThreadId) { - const selectedThreadPosition = threadPositions.get( - self.selectedThreadId, - ); + // update decorations if doc or selected thread changed + const decorations = []; - if (selectedThreadPosition) { - decorations.push( - Decoration.inline( - selectedThreadPosition.from, - selectedThreadPosition.to, - { - class: "bn-thread-mark-selected", - }, - ), + if (self.selectedThreadId) { + const selectedThreadPosition = threadPositions.get( + self.selectedThreadId, ); + + if (selectedThreadPosition) { + decorations.push( + Decoration.inline( + selectedThreadPosition.from, + selectedThreadPosition.to, + { + class: "bn-thread-mark-selected", + }, + ), + ); + } } - } - return { - decorations: DecorationSet.create(tr.doc, decorations), - }; - }, - }, - props: { - decorations(state) { - return PLUGIN_KEY.getState(state)?.decorations ?? DecorationSet.empty; + return { + decorations: DecorationSet.create(tr.doc, decorations), + }; + }, }, - /** - * Handle click on a thread mark and mark it as selected - */ - handleClick: (view, pos, event) => { - if (event.button !== 0) { - return; - } + props: { + decorations(state) { + return ( + PLUGIN_KEY.getState(state)?.decorations ?? DecorationSet.empty + ); + }, + /** + * Handle click on a thread mark and mark it as selected + */ + handleClick: (view, pos, event) => { + if (event.button !== 0) { + return; + } - const node = view.state.doc.nodeAt(pos); + const node = view.state.doc.nodeAt(pos); - if (!node) { - self.selectThread(undefined); - return; - } + if (!node) { + self.selectThread(undefined); + return; + } - const commentMark = node.marks.find( - (mark) => mark.type.name === markType && mark.attrs.orphan !== true, - ); + const commentMark = node.marks.find( + (mark) => + mark.type.name === markType && mark.attrs.orphan !== true, + ); - const threadId = commentMark?.attrs.threadId as string | undefined; - self.selectThread(threadId, false); + const threadId = commentMark?.attrs.threadId as string | undefined; + self.selectThread(threadId, false); + }, }, - }, - }); + }), + ); } /** diff --git a/packages/core/src/extensions/FilePanel/FilePanelPlugin.ts b/packages/core/src/extensions/FilePanel/FilePanelPlugin.ts index 66d4c86f9f..979edd6ccd 100644 --- a/packages/core/src/extensions/FilePanel/FilePanelPlugin.ts +++ b/packages/core/src/extensions/FilePanel/FilePanelPlugin.ts @@ -1,7 +1,9 @@ import { EditorState, Plugin, PluginKey, PluginView } from "prosemirror-state"; import { EditorView } from "prosemirror-view"; +import { ySyncPluginKey } from "y-prosemirror"; import type { BlockNoteEditor } from "../../editor/BlockNoteEditor.js"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; import { UiElementPosition } from "../../extensions-shared/UiElementPosition.js"; import type { BlockFromConfig, @@ -9,8 +11,6 @@ import type { InlineContentSchema, StyleSchema, } from "../../schema/index.js"; -import { EventEmitter } from "../../util/EventEmitter.js"; -import { ySyncPluginKey } from "y-prosemirror"; export type FilePanelState< I extends InlineContentSchema, @@ -138,60 +138,61 @@ const filePanelPluginKey = new PluginKey>( export class FilePanelProsemirrorPlugin< I extends InlineContentSchema, S extends StyleSchema, -> extends EventEmitter { +> extends BlockNoteExtension { private view: FilePanelView | undefined; - public readonly plugin: Plugin; constructor(editor: BlockNoteEditor, I, S>) { super(); - this.plugin = new Plugin<{ - block: BlockFromConfig | undefined; - }>({ - key: filePanelPluginKey, - view: (editorView) => { - this.view = new FilePanelView( - editor, - filePanelPluginKey, - editorView, - (state) => { - this.emit("update", state); - }, - ); - return this.view; - }, - props: { - handleKeyDown: (_view, event: KeyboardEvent) => { - if (event.key === "Escape" && this.shown) { - this.view?.closeMenu(); - return true; - } - return false; + this.addProsemirrorPlugin( + new Plugin<{ + block: BlockFromConfig | undefined; + }>({ + key: filePanelPluginKey, + view: (editorView) => { + this.view = new FilePanelView( + editor, + filePanelPluginKey, + editorView, + (state) => { + this.emit("update", state); + }, + ); + return this.view; }, - }, - state: { - init: () => { - return { - block: undefined, - }; + props: { + handleKeyDown: (_view, event: KeyboardEvent) => { + if (event.key === "Escape" && this.shown) { + this.view?.closeMenu(); + return true; + } + return false; + }, }, - apply: (transaction, prev) => { - const state: FilePanelState | undefined = - transaction.getMeta(filePanelPluginKey); - - if (state) { - return state; - } - - if ( - !transaction.getMeta(ySyncPluginKey) && - (transaction.selectionSet || transaction.docChanged) - ) { - return { block: undefined }; - } - return prev; + state: { + init: () => { + return { + block: undefined, + }; + }, + apply: (transaction, prev) => { + const state: FilePanelState | undefined = + transaction.getMeta(filePanelPluginKey); + + if (state) { + return state; + } + + if ( + !transaction.getMeta(ySyncPluginKey) && + (transaction.selectionSet || transaction.docChanged) + ) { + return { block: undefined }; + } + return prev; + }, }, - }, - }); + }), + ); } public get shown() { diff --git a/packages/core/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts b/packages/core/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts index 94f789c70c..6867f829ed 100644 --- a/packages/core/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +++ b/packages/core/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts @@ -3,13 +3,13 @@ import { EditorState, Plugin, PluginKey, PluginView } from "prosemirror-state"; import { EditorView } from "prosemirror-view"; import type { BlockNoteEditor } from "../../editor/BlockNoteEditor.js"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; import { UiElementPosition } from "../../extensions-shared/UiElementPosition.js"; import { BlockSchema, InlineContentSchema, StyleSchema, } from "../../schema/index.js"; -import { EventEmitter } from "../../util/EventEmitter.js"; export type FormattingToolbarState = UiElementPosition; @@ -25,7 +25,7 @@ export class FormattingToolbarView implements PluginView { state: EditorState; from: number; to: number; - }) => boolean = ({ state, from, to }) => { + }) => boolean = ({ view, state, from, to }) => { const { doc, selection } = state; const { empty } = selection; @@ -43,7 +43,15 @@ export class FormattingToolbarView implements PluginView { return false; } - return !(empty || isEmptyTextBlock); + if (empty || isEmptyTextBlock) { + return false; + } + + if (!view.hasFocus() && view.editable) { + // editable editors must have focus for the toolbar to show + return false; + } + return true; }; constructor( @@ -236,30 +244,31 @@ export const formattingToolbarPluginKey = new PluginKey( "FormattingToolbarPlugin", ); -export class FormattingToolbarProsemirrorPlugin extends EventEmitter { +export class FormattingToolbarProsemirrorPlugin extends BlockNoteExtension { private view: FormattingToolbarView | undefined; - public readonly plugin: Plugin; constructor(editor: BlockNoteEditor) { super(); - this.plugin = new Plugin({ - key: formattingToolbarPluginKey, - view: (editorView) => { - this.view = new FormattingToolbarView(editor, editorView, (state) => { - this.emit("update", state); - }); - return this.view; - }, - props: { - handleKeyDown: (_view, event: KeyboardEvent) => { - if (event.key === "Escape" && this.shown) { - this.view!.closeMenu(); - return true; - } - return false; + this.addProsemirrorPlugin( + new Plugin({ + key: formattingToolbarPluginKey, + view: (editorView) => { + this.view = new FormattingToolbarView(editor, editorView, (state) => { + this.emit("update", state); + }); + return this.view; }, - }, - }); + props: { + handleKeyDown: (_view, event: KeyboardEvent) => { + if (event.key === "Escape" && this.shown) { + this.view!.closeMenu(); + return true; + } + return false; + }, + }, + }), + ); } public get shown() { diff --git a/packages/core/src/extensions/LinkToolbar/LinkToolbarPlugin.ts b/packages/core/src/extensions/LinkToolbar/LinkToolbarPlugin.ts index c1a8a669b0..09a905a714 100644 --- a/packages/core/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +++ b/packages/core/src/extensions/LinkToolbar/LinkToolbarPlugin.ts @@ -4,15 +4,15 @@ import { EditorView } from "@tiptap/pm/view"; import { Mark } from "prosemirror-model"; import { EditorState, Plugin, PluginKey, PluginView } from "prosemirror-state"; +import { getPmSchema } from "../../api/pmUtil.js"; import type { BlockNoteEditor } from "../../editor/BlockNoteEditor.js"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; import { UiElementPosition } from "../../extensions-shared/UiElementPosition.js"; import { BlockSchema, InlineContentSchema, StyleSchema, } from "../../schema/index.js"; -import { EventEmitter } from "../../util/EventEmitter.js"; -import { getPmSchema } from "../../api/pmUtil.js"; export type LinkToolbarState = UiElementPosition & { // The hovered link's URL, and the text it's displayed with in the @@ -301,30 +301,31 @@ export class LinkToolbarProsemirrorPlugin< BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema, -> extends EventEmitter { +> extends BlockNoteExtension { private view: LinkToolbarView | undefined; - public readonly plugin: Plugin; constructor(editor: BlockNoteEditor) { super(); - this.plugin = new Plugin({ - key: linkToolbarPluginKey, - view: (editorView) => { - this.view = new LinkToolbarView(editor, editorView, (state) => { - this.emit("update", state); - }); - return this.view; - }, - props: { - handleKeyDown: (_view, event: KeyboardEvent) => { - if (event.key === "Escape" && this.shown) { - this.view!.closeMenu(); - return true; - } - return false; + this.addProsemirrorPlugin( + new Plugin({ + key: linkToolbarPluginKey, + view: (editorView) => { + this.view = new LinkToolbarView(editor, editorView, (state) => { + this.emit("update", state); + }); + return this.view; }, - }, - }); + props: { + handleKeyDown: (_view, event: KeyboardEvent) => { + if (event.key === "Escape" && this.shown) { + this.view!.closeMenu(); + return true; + } + return false; + }, + }, + }), + ); } public onUpdate(callback: (state: LinkToolbarState) => void) { diff --git a/packages/core/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts b/packages/core/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts index c6e37b500e..025701fce9 100644 --- a/packages/core/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts +++ b/packages/core/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts @@ -1,4 +1,5 @@ import { Plugin, PluginKey, TextSelection } from "prosemirror-state"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; const PLUGIN_KEY = new PluginKey("node-selection-keyboard"); // By default, typing with a node selection active will cause ProseMirror to @@ -15,54 +16,56 @@ const PLUGIN_KEY = new PluginKey("node-selection-keyboard"); // While a more elegant solution would probably process transactions instead of // keystrokes, this brings us most of the way to Notion's UX without much added // complexity. -export class NodeSelectionKeyboardPlugin { - public readonly plugin: Plugin; +export class NodeSelectionKeyboardPlugin extends BlockNoteExtension { constructor() { - this.plugin = new Plugin({ - key: PLUGIN_KEY, - props: { - handleKeyDown: (view, event) => { - // Checks for node selection - if ("node" in view.state.selection) { - // Checks if key press uses ctrl/meta modifier - if (event.ctrlKey || event.metaKey) { - return false; - } - // Checks if key press is alphanumeric - if (event.key.length === 1) { - event.preventDefault(); + super(); + this.addProsemirrorPlugin( + new Plugin({ + key: PLUGIN_KEY, + props: { + handleKeyDown: (view, event) => { + // Checks for node selection + if ("node" in view.state.selection) { + // Checks if key press uses ctrl/meta modifier + if (event.ctrlKey || event.metaKey) { + return false; + } + // Checks if key press is alphanumeric + if (event.key.length === 1) { + event.preventDefault(); - return true; - } - // Checks if key press is Enter - if ( - event.key === "Enter" && - !event.shiftKey && - !event.altKey && - !event.ctrlKey && - !event.metaKey - ) { - const tr = view.state.tr; - view.dispatch( - tr - .insert( - view.state.tr.selection.$to.after(), - view.state.schema.nodes["paragraph"].createChecked(), - ) - .setSelection( - new TextSelection( - tr.doc.resolve(view.state.tr.selection.$to.after() + 1), + return true; + } + // Checks if key press is Enter + if ( + event.key === "Enter" && + !event.shiftKey && + !event.altKey && + !event.ctrlKey && + !event.metaKey + ) { + const tr = view.state.tr; + view.dispatch( + tr + .insert( + view.state.tr.selection.$to.after(), + view.state.schema.nodes["paragraph"].createChecked(), + ) + .setSelection( + new TextSelection( + tr.doc.resolve(view.state.tr.selection.$to.after() + 1), + ), ), - ), - ); + ); - return true; + return true; + } } - } - return false; + return false; + }, }, - }, - }); + }), + ); } } diff --git a/packages/core/src/extensions/Placeholder/PlaceholderPlugin.ts b/packages/core/src/extensions/Placeholder/PlaceholderPlugin.ts index a749e490d1..13d94cff9e 100644 --- a/packages/core/src/extensions/Placeholder/PlaceholderPlugin.ts +++ b/packages/core/src/extensions/Placeholder/PlaceholderPlugin.ts @@ -2,11 +2,11 @@ import { Plugin, PluginKey } from "prosemirror-state"; import { Decoration, DecorationSet } from "prosemirror-view"; import { v4 } from "uuid"; import type { BlockNoteEditor } from "../../editor/BlockNoteEditor.js"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; const PLUGIN_KEY = new PluginKey(`blocknote-placeholder`); -export class PlaceholderPlugin { - public readonly plugin: Plugin; +export class PlaceholderPlugin extends BlockNoteExtension { constructor( editor: BlockNoteEditor, placeholders: Record< @@ -14,127 +14,130 @@ export class PlaceholderPlugin { string | undefined >, ) { - this.plugin = new Plugin({ - key: PLUGIN_KEY, - view: (view) => { - const uniqueEditorSelector = `placeholder-selector-${v4()}`; - view.dom.classList.add(uniqueEditorSelector); - const styleEl = document.createElement("style"); - - const nonce = editor._tiptapEditor.options.injectNonce; - if (nonce) { - styleEl.setAttribute("nonce", nonce); - } - - if (editor.prosemirrorView?.root instanceof ShadowRoot) { - editor.prosemirrorView.root.append(styleEl); - } else { - editor.prosemirrorView?.root.head.appendChild(styleEl); - } - - const styleSheet = styleEl.sheet!; - - const getSelector = (additionalSelectors = "") => - `.${uniqueEditorSelector} .bn-block-content${additionalSelectors} .bn-inline-content:has(> .ProseMirror-trailingBreak:only-child):before`; - - try { - // FIXME: the names "default" and "emptyDocument" are hardcoded - const { - default: defaultPlaceholder, - emptyDocument: emptyPlaceholder, - ...rest - } = placeholders; - - // add block specific placeholders - for (const [blockType, placeholder] of Object.entries(rest)) { - const blockTypeSelector = `[data-content-type="${blockType}"]`; + super(); + this.addProsemirrorPlugin( + new Plugin({ + key: PLUGIN_KEY, + view: (view) => { + const uniqueEditorSelector = `placeholder-selector-${v4()}`; + view.dom.classList.add(uniqueEditorSelector); + const styleEl = document.createElement("style"); + + const nonce = editor._tiptapEditor.options.injectNonce; + if (nonce) { + styleEl.setAttribute("nonce", nonce); + } + + if (editor.prosemirrorView?.root instanceof ShadowRoot) { + editor.prosemirrorView.root.append(styleEl); + } else { + editor.prosemirrorView?.root.head.appendChild(styleEl); + } + + const styleSheet = styleEl.sheet!; + const getSelector = (additionalSelectors = "") => + `.${uniqueEditorSelector} .bn-block-content${additionalSelectors} .bn-inline-content:has(> .ProseMirror-trailingBreak:only-child):before`; + + try { + // FIXME: the names "default" and "emptyDocument" are hardcoded + const { + default: defaultPlaceholder, + emptyDocument: emptyPlaceholder, + ...rest + } = placeholders; + + // add block specific placeholders + for (const [blockType, placeholder] of Object.entries(rest)) { + const blockTypeSelector = `[data-content-type="${blockType}"]`; + + styleSheet.insertRule( + `${getSelector(blockTypeSelector)} { content: ${JSON.stringify( + placeholder, + )}; }`, + ); + } + + const onlyBlockSelector = `[data-is-only-empty-block]`; + const mustBeFocusedSelector = `[data-is-empty-and-focused]`; + + // placeholder for when there's only one empty block styleSheet.insertRule( - `${getSelector(blockTypeSelector)} { content: ${JSON.stringify( - placeholder, + `${getSelector(onlyBlockSelector)} { content: ${JSON.stringify( + emptyPlaceholder, )}; }`, ); + + // placeholder for default blocks, only when the cursor is in the block (mustBeFocused) + styleSheet.insertRule( + `${getSelector(mustBeFocusedSelector)} { content: ${JSON.stringify( + defaultPlaceholder, + )}; }`, + ); + } catch (e) { + // eslint-disable-next-line no-console + console.warn( + `Failed to insert placeholder CSS rule - this is likely due to the browser not supporting certain CSS pseudo-element selectors (:has, :only-child:, or :before)`, + e, + ); } - const onlyBlockSelector = `[data-is-only-empty-block]`; - const mustBeFocusedSelector = `[data-is-empty-and-focused]`; - - // placeholder for when there's only one empty block - styleSheet.insertRule( - `${getSelector(onlyBlockSelector)} { content: ${JSON.stringify( - emptyPlaceholder, - )}; }`, - ); - - // placeholder for default blocks, only when the cursor is in the block (mustBeFocused) - styleSheet.insertRule( - `${getSelector(mustBeFocusedSelector)} { content: ${JSON.stringify( - defaultPlaceholder, - )}; }`, - ); - } catch (e) { - // eslint-disable-next-line no-console - console.warn( - `Failed to insert placeholder CSS rule - this is likely due to the browser not supporting certain CSS pseudo-element selectors (:has, :only-child:, or :before)`, - e, - ); - } - - return { - destroy: () => { - if (editor.prosemirrorView?.root instanceof ShadowRoot) { - editor.prosemirrorView.root.removeChild(styleEl); - } else { - editor.prosemirrorView?.root.head.removeChild(styleEl); + return { + destroy: () => { + if (editor.prosemirrorView?.root instanceof ShadowRoot) { + editor.prosemirrorView.root.removeChild(styleEl); + } else { + editor.prosemirrorView?.root.head.removeChild(styleEl); + } + }, + }; + }, + props: { + decorations: (state) => { + const { doc, selection } = state; + + if (!editor.isEditable) { + return; } - }, - }; - }, - props: { - decorations: (state) => { - const { doc, selection } = state; - - if (!editor.isEditable) { - return; - } - if (!selection.empty) { - return; - } + if (!selection.empty) { + return; + } - // Don't show placeholder when the cursor is inside a code block - if (selection.$from.parent.type.spec.code) { - return; - } + // Don't show placeholder when the cursor is inside a code block + if (selection.$from.parent.type.spec.code) { + return; + } - const decs = []; + const decs = []; - // decoration for when there's only one empty block - // positions are hardcoded for now - if (state.doc.content.size === 6) { - decs.push( - Decoration.node(2, 4, { - "data-is-only-empty-block": "true", - }), - ); - } + // decoration for when there's only one empty block + // positions are hardcoded for now + if (state.doc.content.size === 6) { + decs.push( + Decoration.node(2, 4, { + "data-is-only-empty-block": "true", + }), + ); + } - const $pos = selection.$anchor; - const node = $pos.parent; + const $pos = selection.$anchor; + const node = $pos.parent; - if (node.content.size === 0) { - const before = $pos.before(); + if (node.content.size === 0) { + const before = $pos.before(); - decs.push( - Decoration.node(before, before + node.nodeSize, { - "data-is-empty-and-focused": "true", - }), - ); - } + decs.push( + Decoration.node(before, before + node.nodeSize, { + "data-is-empty-and-focused": "true", + }), + ); + } - return DecorationSet.create(doc, decs); + return DecorationSet.create(doc, decs); + }, }, - }, - }); + }), + ); } } diff --git a/packages/core/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts b/packages/core/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts index 764614c463..70fc5aa0b4 100644 --- a/packages/core/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts +++ b/packages/core/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts @@ -1,6 +1,7 @@ import { findChildren } from "@tiptap/core"; import { Plugin, PluginKey } from "prosemirror-state"; import { Decoration, DecorationSet } from "prosemirror-view"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; const PLUGIN_KEY = new PluginKey(`previous-blocks`); @@ -23,199 +24,207 @@ const nodeAttributes: Record = { * * Solution: When attributes change on a node, this plugin sets a data-* attribute with the "previous" value. This way we can still use CSS transitions. (See block.module.css) */ -export class PreviousBlockTypePlugin { - public readonly plugin: Plugin; +export class PreviousBlockTypePlugin extends BlockNoteExtension { constructor() { + super(); let timeout: ReturnType; - this.plugin = new Plugin({ - key: PLUGIN_KEY, - view(_editorView) { - return { - update: async (view, _prevState) => { - if (this.key?.getState(view.state).updatedBlocks.size > 0) { - // use setTimeout 0 to clear the decorations so that at least - // for one DOM-render the decorations have been applied - timeout = setTimeout(() => { - view.dispatch( - view.state.tr.setMeta(PLUGIN_KEY, { clearUpdate: true }), - ); - }, 0); - } - }, - destroy: () => { - if (timeout) { - clearTimeout(timeout); - } - }, - }; - }, - state: { - init() { + this.addProsemirrorPlugin( + new Plugin({ + key: PLUGIN_KEY, + view(_editorView) { return { - // Block attributes, by block ID, from just before the previous transaction. - prevTransactionOldBlockAttrs: {} as any, - // Block attributes, by block ID, from just before the current transaction. - currentTransactionOldBlockAttrs: {} as any, - // Set of IDs of blocks whose attributes changed from the current transaction. - updatedBlocks: new Set(), + update: async (view, _prevState) => { + if (this.key?.getState(view.state).updatedBlocks.size > 0) { + // use setTimeout 0 to clear the decorations so that at least + // for one DOM-render the decorations have been applied + timeout = setTimeout(() => { + view.dispatch( + view.state.tr.setMeta(PLUGIN_KEY, { clearUpdate: true }), + ); + }, 0); + } + }, + destroy: () => { + if (timeout) { + clearTimeout(timeout); + } + }, }; }, + state: { + init() { + return { + // Block attributes, by block ID, from just before the previous transaction. + prevTransactionOldBlockAttrs: {} as any, + // Block attributes, by block ID, from just before the current transaction. + currentTransactionOldBlockAttrs: {} as any, + // Set of IDs of blocks whose attributes changed from the current transaction. + updatedBlocks: new Set(), + }; + }, - apply(transaction, prev, oldState, newState) { - prev.currentTransactionOldBlockAttrs = {}; - prev.updatedBlocks.clear(); + apply(transaction, prev, oldState, newState) { + prev.currentTransactionOldBlockAttrs = {}; + prev.updatedBlocks.clear(); - if (!transaction.docChanged || oldState.doc.eq(newState.doc)) { - return prev; - } - - // TODO: Instead of iterating through the entire document, only check nodes affected by the transactions. Will - // also probably require checking nodes affected by the previous transaction too. - // We didn't get this to work yet: - // const transform = combineTransactionSteps(oldState.doc, [transaction]); - // // const { mapping } = transform; - // const changes = getChangedRanges(transform); - // - // changes.forEach(({ oldRange, newRange }) => { - // const oldNodes = findChildrenInRange( - // oldState.doc, - // oldRange, - // (node) => node.attrs.id - // ); - // - // const newNodes = findChildrenInRange( - // newState.doc, - // newRange, - // (node) => node.attrs.id - // ); - - const currentTransactionOriginalOldBlockAttrs = {} as any; - - const oldNodes = findChildren(oldState.doc, (node) => node.attrs.id); - const oldNodesById = new Map( - oldNodes.map((node) => [node.node.attrs.id, node]), - ); - const newNodes = findChildren(newState.doc, (node) => node.attrs.id); - - // Traverses all block containers in the new editor state. - for (const node of newNodes) { - const oldNode = oldNodesById.get(node.node.attrs.id); - - const oldContentNode = oldNode?.node.firstChild; - const newContentNode = node.node.firstChild; - - if (oldNode && oldContentNode && newContentNode) { - const newAttrs = { - index: newContentNode.attrs.index, - level: newContentNode.attrs.level, - type: newContentNode.type.name, - depth: newState.doc.resolve(node.pos).depth, - }; - - let oldAttrs = { - index: oldContentNode.attrs.index, - level: oldContentNode.attrs.level, - type: oldContentNode.type.name, - depth: oldState.doc.resolve(oldNode.pos).depth, - }; - - currentTransactionOriginalOldBlockAttrs[node.node.attrs.id] = - oldAttrs; - - // Whenever a transaction is appended by the OrderedListItemIndexPlugin, it's given the metadata: - // { "orderedListIndexing": true } - // These appended transactions happen immediately after any transaction which causes ordered list item - // indices to require updating, including those which trigger animations. Therefore, these animations are - // immediately overridden when the PreviousBlockTypePlugin processes the appended transaction, despite only - // the listItemIndex attribute changing. To solve this, oldAttrs must be edited for transactions with the - // "orderedListIndexing" metadata, so the correct animation can be re-triggered. - if (transaction.getMeta("numberedListIndexing")) { - // If the block existed before the transaction, gets the attributes from before the previous transaction - // (i.e. the transaction that caused list item indices to need updating). - if (node.node.attrs.id in prev.prevTransactionOldBlockAttrs) { - oldAttrs = - prev.prevTransactionOldBlockAttrs[node.node.attrs.id]; - } + if (!transaction.docChanged || oldState.doc.eq(newState.doc)) { + return prev; + } - // Stops list item indices themselves being animated (looks smoother), unless the block's content type is - // changing from a numbered list item to something else. - if (newAttrs.type === "numberedListItem") { - oldAttrs.index = newAttrs.index; + // TODO: Instead of iterating through the entire document, only check nodes affected by the transactions. Will + // also probably require checking nodes affected by the previous transaction too. + // We didn't get this to work yet: + // const transform = combineTransactionSteps(oldState.doc, [transaction]); + // // const { mapping } = transform; + // const changes = getChangedRanges(transform); + // + // changes.forEach(({ oldRange, newRange }) => { + // const oldNodes = findChildrenInRange( + // oldState.doc, + // oldRange, + // (node) => node.attrs.id + // ); + // + // const newNodes = findChildrenInRange( + // newState.doc, + // newRange, + // (node) => node.attrs.id + // ); + + const currentTransactionOriginalOldBlockAttrs = {} as any; + + const oldNodes = findChildren( + oldState.doc, + (node) => node.attrs.id, + ); + const oldNodesById = new Map( + oldNodes.map((node) => [node.node.attrs.id, node]), + ); + const newNodes = findChildren( + newState.doc, + (node) => node.attrs.id, + ); + + // Traverses all block containers in the new editor state. + for (const node of newNodes) { + const oldNode = oldNodesById.get(node.node.attrs.id); + + const oldContentNode = oldNode?.node.firstChild; + const newContentNode = node.node.firstChild; + + if (oldNode && oldContentNode && newContentNode) { + const newAttrs = { + index: newContentNode.attrs.index, + level: newContentNode.attrs.level, + type: newContentNode.type.name, + depth: newState.doc.resolve(node.pos).depth, + }; + + let oldAttrs = { + index: oldContentNode.attrs.index, + level: oldContentNode.attrs.level, + type: oldContentNode.type.name, + depth: oldState.doc.resolve(oldNode.pos).depth, + }; + + currentTransactionOriginalOldBlockAttrs[node.node.attrs.id] = + oldAttrs; + + // Whenever a transaction is appended by the OrderedListItemIndexPlugin, it's given the metadata: + // { "orderedListIndexing": true } + // These appended transactions happen immediately after any transaction which causes ordered list item + // indices to require updating, including those which trigger animations. Therefore, these animations are + // immediately overridden when the PreviousBlockTypePlugin processes the appended transaction, despite only + // the listItemIndex attribute changing. To solve this, oldAttrs must be edited for transactions with the + // "orderedListIndexing" metadata, so the correct animation can be re-triggered. + if (transaction.getMeta("numberedListIndexing")) { + // If the block existed before the transaction, gets the attributes from before the previous transaction + // (i.e. the transaction that caused list item indices to need updating). + if (node.node.attrs.id in prev.prevTransactionOldBlockAttrs) { + oldAttrs = + prev.prevTransactionOldBlockAttrs[node.node.attrs.id]; + } + + // Stops list item indices themselves being animated (looks smoother), unless the block's content type is + // changing from a numbered list item to something else. + if (newAttrs.type === "numberedListItem") { + oldAttrs.index = newAttrs.index; + } } - } - prev.currentTransactionOldBlockAttrs[node.node.attrs.id] = - oldAttrs; - - // TODO: faster deep equal? - if (JSON.stringify(oldAttrs) !== JSON.stringify(newAttrs)) { - (oldAttrs as any)["depth-change"] = - oldAttrs.depth - newAttrs.depth; - - // for debugging: - // console.log( - // "id:", - // node.node.attrs.id, - // "previousBlockTypePlugin changes detected, oldAttrs", - // oldAttrs, - // "new", - // newAttrs - // ); - - prev.updatedBlocks.add(node.node.attrs.id); + prev.currentTransactionOldBlockAttrs[node.node.attrs.id] = + oldAttrs; + + // TODO: faster deep equal? + if (JSON.stringify(oldAttrs) !== JSON.stringify(newAttrs)) { + (oldAttrs as any)["depth-change"] = + oldAttrs.depth - newAttrs.depth; + + // for debugging: + // console.log( + // "id:", + // node.node.attrs.id, + // "previousBlockTypePlugin changes detected, oldAttrs", + // oldAttrs, + // "new", + // newAttrs + // ); + + prev.updatedBlocks.add(node.node.attrs.id); + } } } - } - prev.prevTransactionOldBlockAttrs = - currentTransactionOriginalOldBlockAttrs; + prev.prevTransactionOldBlockAttrs = + currentTransactionOriginalOldBlockAttrs; - return prev; + return prev; + }, }, - }, - props: { - decorations(state) { - const pluginState = (this as Plugin).getState(state); - if (pluginState.updatedBlocks.size === 0) { - return undefined; - } - - const decorations: Decoration[] = []; - - state.doc.descendants((node, pos) => { - if (!node.attrs.id) { - return; + props: { + decorations(state) { + const pluginState = (this as Plugin).getState(state); + if (pluginState.updatedBlocks.size === 0) { + return undefined; } - if (!pluginState.updatedBlocks.has(node.attrs.id)) { - return; - } + const decorations: Decoration[] = []; - const prevAttrs = - pluginState.currentTransactionOldBlockAttrs[node.attrs.id]; - const decorationAttrs: any = {}; + state.doc.descendants((node, pos) => { + if (!node.attrs.id) { + return; + } - for (const [nodeAttr, val] of Object.entries(prevAttrs)) { - decorationAttrs["data-prev-" + nodeAttributes[nodeAttr]] = - val || "none"; - } + if (!pluginState.updatedBlocks.has(node.attrs.id)) { + return; + } - // for debugging: - // console.log( - // "previousBlockTypePlugin committing decorations", - // decorationAttrs - // ); + const prevAttrs = + pluginState.currentTransactionOldBlockAttrs[node.attrs.id]; + const decorationAttrs: any = {}; - const decoration = Decoration.node(pos, pos + node.nodeSize, { - ...decorationAttrs, - }); + for (const [nodeAttr, val] of Object.entries(prevAttrs)) { + decorationAttrs["data-prev-" + nodeAttributes[nodeAttr]] = + val || "none"; + } + + // for debugging: + // console.log( + // "previousBlockTypePlugin committing decorations", + // decorationAttrs + // ); - decorations.push(decoration); - }); + const decoration = Decoration.node(pos, pos + node.nodeSize, { + ...decorationAttrs, + }); - return DecorationSet.create(state.doc, decorations); + decorations.push(decoration); + }); + + return DecorationSet.create(state.doc, decorations); + }, }, - }, - }); + }), + ); } } diff --git a/packages/core/src/extensions/ShowSelection/ShowSelectionPlugin.ts b/packages/core/src/extensions/ShowSelection/ShowSelectionPlugin.ts index 40cb1e0c49..f692bd744a 100644 --- a/packages/core/src/extensions/ShowSelection/ShowSelectionPlugin.ts +++ b/packages/core/src/extensions/ShowSelection/ShowSelectionPlugin.ts @@ -1,6 +1,7 @@ import { Plugin, PluginKey } from "prosemirror-state"; import { Decoration, DecorationSet } from "prosemirror-view"; import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; const PLUGIN_KEY = new PluginKey(`blocknote-show-selection`); @@ -9,29 +10,31 @@ const PLUGIN_KEY = new PluginKey(`blocknote-show-selection`); * This can be used to highlight the current selection in the UI even when the * text editor is not focused. */ -export class ShowSelectionPlugin { - public readonly plugin: Plugin; +export class ShowSelectionPlugin extends BlockNoteExtension { private enabled = false; public constructor(private readonly editor: BlockNoteEditor) { - this.plugin = new Plugin({ - key: PLUGIN_KEY, - props: { - decorations: (state) => { - const { doc, selection } = state; - - if (!this.enabled) { - return DecorationSet.empty; - } - - const dec = Decoration.inline(selection.from, selection.to, { - "data-show-selection": "true", - }); - - return DecorationSet.create(doc, [dec]); + super(); + this.addProsemirrorPlugin( + new Plugin({ + key: PLUGIN_KEY, + props: { + decorations: (state) => { + const { doc, selection } = state; + + if (!this.enabled) { + return DecorationSet.empty; + } + + const dec = Decoration.inline(selection.from, selection.to, { + "data-show-selection": "true", + }); + + return DecorationSet.create(doc, [dec]); + }, }, - }, - }); + }), + ); } public setEnabled(enabled: boolean) { diff --git a/packages/core/src/extensions/SideMenu/SideMenuPlugin.ts b/packages/core/src/extensions/SideMenu/SideMenuPlugin.ts index 2840eef29b..072cb53725 100644 --- a/packages/core/src/extensions/SideMenu/SideMenuPlugin.ts +++ b/packages/core/src/extensions/SideMenu/SideMenuPlugin.ts @@ -3,20 +3,20 @@ import { EditorState, Plugin, PluginKey, - TextSelection, PluginView, + TextSelection, } from "@tiptap/pm/state"; import { EditorView } from "@tiptap/pm/view"; import { Block } from "../../blocks/defaultBlocks.js"; import type { BlockNoteEditor } from "../../editor/BlockNoteEditor.js"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; import { UiElementPosition } from "../../extensions-shared/UiElementPosition.js"; import { BlockSchema, InlineContentSchema, StyleSchema, } from "../../schema/index.js"; -import { EventEmitter } from "../../util/EventEmitter.js"; import { initializeESMDependencies } from "../../util/esmDependencies.js"; import { getDraggableBlockFromElement } from "../getDraggableBlockFromElement.js"; import { dragStart, unsetDragImage } from "./dragging.js"; @@ -608,29 +608,30 @@ export class SideMenuProsemirrorPlugin< BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema, -> extends EventEmitter { +> extends BlockNoteExtension { public view: SideMenuView | undefined; - public readonly plugin: Plugin; constructor( private readonly editor: BlockNoteEditor, sideMenuDetection: "viewport" | "editor", ) { super(); - this.plugin = new Plugin({ - key: sideMenuPluginKey, - view: (editorView) => { - this.view = new SideMenuView( - editor, - sideMenuDetection, - editorView, - (state) => { - this.emit("update", state); - }, - ); - return this.view; - }, - }); + this.addProsemirrorPlugin( + new Plugin({ + key: sideMenuPluginKey, + view: (editorView) => { + this.view = new SideMenuView( + editor, + sideMenuDetection, + editorView, + (state) => { + this.emit("update", state); + }, + ); + return this.view; + }, + }), + ); } public onUpdate(callback: (state: SideMenuState) => void) { diff --git a/packages/core/src/extensions/SuggestionMenu/SuggestionPlugin.ts b/packages/core/src/extensions/SuggestionMenu/SuggestionPlugin.ts index dfa3170c83..1b202ba89c 100644 --- a/packages/core/src/extensions/SuggestionMenu/SuggestionPlugin.ts +++ b/packages/core/src/extensions/SuggestionMenu/SuggestionPlugin.ts @@ -2,15 +2,15 @@ import { findParentNode } from "@tiptap/core"; import { EditorState, Plugin, PluginKey } from "prosemirror-state"; import { Decoration, DecorationSet, EditorView } from "prosemirror-view"; +import { trackPosition } from "../../api/positionMapping.js"; import type { BlockNoteEditor } from "../../editor/BlockNoteEditor.js"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; import { UiElementPosition } from "../../extensions-shared/UiElementPosition.js"; import { BlockSchema, InlineContentSchema, StyleSchema, } from "../../schema/index.js"; -import { EventEmitter } from "../../util/EventEmitter.js"; -import { trackPosition } from "../../api/positionMapping.js"; const findBlock = findParentNode((node) => node.type.name === "blockContainer"); @@ -166,190 +166,190 @@ export class SuggestionMenuProseMirrorPlugin< BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema, -> extends EventEmitter { +> extends BlockNoteExtension { private view: SuggestionMenuView | undefined; - public readonly plugin: Plugin; - private triggerCharacters: string[] = []; constructor(editor: BlockNoteEditor) { super(); const triggerCharacters = this.triggerCharacters; - this.plugin = new Plugin({ - key: suggestionMenuPluginKey, - - view: () => { - this.view = new SuggestionMenuView( - editor, - (triggerCharacter, state) => { - this.emit(`update ${triggerCharacter}`, state); - }, - ); - return this.view; - }, - - state: { - // Initialize the plugin's internal state. - init(): SuggestionPluginState { - return undefined; + this.addProsemirrorPlugin( + new Plugin({ + key: suggestionMenuPluginKey, + + view: () => { + this.view = new SuggestionMenuView( + editor, + (triggerCharacter, state) => { + this.emit(`update ${triggerCharacter}`, state); + }, + ); + return this.view; }, - // Apply changes to the plugin state from an editor transaction. - apply: ( - transaction, - prev, - _oldState, - newState, - ): SuggestionPluginState => { - // TODO: More clearly define which transactions should be ignored. - if (transaction.getMeta("orderedListIndexing") !== undefined) { - return prev; - } - - // Ignore transactions in code blocks. - if (transaction.selection.$from.parent.type.spec.code) { - return prev; - } - - // Either contains the trigger character if the menu should be shown, - // or null if it should be hidden. - const suggestionPluginTransactionMeta: { - triggerCharacter: string; - deleteTriggerCharacter?: boolean; - ignoreQueryLength?: boolean; - } | null = transaction.getMeta(suggestionMenuPluginKey); - - if ( - typeof suggestionPluginTransactionMeta === "object" && - suggestionPluginTransactionMeta !== null - ) { - if (prev) { - // Close the previous menu if it exists - this.closeMenu(); - } - const trackedPosition = trackPosition( - editor, - newState.selection.from - - // Need to account for the trigger char that was inserted, so we offset the position by the length of the trigger character. - suggestionPluginTransactionMeta.triggerCharacter.length, - ); - return { - triggerCharacter: - suggestionPluginTransactionMeta.triggerCharacter, - deleteTriggerCharacter: - suggestionPluginTransactionMeta.deleteTriggerCharacter !== - false, - // When reading the queryStartPos, we offset the result by the length of the trigger character, to make it easy on the caller - queryStartPos: () => - trackedPosition() + - suggestionPluginTransactionMeta.triggerCharacter.length, - query: "", - decorationId: `id_${Math.floor(Math.random() * 0xffffffff)}`, - ignoreQueryLength: - suggestionPluginTransactionMeta?.ignoreQueryLength, - }; - } - - // Checks if the menu is hidden, in which case it doesn't need to be hidden or updated. - if (prev === undefined) { - return prev; - } - - // Checks if the menu should be hidden. - if ( - // Highlighting text should hide the menu. - newState.selection.from !== newState.selection.to || - // Transactions with plugin metadata should hide the menu. - suggestionPluginTransactionMeta === null || - // Certain mouse events should hide the menu. - // TODO: Change to global mousedown listener. - transaction.getMeta("focus") || - transaction.getMeta("blur") || - transaction.getMeta("pointer") || - // Moving the caret before the character which triggered the menu should hide it. - (prev.triggerCharacter !== undefined && - newState.selection.from < prev.queryStartPos()) || - // Moving the caret to a new block should hide the menu. - !newState.selection.$from.sameParent( - newState.doc.resolve(prev.queryStartPos()), - ) - ) { + state: { + // Initialize the plugin's internal state. + init(): SuggestionPluginState { return undefined; - } + }, - const next = { ...prev }; + // Apply changes to the plugin state from an editor transaction. + apply: ( + transaction, + prev, + _oldState, + newState, + ): SuggestionPluginState => { + // TODO: More clearly define which transactions should be ignored. + if (transaction.getMeta("orderedListIndexing") !== undefined) { + return prev; + } - // Updates the current query. - next.query = newState.doc.textBetween( - prev.queryStartPos(), - newState.selection.from, - ); + // Ignore transactions in code blocks. + if (transaction.selection.$from.parent.type.spec.code) { + return prev; + } - return next; - }, - }, - - props: { - handleTextInput(view, _from, _to, text) { - if (triggerCharacters.includes(text)) { - view.dispatch(view.state.tr.insertText(text)); - view.dispatch( - view.state.tr - .setMeta(suggestionMenuPluginKey, { - triggerCharacter: text, - }) - .scrollIntoView(), + // Either contains the trigger character if the menu should be shown, + // or null if it should be hidden. + const suggestionPluginTransactionMeta: { + triggerCharacter: string; + deleteTriggerCharacter?: boolean; + ignoreQueryLength?: boolean; + } | null = transaction.getMeta(suggestionMenuPluginKey); + + if ( + typeof suggestionPluginTransactionMeta === "object" && + suggestionPluginTransactionMeta !== null + ) { + if (prev) { + // Close the previous menu if it exists + this.closeMenu(); + } + const trackedPosition = trackPosition( + editor, + newState.selection.from - + // Need to account for the trigger char that was inserted, so we offset the position by the length of the trigger character. + suggestionPluginTransactionMeta.triggerCharacter.length, + ); + return { + triggerCharacter: + suggestionPluginTransactionMeta.triggerCharacter, + deleteTriggerCharacter: + suggestionPluginTransactionMeta.deleteTriggerCharacter !== + false, + // When reading the queryStartPos, we offset the result by the length of the trigger character, to make it easy on the caller + queryStartPos: () => + trackedPosition() + + suggestionPluginTransactionMeta.triggerCharacter.length, + query: "", + decorationId: `id_${Math.floor(Math.random() * 0xffffffff)}`, + ignoreQueryLength: + suggestionPluginTransactionMeta?.ignoreQueryLength, + }; + } + + // Checks if the menu is hidden, in which case it doesn't need to be hidden or updated. + if (prev === undefined) { + return prev; + } + + // Checks if the menu should be hidden. + if ( + // Highlighting text should hide the menu. + newState.selection.from !== newState.selection.to || + // Transactions with plugin metadata should hide the menu. + suggestionPluginTransactionMeta === null || + // Certain mouse events should hide the menu. + // TODO: Change to global mousedown listener. + transaction.getMeta("focus") || + transaction.getMeta("blur") || + transaction.getMeta("pointer") || + // Moving the caret before the character which triggered the menu should hide it. + (prev.triggerCharacter !== undefined && + newState.selection.from < prev.queryStartPos()) || + // Moving the caret to a new block should hide the menu. + !newState.selection.$from.sameParent( + newState.doc.resolve(prev.queryStartPos()), + ) + ) { + return undefined; + } + + const next = { ...prev }; + + // Updates the current query. + next.query = newState.doc.textBetween( + prev.queryStartPos(), + newState.selection.from, ); - return true; - } - return false; + return next; + }, }, - // Setup decorator on the currently active suggestion. - decorations(state) { - const suggestionPluginState: SuggestionPluginState = ( - this as Plugin - ).getState(state); - - if (suggestionPluginState === undefined) { - return null; - } - - // If the menu was opened programmatically by another extension, it may not use a trigger character. In this - // case, the decoration is set on the whole block instead, as the decoration range would otherwise be empty. - if (!suggestionPluginState.deleteTriggerCharacter) { - const blockNode = findBlock(state.selection); - if (blockNode) { - return DecorationSet.create(state.doc, [ - Decoration.node( - blockNode.pos, - blockNode.pos + blockNode.node.nodeSize, - { - nodeName: "span", - class: "bn-suggestion-decorator", - "data-decoration-id": suggestionPluginState.decorationId, - }, - ), - ]); + props: { + handleTextInput(view, _from, _to, text) { + if (triggerCharacters.includes(text)) { + view.dispatch(view.state.tr.insertText(text)); + view.dispatch( + view.state.tr + .setMeta(suggestionMenuPluginKey, { + triggerCharacter: text, + }) + .scrollIntoView(), + ); + + return true; + } + return false; + }, + + // Setup decorator on the currently active suggestion. + decorations(state) { + const suggestionPluginState: SuggestionPluginState = ( + this as Plugin + ).getState(state); + + if (suggestionPluginState === undefined) { + return null; } - } - // Creates an inline decoration around the trigger character. - return DecorationSet.create(state.doc, [ - Decoration.inline( - suggestionPluginState.queryStartPos() - - suggestionPluginState.triggerCharacter!.length, - suggestionPluginState.queryStartPos(), - { - nodeName: "span", - class: "bn-suggestion-decorator", - "data-decoration-id": suggestionPluginState.decorationId, - }, - ), - ]); + + // If the menu was opened programmatically by another extension, it may not use a trigger character. In this + // case, the decoration is set on the whole block instead, as the decoration range would otherwise be empty. + if (!suggestionPluginState.deleteTriggerCharacter) { + const blockNode = findBlock(state.selection); + if (blockNode) { + return DecorationSet.create(state.doc, [ + Decoration.node( + blockNode.pos, + blockNode.pos + blockNode.node.nodeSize, + { + nodeName: "span", + class: "bn-suggestion-decorator", + "data-decoration-id": suggestionPluginState.decorationId, + }, + ), + ]); + } + } + // Creates an inline decoration around the trigger character. + return DecorationSet.create(state.doc, [ + Decoration.inline( + suggestionPluginState.queryStartPos() - + suggestionPluginState.triggerCharacter!.length, + suggestionPluginState.queryStartPos(), + { + nodeName: "span", + class: "bn-suggestion-decorator", + "data-decoration-id": suggestionPluginState.decorationId, + }, + ), + ]); + }, }, - }, - }); + }), + ); } public onUpdate( diff --git a/packages/core/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts b/packages/core/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts index 8073694d9d..39e7e024c0 100644 --- a/packages/core/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +++ b/packages/core/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts @@ -235,7 +235,7 @@ export function getDefaultSlashMenuItems< // Immediately open the file toolbar editor.transact((tr) => - tr.setMeta(editor.filePanel!.plugin, { + tr.setMeta(editor.filePanel!.plugins[0], { block: insertedBlock, }), ); @@ -254,7 +254,7 @@ export function getDefaultSlashMenuItems< // Immediately open the file toolbar editor.transact((tr) => - tr.setMeta(editor.filePanel!.plugin, { + tr.setMeta(editor.filePanel!.plugins[0], { block: insertedBlock, }), ); @@ -273,7 +273,7 @@ export function getDefaultSlashMenuItems< // Immediately open the file toolbar editor.transact((tr) => - tr.setMeta(editor.filePanel!.plugin, { + tr.setMeta(editor.filePanel!.plugins[0], { block: insertedBlock, }), ); @@ -292,7 +292,7 @@ export function getDefaultSlashMenuItems< // Immediately open the file toolbar editor.transact((tr) => - tr.setMeta(editor.filePanel!.plugin, { + tr.setMeta(editor.filePanel!.plugins[0], { block: insertedBlock, }), ); diff --git a/packages/core/src/extensions/Suggestions/SuggestionMarks.ts b/packages/core/src/extensions/Suggestions/SuggestionMarks.ts new file mode 100644 index 0000000000..1665c8e5bd --- /dev/null +++ b/packages/core/src/extensions/Suggestions/SuggestionMarks.ts @@ -0,0 +1,175 @@ +import { Mark } from "@tiptap/core"; +import { MarkSpec } from "prosemirror-model"; + +// This copies the marks from @handlewithcare/prosemirror-suggest-changes, +// but uses the Tiptap Mark API instead so we can use them in BlockNote + +// The ideal solution would be to not depend on tiptap nodes / marks, but be able to use prosemirror nodes / marks directly +// this way we could directly use the exported marks from @handlewithcare/prosemirror-suggest-changes +export const SuggestionAddMark = Mark.create({ + name: "insertion", + inclusive: false, + excludes: "deletion modification insertion", + addAttributes() { + return { + id: { default: null, validate: "number" }, // note: validate is supported in prosemirror but not in tiptap, so this doesn't actually work (considered not critical) + }; + }, + extendMarkSchema(extension) { + if (extension.name !== "insertion") { + return {}; + } + return { + blocknoteIgnore: true, + inclusive: false, + + toDOM(mark, inline) { + return [ + "ins", + { + "data-id": String(mark.attrs["id"]), + "data-inline": String(inline), + ...(!inline && { style: "display: contents" }), // changed to "contents" to make this work for table rows + }, + 0, + ]; + }, + parseDOM: [ + { + tag: "ins", + getAttrs(node) { + if (!node.dataset["id"]) { + return false; + } + return { + id: parseInt(node.dataset["id"], 10), + }; + }, + }, + ], + } satisfies MarkSpec; + }, +}); + +export const SuggestionDeleteMark = Mark.create({ + name: "deletion", + inclusive: false, + excludes: "insertion modification deletion", + addAttributes() { + return { + id: { default: null, validate: "number" }, // note: validate is supported in prosemirror but not in tiptap + }; + }, + extendMarkSchema(extension) { + if (extension.name !== "deletion") { + return {}; + } + return { + blocknoteIgnore: true, + inclusive: false, + + // attrs: { + // id: { validate: "number" }, + // }, + toDOM(mark, inline) { + return [ + "del", + { + "data-id": String(mark.attrs["id"]), + "data-inline": String(inline), + ...(!inline && { style: "display: contents" }), // changed to "contents" to make this work for table rows + }, + 0, + ]; + }, + parseDOM: [ + { + tag: "del", + getAttrs(node) { + if (!node.dataset["id"]) { + return false; + } + return { + id: parseInt(node.dataset["id"], 10), + }; + }, + }, + ], + } satisfies MarkSpec; + }, +}); + +export const SuggestionModificationMark = Mark.create({ + name: "modification", + inclusive: false, + excludes: "deletion insertion", + addAttributes() { + // note: validate is supported in prosemirror but not in tiptap + return { + id: { default: null, validate: "number" }, + type: { validate: "string" }, + attrName: { default: null, validate: "string|null" }, + previousValue: { default: null }, + newValue: { default: null }, + }; + }, + extendMarkSchema(extension) { + if (extension.name !== "modification") { + return {}; + } + return { + blocknoteIgnore: true, + inclusive: false, + // attrs: { + // id: { validate: "number" }, + // type: { validate: "string" }, + // attrName: { default: null, validate: "string|null" }, + // previousValue: { default: null }, + // newValue: { default: null }, + // }, + toDOM(mark, inline) { + return [ + inline ? "span" : "div", + { + "data-type": "modification", + "data-id": String(mark.attrs["id"]), + "data-mod-type": mark.attrs["type"] as string, + "data-mod-prev-val": JSON.stringify(mark.attrs["previousValue"]), + // TODO: Try to serialize marks with toJSON? + "data-mod-new-val": JSON.stringify(mark.attrs["newValue"]), + }, + 0, + ]; + }, + parseDOM: [ + { + tag: "span[data-type='modification']", + getAttrs(node) { + if (!node.dataset["id"]) { + return false; + } + return { + id: parseInt(node.dataset["id"], 10), + type: node.dataset["modType"], + previousValue: node.dataset["modPrevVal"], + newValue: node.dataset["modNewVal"], + }; + }, + }, + { + tag: "div[data-type='modification']", + getAttrs(node) { + if (!node.dataset["id"]) { + return false; + } + return { + id: parseInt(node.dataset["id"], 10), + type: node.dataset["modType"], + previousValue: node.dataset["modPrevVal"], + }; + }, + }, + ], + } satisfies MarkSpec; + }, +}); diff --git a/packages/core/src/extensions/TableHandles/TableHandlesPlugin.ts b/packages/core/src/extensions/TableHandles/TableHandlesPlugin.ts index 4cb296f31c..516aa2ca73 100644 --- a/packages/core/src/extensions/TableHandles/TableHandlesPlugin.ts +++ b/packages/core/src/extensions/TableHandles/TableHandlesPlugin.ts @@ -32,13 +32,13 @@ import { } from "../../blocks/defaultBlockTypeGuards.js"; import { DefaultBlockSchema } from "../../blocks/defaultBlocks.js"; import type { BlockNoteEditor } from "../../editor/BlockNoteEditor.js"; +import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js"; import { BlockFromConfigNoChildren, BlockSchemaWithBlock, InlineContentSchema, StyleSchema, } from "../../schema/index.js"; -import { EventEmitter } from "../../util/EventEmitter.js"; import { getDraggableBlockFromElement } from "../getDraggableBlockFromElement.js"; let dragImageElement: HTMLElement | undefined; @@ -617,9 +617,8 @@ export const tableHandlesPluginKey = new PluginKey("TableHandlesPlugin"); export class TableHandlesProsemirrorPlugin< I extends InlineContentSchema, S extends StyleSchema, -> extends EventEmitter { +> extends BlockNoteExtension { private view: TableHandlesView | undefined; - public readonly plugin: Plugin; constructor( private readonly editor: BlockNoteEditor< @@ -629,159 +628,163 @@ export class TableHandlesProsemirrorPlugin< >, ) { super(); - this.plugin = new Plugin({ - key: tableHandlesPluginKey, - view: (editorView) => { - this.view = new TableHandlesView(editor, editorView, (state) => { - this.emit("update", state); - }); - return this.view; - }, - // We use decorations to render the drop cursor when dragging a table row - // or column. The decorations are updated in the `dragOverHandler` method. - props: { - decorations: (state) => { - if ( - this.view === undefined || - this.view.state === undefined || - this.view.state.draggingState === undefined || - this.view.tablePos === undefined - ) { - return; - } - - const newIndex = - this.view.state.draggingState.draggedCellOrientation === "row" - ? this.view.state.rowIndex - : this.view.state.colIndex; - - if (newIndex === undefined) { - return; - } - - const decorations: Decoration[] = []; - const { block, draggingState } = this.view.state; - const { originalIndex, draggedCellOrientation } = draggingState; - - // Return empty decorations if: - // - Dragging to same position - // - No block exists - // - Row drag not allowed - // - Column drag not allowed - if ( - newIndex === originalIndex || - !block || - (draggedCellOrientation === "row" && - !canRowBeDraggedInto(block, originalIndex, newIndex)) || - (draggedCellOrientation === "col" && - !canColumnBeDraggedInto(block, originalIndex, newIndex)) - ) { - return DecorationSet.create(state.doc, decorations); - } - - // Gets the table to show the drop cursor in. - const tableResolvedPos = state.doc.resolve(this.view.tablePos + 1); - - if (this.view.state.draggingState.draggedCellOrientation === "row") { - const cellsInRow = getCellsAtRowHandle( - this.view.state.block, - newIndex, - ); - - cellsInRow.forEach(({ row, col }) => { - // Gets each row in the table. - const rowResolvedPos = state.doc.resolve( - tableResolvedPos.posAtIndex(row) + 1, + this.addProsemirrorPlugin( + new Plugin({ + key: tableHandlesPluginKey, + view: (editorView) => { + this.view = new TableHandlesView(editor, editorView, (state) => { + this.emit("update", state); + }); + return this.view; + }, + // We use decorations to render the drop cursor when dragging a table row + // or column. The decorations are updated in the `dragOverHandler` method. + props: { + decorations: (state) => { + if ( + this.view === undefined || + this.view.state === undefined || + this.view.state.draggingState === undefined || + this.view.tablePos === undefined + ) { + return; + } + + const newIndex = + this.view.state.draggingState.draggedCellOrientation === "row" + ? this.view.state.rowIndex + : this.view.state.colIndex; + + if (newIndex === undefined) { + return; + } + + const decorations: Decoration[] = []; + const { block, draggingState } = this.view.state; + const { originalIndex, draggedCellOrientation } = draggingState; + + // Return empty decorations if: + // - Dragging to same position + // - No block exists + // - Row drag not allowed + // - Column drag not allowed + if ( + newIndex === originalIndex || + !block || + (draggedCellOrientation === "row" && + !canRowBeDraggedInto(block, originalIndex, newIndex)) || + (draggedCellOrientation === "col" && + !canColumnBeDraggedInto(block, originalIndex, newIndex)) + ) { + return DecorationSet.create(state.doc, decorations); + } + + // Gets the table to show the drop cursor in. + const tableResolvedPos = state.doc.resolve(this.view.tablePos + 1); + + if ( + this.view.state.draggingState.draggedCellOrientation === "row" + ) { + const cellsInRow = getCellsAtRowHandle( + this.view.state.block, + newIndex, ); - // Gets the cell within the row. - const cellResolvedPos = state.doc.resolve( - rowResolvedPos.posAtIndex(col) + 1, - ); - const cellNode = cellResolvedPos.node(); - // Creates a decoration at the start or end of each cell, - // depending on whether the new index is before or after the - // original index. - const decorationPos = - cellResolvedPos.pos + - (newIndex > originalIndex ? cellNode.nodeSize - 2 : 0); - decorations.push( - // The widget is a small bar which spans the width of the cell. - Decoration.widget(decorationPos, () => { - const widget = document.createElement("div"); - widget.className = "bn-table-drop-cursor"; - widget.style.left = "0"; - widget.style.right = "0"; - // This is only necessary because the drop indicator's height - // is an even number of pixels, whereas the border between - // table cells is an odd number of pixels. So this makes the - // positioning slightly more consistent regardless of where - // the row is being dropped. - if (newIndex > originalIndex) { - widget.style.bottom = "-2px"; - } else { - widget.style.top = "-3px"; - } - widget.style.height = "4px"; - - return widget; - }), - ); - }); - } else { - const cellsInColumn = getCellsAtColumnHandle( - this.view.state.block, - newIndex, - ); - - cellsInColumn.forEach(({ row, col }) => { - // Gets each row in the table. - const rowResolvedPos = state.doc.resolve( - tableResolvedPos.posAtIndex(row) + 1, + cellsInRow.forEach(({ row, col }) => { + // Gets each row in the table. + const rowResolvedPos = state.doc.resolve( + tableResolvedPos.posAtIndex(row) + 1, + ); + + // Gets the cell within the row. + const cellResolvedPos = state.doc.resolve( + rowResolvedPos.posAtIndex(col) + 1, + ); + const cellNode = cellResolvedPos.node(); + // Creates a decoration at the start or end of each cell, + // depending on whether the new index is before or after the + // original index. + const decorationPos = + cellResolvedPos.pos + + (newIndex > originalIndex ? cellNode.nodeSize - 2 : 0); + decorations.push( + // The widget is a small bar which spans the width of the cell. + Decoration.widget(decorationPos, () => { + const widget = document.createElement("div"); + widget.className = "bn-table-drop-cursor"; + widget.style.left = "0"; + widget.style.right = "0"; + // This is only necessary because the drop indicator's height + // is an even number of pixels, whereas the border between + // table cells is an odd number of pixels. So this makes the + // positioning slightly more consistent regardless of where + // the row is being dropped. + if (newIndex > originalIndex) { + widget.style.bottom = "-2px"; + } else { + widget.style.top = "-3px"; + } + widget.style.height = "4px"; + + return widget; + }), + ); + }); + } else { + const cellsInColumn = getCellsAtColumnHandle( + this.view.state.block, + newIndex, ); - // Gets the cell within the row. - const cellResolvedPos = state.doc.resolve( - rowResolvedPos.posAtIndex(col) + 1, - ); - const cellNode = cellResolvedPos.node(); - - // Creates a decoration at the start or end of each cell, - // depending on whether the new index is before or after the - // original index. - const decorationPos = - cellResolvedPos.pos + - (newIndex > originalIndex ? cellNode.nodeSize - 2 : 0); - - decorations.push( - // The widget is a small bar which spans the height of the cell. - Decoration.widget(decorationPos, () => { - const widget = document.createElement("div"); - widget.className = "bn-table-drop-cursor"; - widget.style.top = "0"; - widget.style.bottom = "0"; - // This is only necessary because the drop indicator's width - // is an even number of pixels, whereas the border between - // table cells is an odd number of pixels. So this makes the - // positioning slightly more consistent regardless of where - // the column is being dropped. - if (newIndex > originalIndex) { - widget.style.right = "-2px"; - } else { - widget.style.left = "-3px"; - } - widget.style.width = "4px"; - - return widget; - }), - ); - }); - } + cellsInColumn.forEach(({ row, col }) => { + // Gets each row in the table. + const rowResolvedPos = state.doc.resolve( + tableResolvedPos.posAtIndex(row) + 1, + ); + + // Gets the cell within the row. + const cellResolvedPos = state.doc.resolve( + rowResolvedPos.posAtIndex(col) + 1, + ); + const cellNode = cellResolvedPos.node(); + + // Creates a decoration at the start or end of each cell, + // depending on whether the new index is before or after the + // original index. + const decorationPos = + cellResolvedPos.pos + + (newIndex > originalIndex ? cellNode.nodeSize - 2 : 0); + + decorations.push( + // The widget is a small bar which spans the height of the cell. + Decoration.widget(decorationPos, () => { + const widget = document.createElement("div"); + widget.className = "bn-table-drop-cursor"; + widget.style.top = "0"; + widget.style.bottom = "0"; + // This is only necessary because the drop indicator's width + // is an even number of pixels, whereas the border between + // table cells is an odd number of pixels. So this makes the + // positioning slightly more consistent regardless of where + // the column is being dropped. + if (newIndex > originalIndex) { + widget.style.right = "-2px"; + } else { + widget.style.left = "-3px"; + } + widget.style.width = "4px"; + + return widget; + }), + ); + }); + } - return DecorationSet.create(state.doc, decorations); + return DecorationSet.create(state.doc, decorations); + }, }, - }, - }); + }), + ); } public onUpdate(callback: (state: TableHandlesState) => void) { diff --git a/packages/core/src/i18n/locales/ar.ts b/packages/core/src/i18n/locales/ar.ts index eff1bbed30..4cdaa0b47a 100644 --- a/packages/core/src/i18n/locales/ar.ts +++ b/packages/core/src/i18n/locales/ar.ts @@ -163,7 +163,6 @@ export const ar: Dictionary = { }, suggestion_menu: { no_items_title: "لم يتم العثور على عناصر", - loading: "جارٍ التحميل…", }, color_picker: { text_title: "نص", diff --git a/packages/core/src/i18n/locales/de.ts b/packages/core/src/i18n/locales/de.ts index 6d66713e2d..d80ef907ca 100644 --- a/packages/core/src/i18n/locales/de.ts +++ b/packages/core/src/i18n/locales/de.ts @@ -178,7 +178,6 @@ export const de: Dictionary = { }, suggestion_menu: { no_items_title: "Keine Elemente gefunden", - loading: "Laden …", }, color_picker: { text_title: "Text", diff --git a/packages/core/src/i18n/locales/en.ts b/packages/core/src/i18n/locales/en.ts index c705fae419..162fbf40cb 100644 --- a/packages/core/src/i18n/locales/en.ts +++ b/packages/core/src/i18n/locales/en.ts @@ -178,7 +178,6 @@ export const en = { }, suggestion_menu: { no_items_title: "No items found", - loading: "Loading…", }, color_picker: { text_title: "Text", diff --git a/packages/core/src/i18n/locales/es.ts b/packages/core/src/i18n/locales/es.ts index 4f23dc027c..9444beaa97 100644 --- a/packages/core/src/i18n/locales/es.ts +++ b/packages/core/src/i18n/locales/es.ts @@ -177,7 +177,6 @@ export const es: Dictionary = { }, suggestion_menu: { no_items_title: "No se encontraron elementos", - loading: "Cargando…", }, color_picker: { text_title: "Texto", diff --git a/packages/core/src/i18n/locales/fr.ts b/packages/core/src/i18n/locales/fr.ts index ba24ee8599..3969b0e335 100644 --- a/packages/core/src/i18n/locales/fr.ts +++ b/packages/core/src/i18n/locales/fr.ts @@ -202,7 +202,6 @@ export const fr: Dictionary = { }, suggestion_menu: { no_items_title: "Aucun élément trouvé", - loading: "Chargement…", }, color_picker: { text_title: "Texte", diff --git a/packages/core/src/i18n/locales/hr.ts b/packages/core/src/i18n/locales/hr.ts index d099696d8f..c558d42ed2 100644 --- a/packages/core/src/i18n/locales/hr.ts +++ b/packages/core/src/i18n/locales/hr.ts @@ -191,7 +191,6 @@ export const hr: Dictionary = { }, suggestion_menu: { no_items_title: "Stavke nisu pronađene", - loading: "Učitavanje…", }, color_picker: { text_title: "Tekst", diff --git a/packages/core/src/i18n/locales/is.ts b/packages/core/src/i18n/locales/is.ts index f307171012..780da27a96 100644 --- a/packages/core/src/i18n/locales/is.ts +++ b/packages/core/src/i18n/locales/is.ts @@ -170,7 +170,6 @@ export const is: Dictionary = { }, suggestion_menu: { no_items_title: "Engir hlutir fundust", - loading: "Hleður…", }, color_picker: { text_title: "Texti", diff --git a/packages/core/src/i18n/locales/it.ts b/packages/core/src/i18n/locales/it.ts index 5554317ddf..c48a5e27e9 100644 --- a/packages/core/src/i18n/locales/it.ts +++ b/packages/core/src/i18n/locales/it.ts @@ -179,7 +179,6 @@ export const it: Dictionary = { }, suggestion_menu: { no_items_title: "Nessun elemento trovato", - loading: "Caricamento…", }, color_picker: { text_title: "Testo", diff --git a/packages/core/src/i18n/locales/ja.ts b/packages/core/src/i18n/locales/ja.ts index 0d359a07c6..ca6550144d 100644 --- a/packages/core/src/i18n/locales/ja.ts +++ b/packages/core/src/i18n/locales/ja.ts @@ -198,7 +198,6 @@ export const ja: Dictionary = { }, suggestion_menu: { no_items_title: "アイテムが見つかりません", - loading: "読込中…", }, color_picker: { text_title: "文字色", diff --git a/packages/core/src/i18n/locales/ko.ts b/packages/core/src/i18n/locales/ko.ts index f647d9d018..ffaf5ee249 100644 --- a/packages/core/src/i18n/locales/ko.ts +++ b/packages/core/src/i18n/locales/ko.ts @@ -191,7 +191,6 @@ export const ko: Dictionary = { }, suggestion_menu: { no_items_title: "항목을 찾을 수 없음", - loading: "로딩 중…", }, color_picker: { text_title: "텍스트", diff --git a/packages/core/src/i18n/locales/nl.ts b/packages/core/src/i18n/locales/nl.ts index 9e6f8d34bd..83110200e4 100644 --- a/packages/core/src/i18n/locales/nl.ts +++ b/packages/core/src/i18n/locales/nl.ts @@ -178,7 +178,6 @@ export const nl: Dictionary = { }, suggestion_menu: { no_items_title: "Geen items gevonden", - loading: "Laden…", }, color_picker: { text_title: "Tekst", diff --git a/packages/core/src/i18n/locales/no.ts b/packages/core/src/i18n/locales/no.ts index 5eddd8705d..f8c045481c 100644 --- a/packages/core/src/i18n/locales/no.ts +++ b/packages/core/src/i18n/locales/no.ts @@ -178,7 +178,6 @@ export const no: Dictionary = { }, suggestion_menu: { no_items_title: "Ingen elementer funnet", - loading: "Laster…", }, color_picker: { text_title: "Tekst", diff --git a/packages/core/src/i18n/locales/pl.ts b/packages/core/src/i18n/locales/pl.ts index 490de484e8..43b9f9bead 100644 --- a/packages/core/src/i18n/locales/pl.ts +++ b/packages/core/src/i18n/locales/pl.ts @@ -162,7 +162,6 @@ export const pl: Dictionary = { }, suggestion_menu: { no_items_title: "Nie znaleziono elementów", - loading: "Ładowanie…", }, color_picker: { text_title: "Tekst", diff --git a/packages/core/src/i18n/locales/pt.ts b/packages/core/src/i18n/locales/pt.ts index 1272700eb2..88212d62f8 100644 --- a/packages/core/src/i18n/locales/pt.ts +++ b/packages/core/src/i18n/locales/pt.ts @@ -170,7 +170,6 @@ export const pt: Dictionary = { }, suggestion_menu: { no_items_title: "Nenhum item encontrado", - loading: "Carregando…", }, color_picker: { text_title: "Texto", diff --git a/packages/core/src/i18n/locales/ru.ts b/packages/core/src/i18n/locales/ru.ts index b91b706157..c43d766dda 100644 --- a/packages/core/src/i18n/locales/ru.ts +++ b/packages/core/src/i18n/locales/ru.ts @@ -205,7 +205,6 @@ export const ru: Dictionary = { }, suggestion_menu: { no_items_title: "ничего не найдено", - loading: "Загрузка…", }, color_picker: { text_title: "Текст", diff --git a/packages/core/src/i18n/locales/sk.ts b/packages/core/src/i18n/locales/sk.ts index e1e7117265..be118502a7 100644 --- a/packages/core/src/i18n/locales/sk.ts +++ b/packages/core/src/i18n/locales/sk.ts @@ -177,7 +177,6 @@ export const sk = { }, suggestion_menu: { no_items_title: "Nenašli sa žiadne položky", - loading: "Načítava sa…", }, color_picker: { text_title: "Text", diff --git a/packages/core/src/i18n/locales/uk.ts b/packages/core/src/i18n/locales/uk.ts index 5592d752c1..6dbb8c6967 100644 --- a/packages/core/src/i18n/locales/uk.ts +++ b/packages/core/src/i18n/locales/uk.ts @@ -203,7 +203,6 @@ export const uk: Dictionary = { }, suggestion_menu: { no_items_title: "Нічого не знайдено", - loading: "Завантаження…", }, color_picker: { text_title: "Текст", diff --git a/packages/core/src/i18n/locales/vi.ts b/packages/core/src/i18n/locales/vi.ts index afe16fd2cd..13ac0048ad 100644 --- a/packages/core/src/i18n/locales/vi.ts +++ b/packages/core/src/i18n/locales/vi.ts @@ -177,7 +177,6 @@ export const vi: Dictionary = { }, suggestion_menu: { no_items_title: "Không tìm thấy mục nào", - loading: "Đang tải...", }, color_picker: { text_title: "Văn bản", diff --git a/packages/core/src/i18n/locales/zh-tw.ts b/packages/core/src/i18n/locales/zh-tw.ts index e9556ae225..c39906033a 100644 --- a/packages/core/src/i18n/locales/zh-tw.ts +++ b/packages/core/src/i18n/locales/zh-tw.ts @@ -211,7 +211,6 @@ export const zhTW: Dictionary = { }, suggestion_menu: { no_items_title: "無相符項目", - loading: "載入中…", }, color_picker: { text_title: "文字", diff --git a/packages/core/src/i18n/locales/zh.ts b/packages/core/src/i18n/locales/zh.ts index fff54c314c..a7a934fd1e 100644 --- a/packages/core/src/i18n/locales/zh.ts +++ b/packages/core/src/i18n/locales/zh.ts @@ -211,7 +211,6 @@ export const zh: Dictionary = { }, suggestion_menu: { no_items_title: "无匹配项", - loading: "加载中…", }, color_picker: { text_title: "文本", diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index be7060c85d..3ea042acbd 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,3 +1,5 @@ +export * from "./api/blockManipulation/commands/insertBlocks/insertBlocks.js"; +export * from "./api/blockManipulation/commands/replaceBlocks/replaceBlocks.js"; export * from "./api/blockManipulation/commands/updateBlock/updateBlock.js"; export * from "./api/exporters/html/externalHTMLExporter.js"; export * from "./api/exporters/html/internalHTMLSerializer.js"; @@ -5,6 +7,10 @@ export * from "./api/getBlockInfoFromPos.js"; export * from "./api/nodeUtil.js"; export * from "./blocks/AudioBlockContent/AudioBlockContent.js"; export * from "./blocks/CodeBlockContent/CodeBlockContent.js"; +export * from "./blocks/defaultBlockHelpers.js"; +export * from "./blocks/defaultBlocks.js"; +export * from "./blocks/defaultBlockTypeGuards.js"; +export * from "./blocks/defaultProps.js"; export * from "./blocks/FileBlockContent/FileBlockContent.js"; export * from "./blocks/FileBlockContent/helpers/parse/parseEmbedElement.js"; export * from "./blocks/FileBlockContent/helpers/parse/parseFigureElement.js"; @@ -16,19 +22,16 @@ export * from "./blocks/FileBlockContent/helpers/toExternalHTML/createFigureWith export * from "./blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.js"; export * from "./blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.js"; export * from "./blocks/ImageBlockContent/ImageBlockContent.js"; -export * from "./blocks/PageBreakBlockContent/PageBreakBlockContent.js"; export * from "./blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.js"; +export * from "./blocks/PageBreakBlockContent/PageBreakBlockContent.js"; export * from "./blocks/PageBreakBlockContent/schema.js"; export { EMPTY_CELL_HEIGHT, EMPTY_CELL_WIDTH, } from "./blocks/TableBlockContent/TableExtension.js"; export * from "./blocks/VideoBlockContent/VideoBlockContent.js"; -export * from "./blocks/defaultBlockHelpers.js"; -export * from "./blocks/defaultBlockTypeGuards.js"; -export * from "./blocks/defaultBlocks.js"; -export * from "./blocks/defaultProps.js"; export * from "./editor/BlockNoteEditor.js"; +export * from "./editor/BlockNoteExtension.js"; export * from "./editor/BlockNoteExtensions.js"; export * from "./editor/BlockNoteSchema.js"; export * from "./editor/defaultColors.js"; @@ -42,22 +45,24 @@ export * from "./extensions/LinkToolbar/protocols.js"; export * from "./extensions/SideMenu/SideMenuPlugin.js"; export * from "./extensions/SuggestionMenu/DefaultGridSuggestionItem.js"; export * from "./extensions/SuggestionMenu/DefaultSuggestionItem.js"; -export * from "./extensions/SuggestionMenu/SuggestionPlugin.js"; export * from "./extensions/SuggestionMenu/getDefaultEmojiPickerItems.js"; export * from "./extensions/SuggestionMenu/getDefaultSlashMenuItems.js"; +export * from "./extensions/SuggestionMenu/SuggestionPlugin.js"; export * from "./extensions/TableHandles/TableHandlesPlugin.js"; export * from "./i18n/dictionary.js"; export * from "./schema/index.js"; export * from "./util/browser.js"; export * from "./util/combineByGroup.js"; export * from "./util/esmDependencies.js"; -export * from "./util/table.js"; export * from "./util/string.js"; +export * from "./util/table.js"; export * from "./util/typescript.js"; export type { CodeBlockOptions } from "./blocks/CodeBlockContent/CodeBlockContent.js"; -export { UnreachableCaseError, assertEmpty } from "./util/typescript.js"; +export { assertEmpty, UnreachableCaseError } from "./util/typescript.js"; +export * from "./util/EventEmitter.js"; +// for testing from react (TODO: move): // Unit testing export { selectedFragmentToHTML } from "./api/clipboard/toClipboard/copyExtension.js"; @@ -70,3 +75,7 @@ export * from "./extensions/UniqueID/UniqueID.js"; export * from "./api/exporters/markdown/markdownExporter.js"; export * from "./api/parsers/html/parseHTML.js"; export * from "./api/parsers/markdown/parseMarkdown.js"; + +// TODO: for ai, remove? +export * from "./api/blockManipulation/getBlock/getBlock.js"; +export * from "./api/positionMapping.js"; diff --git a/packages/core/src/pm-nodes/BlockContainer.ts b/packages/core/src/pm-nodes/BlockContainer.ts index d779abe415..065c1e8c2f 100644 --- a/packages/core/src/pm-nodes/BlockContainer.ts +++ b/packages/core/src/pm-nodes/BlockContainer.ts @@ -27,7 +27,7 @@ export const BlockContainer = Node.create<{ // Ensures content-specific keyboard handlers trigger first. priority: 50, defining: true, - + marks: "insertion modification deletion", parseHTML() { return [ { diff --git a/packages/core/src/pm-nodes/BlockGroup.ts b/packages/core/src/pm-nodes/BlockGroup.ts index 70f6242307..d98163310d 100644 --- a/packages/core/src/pm-nodes/BlockGroup.ts +++ b/packages/core/src/pm-nodes/BlockGroup.ts @@ -8,7 +8,7 @@ export const BlockGroup = Node.create<{ name: "blockGroup", group: "childContainer", content: "blockGroupChild+", - + marks: "deletion insertion modification", parseHTML() { return [ { diff --git a/packages/core/src/pm-nodes/Doc.ts b/packages/core/src/pm-nodes/Doc.ts index 3499af41ce..40af17b7fa 100644 --- a/packages/core/src/pm-nodes/Doc.ts +++ b/packages/core/src/pm-nodes/Doc.ts @@ -4,4 +4,5 @@ export const Doc = Node.create({ name: "doc", topNode: true, content: "blockGroup", + marks: "insertion modification deletion", }); diff --git a/packages/dev-scripts/examples/template-react/package.json.template.tsx b/packages/dev-scripts/examples/template-react/package.json.template.tsx index bce6790cd2..bc32a79b47 100644 --- a/packages/dev-scripts/examples/template-react/package.json.template.tsx +++ b/packages/dev-scripts/examples/template-react/package.json.template.tsx @@ -1,7 +1,7 @@ import type { Project } from "../util"; const template = (project: Project) => ({ - name: "@blocknote/example-" + project.projectSlug, + name: "@blocknote/example-" + project.fullSlug.replace("/", "-"), description: "AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY", private: true, version: "0.12.4", diff --git a/packages/mantine/src/form/TextInput.tsx b/packages/mantine/src/form/TextInput.tsx index e741deb46a..b781073588 100644 --- a/packages/mantine/src/form/TextInput.tsx +++ b/packages/mantine/src/form/TextInput.tsx @@ -1,6 +1,6 @@ import { TextInput as MantineTextInput } from "@mantine/core"; -import { assertEmpty } from "@blocknote/core"; +import { assertEmpty, mergeCSSClasses } from "@blocknote/core"; import { ComponentProps } from "@blocknote/react"; import { forwardRef } from "react"; @@ -12,13 +12,17 @@ export const TextInput = forwardRef< className, name, label, + variant, icon, value, autoFocus, placeholder, + disabled, onKeyDown, onChange, onSubmit, + autoComplete, + rightSection, ...rest } = props; @@ -27,7 +31,10 @@ export const TextInput = forwardRef< return ( ); }); diff --git a/packages/mantine/src/style.css b/packages/mantine/src/style.css index 6db6a31d4e..05fed84909 100644 --- a/packages/mantine/src/style.css +++ b/packages/mantine/src/style.css @@ -118,6 +118,12 @@ height: 32px; } +.bn-mantine .bn-mt-input-large .mantine-TextInput-input { + border: none; + font-size: 14px; + height: 52px; +} + /* Mantine Tooltip component base styles */ .bn-mantine .mantine-Tooltip-tooltip { background-color: transparent; @@ -324,6 +330,12 @@ height: 52px; } +.bn-mantine .bn-suggestion-menu-item-small { + height: fit-content; + /* Made to match with labels */ + padding: calc(var(--mantine-spacing-xs) / 2) var(--mantine-spacing-sm); +} + .bn-mantine .bn-suggestion-menu-item[aria-selected="true"], .bn-mantine .bn-suggestion-menu-item:hover { background-color: var(--bn-colors-hovered-background); @@ -339,6 +351,19 @@ padding: 8px; } +.bn-suggestion-menu-item-small + .bn-mt-suggestion-menu-item-section[data-position="left"] { + background-color: transparent; + padding: 0; +} + +.bn-suggestion-menu-item-small + .bn-mt-suggestion-menu-item-section[data-position="left"] + svg { + height: 14px; + width: 14px; +} + .bn-mt-suggestion-menu-item-body { align-items: stretch; display: flex; @@ -357,6 +382,10 @@ padding: 0; } +.bn-suggestion-menu-item-small .bn-mt-suggestion-menu-item-title { + font-size: 12px; +} + .bn-mt-suggestion-menu-item-subtitle { color: var(--bn-colors-menu-text); line-height: 16px; @@ -365,8 +394,13 @@ padding: 0; } +.bn-suggestion-menu-item-small .bn-mt-suggestion-menu-item-subtitle { + display: none; +} + .bn-mantine .bn-suggestion-menu-label { color: var(--bn-colors-hovered-text); + font-weight: bold; } .bn-mantine .bn-suggestion-menu-loader { @@ -732,6 +766,30 @@ justify-content: center; } +/* Combobox styling */ +.bn-mantine .bn-combobox-input, +.bn-mantine .bn-combobox-items:not(:empty) { + background-color: var(--bn-colors-menu-background); + border: var(--bn-border); + border-radius: var(--bn-border-radius-medium); + box-shadow: var(--bn-shadow-medium); + color: var(--bn-colors-menu-text); + gap: 4px; + min-width: 145px; + padding: 2px; +} + +.bn-mantine .bn-combobox-input .bn-combobox-icon, +.bn-mantine .bn-combobox-input .bn-combobox-right-section { + align-items: center; + display: flex; + justify-content: center; +} + +.bn-mantine .bn-combobox-input .bn-combobox-error { + color: var(--bn-colors-highlights-red-background); +} + /* We need to get rid of the checked icon - you can set the icon prop to an empty element (<>), but even so Mantine leaves extra space for the icon, so we just don't display it in CSS instead. */ diff --git a/packages/mantine/src/suggestionMenu/SuggestionMenuItem.tsx b/packages/mantine/src/suggestionMenu/SuggestionMenuItem.tsx index 4b776d8ac9..a8fbb8d2e6 100644 --- a/packages/mantine/src/suggestionMenu/SuggestionMenuItem.tsx +++ b/packages/mantine/src/suggestionMenu/SuggestionMenuItem.tsx @@ -27,7 +27,7 @@ export const SuggestionMenuItem = forwardRef< const overflow = elementOverflow( itemRef.current, - document.querySelector(".bn-suggestion-menu")!, + document.querySelector(".bn-suggestion-menu, #ai-suggestion-menu")!, // TODO ); if (overflow === "top") { @@ -44,6 +44,7 @@ export const SuggestionMenuItem = forwardRef< ref={mergeRefs(ref, itemRef)} id={id} role="option" + onMouseDown={(event) => event.preventDefault()} onClick={onClick} aria-selected={isSelected || undefined} > diff --git a/packages/mantine/src/suggestionMenu/SuggestionMenuLoader.tsx b/packages/mantine/src/suggestionMenu/SuggestionMenuLoader.tsx index 3f1596bfe5..93255e0bd2 100644 --- a/packages/mantine/src/suggestionMenu/SuggestionMenuLoader.tsx +++ b/packages/mantine/src/suggestionMenu/SuggestionMenuLoader.tsx @@ -8,13 +8,11 @@ export const SuggestionMenuLoader = forwardRef< HTMLDivElement, ComponentProps["SuggestionMenu"]["Loader"] >((props, ref) => { - const { - className, - children, // unused, using "dots" instead - ...rest - } = props; + const { className, ...rest } = props; assertEmpty(rest); - return ; + return ( + + ); }); diff --git a/packages/mantine/src/toolbar/Toolbar.tsx b/packages/mantine/src/toolbar/Toolbar.tsx index 66a4c032a3..a31e53bc8c 100644 --- a/packages/mantine/src/toolbar/Toolbar.tsx +++ b/packages/mantine/src/toolbar/Toolbar.tsx @@ -5,8 +5,7 @@ import { ComponentProps } from "@blocknote/react"; import { mergeRefs, useFocusTrap, useFocusWithin } from "@mantine/hooks"; import { forwardRef } from "react"; -type ToolbarProps = ComponentProps["FormattingToolbar"]["Root"] & - ComponentProps["LinkToolbar"]["Root"]; +type ToolbarProps = ComponentProps["Generic"]["Toolbar"]["Root"]; export const Toolbar = forwardRef( (props, ref) => { diff --git a/packages/mantine/src/toolbar/ToolbarButton.tsx b/packages/mantine/src/toolbar/ToolbarButton.tsx index 5c1475b2cc..179b08b03c 100644 --- a/packages/mantine/src/toolbar/ToolbarButton.tsx +++ b/packages/mantine/src/toolbar/ToolbarButton.tsx @@ -26,8 +26,7 @@ export const TooltipContent = (props: { ); -type ToolbarButtonProps = ComponentProps["FormattingToolbar"]["Button"] & - ComponentProps["LinkToolbar"]["Button"]; +type ToolbarButtonProps = ComponentProps["Generic"]["Toolbar"]["Button"]; /** * Helper for basic buttons that show in the formatting toolbar. diff --git a/packages/react/src/blocks/FileBlockContent/helpers/render/AddFileButton.tsx b/packages/react/src/blocks/FileBlockContent/helpers/render/AddFileButton.tsx index cdc1a3bf17..d0d28829a7 100644 --- a/packages/react/src/blocks/FileBlockContent/helpers/render/AddFileButton.tsx +++ b/packages/react/src/blocks/FileBlockContent/helpers/render/AddFileButton.tsx @@ -26,7 +26,7 @@ export const AddFileButton = ( // Opens the file toolbar. const addFileButtonClickHandler = useCallback(() => { props.editor.transact((tr) => - tr.setMeta(props.editor.filePanel!.plugin, { + tr.setMeta(props.editor.filePanel!.plugins[0], { block: props.block, }), ); diff --git a/packages/react/src/components/SuggestionMenu/GridSuggestionMenu/GridSuggestionMenu.tsx b/packages/react/src/components/SuggestionMenu/GridSuggestionMenu/GridSuggestionMenu.tsx index 743e45d7d9..e4cab1edc5 100644 --- a/packages/react/src/components/SuggestionMenu/GridSuggestionMenu/GridSuggestionMenu.tsx +++ b/packages/react/src/components/SuggestionMenu/GridSuggestionMenu/GridSuggestionMenu.tsx @@ -20,9 +20,7 @@ export function GridSuggestionMenu( - {dict.suggestion_menu.loading} - + /> ) : null; const renderedItems = useMemo(() => { diff --git a/packages/react/src/components/SuggestionMenu/GridSuggestionMenu/hooks/useGridSuggestionMenuKeyboardNavigation.ts b/packages/react/src/components/SuggestionMenu/GridSuggestionMenu/hooks/useGridSuggestionMenuKeyboardNavigation.ts index 90e10872b5..9f435158a1 100644 --- a/packages/react/src/components/SuggestionMenu/GridSuggestionMenu/hooks/useGridSuggestionMenuKeyboardNavigation.ts +++ b/packages/react/src/components/SuggestionMenu/GridSuggestionMenu/hooks/useGridSuggestionMenuKeyboardNavigation.ts @@ -53,6 +53,7 @@ export function useGridSuggestionMenuKeyboardNavigation( } if (event.key === "Enter" && !event.isComposing) { + event.stopPropagation(); event.preventDefault(); if (items.length) { diff --git a/packages/react/src/components/SuggestionMenu/SuggestionMenu.test.tsx b/packages/react/src/components/SuggestionMenu/SuggestionMenu.test.tsx index b43a0a505e..6b056718f6 100644 --- a/packages/react/src/components/SuggestionMenu/SuggestionMenu.test.tsx +++ b/packages/react/src/components/SuggestionMenu/SuggestionMenu.test.tsx @@ -1,4 +1,4 @@ -import { it, expect } from "vitest"; +import { expect, it } from "vitest"; import { SuggestionMenuController } from "./SuggestionMenuController.js"; it("has good typing", () => { diff --git a/packages/react/src/components/SuggestionMenu/SuggestionMenu.tsx b/packages/react/src/components/SuggestionMenu/SuggestionMenu.tsx index 0ee688e6aa..8b68064451 100644 --- a/packages/react/src/components/SuggestionMenu/SuggestionMenu.tsx +++ b/packages/react/src/components/SuggestionMenu/SuggestionMenu.tsx @@ -1,5 +1,5 @@ +import { mergeCSSClasses } from "@blocknote/core"; import { useMemo } from "react"; - import { useComponentsContext } from "../../editor/ComponentsContext.js"; import { useDictionary } from "../../i18n/dictionary.js"; import { DefaultReactSuggestionItem, SuggestionMenuProps } from "./types.js"; @@ -14,9 +14,9 @@ export function SuggestionMenu( const loader = loadingState === "loading-initial" || loadingState === "loading" ? ( - - {dict.suggestion_menu.loading} - + ) : null; const renderedItems = useMemo(() => { @@ -39,7 +39,10 @@ export function SuggestionMenu( renderedItems.push( = { heading: RiH1, heading_2: RiH2, heading_3: RiH3, diff --git a/packages/react/src/components/SuggestionMenu/hooks/useSuggestionMenuKeyboardHandler.ts b/packages/react/src/components/SuggestionMenu/hooks/useSuggestionMenuKeyboardHandler.ts new file mode 100644 index 0000000000..8d367ffdcf --- /dev/null +++ b/packages/react/src/components/SuggestionMenu/hooks/useSuggestionMenuKeyboardHandler.ts @@ -0,0 +1,59 @@ +import React, { useState } from "react"; + +// Hook which returns a handler for keyboard navigation of a suggestion menu. Up +// & down arrow keys are used to select an item, enter is used to execute it. +export function useSuggestionMenuKeyboardHandler( + items: Item[], + onItemClick?: (item: Item) => void +) { + const [selectedIndex, setSelectedIndex] = useState(0); + + return { + selectedIndex, + setSelectedIndex, + handler: (event: KeyboardEvent | React.KeyboardEvent) => { + if (event.key === "ArrowUp") { + event.preventDefault(); + + if (items.length) { + setSelectedIndex((selectedIndex - 1 + items!.length) % items!.length); + } + + return true; + } + + if (event.key === "ArrowDown") { + // debugger; + event.preventDefault(); + + if (items.length) { + setSelectedIndex((selectedIndex + 1) % items!.length); + } + + return true; + } + + const isComposing = isReactEvent(event) + ? event.nativeEvent.isComposing + : event.isComposing; + if (event.key === "Enter" && !isComposing) { + event.preventDefault(); + event.stopPropagation(); + + if (items.length) { + onItemClick?.(items[selectedIndex]); + } + + return true; + } + + return false; + }, + }; +} + +function isReactEvent( + event: KeyboardEvent | React.KeyboardEvent +): event is React.KeyboardEvent { + return (event as React.KeyboardEvent).nativeEvent !== undefined; +} diff --git a/packages/react/src/components/SuggestionMenu/hooks/useSuggestionMenuKeyboardNavigation.ts b/packages/react/src/components/SuggestionMenu/hooks/useSuggestionMenuKeyboardNavigation.ts index 2698ca8875..99c72a8b6a 100644 --- a/packages/react/src/components/SuggestionMenu/hooks/useSuggestionMenuKeyboardNavigation.ts +++ b/packages/react/src/components/SuggestionMenu/hooks/useSuggestionMenuKeyboardNavigation.ts @@ -1,5 +1,6 @@ import { BlockNoteEditor } from "@blocknote/core"; -import { useEffect, useState } from "react"; +import { useEffect } from "react"; +import { useSuggestionMenuKeyboardHandler } from "./useSuggestionMenuKeyboardHandler.js"; // Hook which handles keyboard navigation of a suggestion menu. Up & down arrow // keys are used to select a menu item, enter is used to execute it. @@ -8,64 +9,27 @@ export function useSuggestionMenuKeyboardNavigation( query: string, items: Item[], onItemClick?: (item: Item) => void, + element?: HTMLElement, ) { - const [selectedIndex, setSelectedIndex] = useState(0); + const { selectedIndex, setSelectedIndex, handler } = + useSuggestionMenuKeyboardHandler(items, onItemClick); useEffect(() => { - const handleMenuNavigationKeys = (event: KeyboardEvent) => { - if (event.key === "ArrowUp") { - event.preventDefault(); - - if (items.length) { - setSelectedIndex((selectedIndex - 1 + items!.length) % items!.length); - } - - return true; - } - - if (event.key === "ArrowDown") { - event.preventDefault(); - - if (items.length) { - setSelectedIndex((selectedIndex + 1) % items!.length); - } - - return true; - } - - if (event.key === "Enter" && !event.isComposing) { - event.preventDefault(); - event.stopPropagation(); - - if (items.length) { - onItemClick?.(items[selectedIndex]); - } - - return true; - } - - return false; - }; - - editor.domElement?.addEventListener( - "keydown", - handleMenuNavigationKeys, - true, - ); + (element || editor.domElement)?.addEventListener("keydown", handler, true); return () => { - editor.domElement?.removeEventListener( + (element || editor.domElement)?.removeEventListener( "keydown", - handleMenuNavigationKeys, + handler, true, ); }; - }, [editor.domElement, items, selectedIndex, onItemClick]); + }, [editor.domElement, items, selectedIndex, onItemClick, element, handler]); // Resets index when items change useEffect(() => { setSelectedIndex(0); - }, [query]); + }, [query, setSelectedIndex]); return { selectedIndex: items.length === 0 ? undefined : selectedIndex, diff --git a/packages/react/src/components/SuggestionMenu/types.tsx b/packages/react/src/components/SuggestionMenu/types.tsx index a3d7968331..a708cc6ccd 100644 --- a/packages/react/src/components/SuggestionMenu/types.tsx +++ b/packages/react/src/components/SuggestionMenu/types.tsx @@ -6,6 +6,7 @@ import { DefaultSuggestionItem } from "@blocknote/core"; */ export type DefaultReactSuggestionItem = Omit & { icon?: JSX.Element; + size?: "default" | "small"; }; /** diff --git a/packages/react/src/editor/ComponentsContext.tsx b/packages/react/src/editor/ComponentsContext.tsx index 44a48e8afc..2eb161d828 100644 --- a/packages/react/src/editor/ComponentsContext.tsx +++ b/packages/react/src/editor/ComponentsContext.tsx @@ -3,6 +3,7 @@ import { ComponentType, createContext, CSSProperties, + HTMLInputAutoCompleteAttribute, KeyboardEvent, MouseEvent, ReactNode, @@ -141,7 +142,7 @@ export type ComponentProps = { id: string; isSelected: boolean; onClick: () => void; - item: DefaultReactSuggestionItem; + item: Omit; }; Label: { className?: string; @@ -149,7 +150,6 @@ export type ComponentProps = { }; Loader: { className?: string; - children?: ReactNode; }; }; GridSuggestionMenu: { @@ -261,13 +261,17 @@ export type ComponentProps = { className?: string; name: string; label?: string; + variant?: "default" | "large"; icon: ReactNode; + rightSection?: ReactNode; autoFocus?: boolean; - placeholder: string; + placeholder?: string; + disabled?: boolean; value: string; onKeyDown: (event: KeyboardEvent) => void; onChange: (event: ChangeEvent) => void; onSubmit?: () => void; + autoComplete?: HTMLInputAutoCompleteAttribute; }; }; Menu: { diff --git a/packages/react/src/hooks/useUIElementPositioning.ts b/packages/react/src/hooks/useUIElementPositioning.ts index 261f741c53..d1de931cd8 100644 --- a/packages/react/src/hooks/useUIElementPositioning.ts +++ b/packages/react/src/hooks/useUIElementPositioning.ts @@ -1,12 +1,20 @@ import { useDismiss, + UseDismissProps, useFloating, UseFloatingOptions, useInteractions, useTransitionStyles, + VirtualElement, } from "@floating-ui/react"; import { useEffect, useMemo } from "react"; +type ReferencePos = DOMRect | HTMLElement | VirtualElement | null; + +function isVirtualElement(element: ReferencePos): element is VirtualElement { + return (element as VirtualElement).getBoundingClientRect !== undefined; +} + type UIElementPosition = { isMounted: boolean; ref: (node: HTMLElement | null) => void; @@ -18,9 +26,11 @@ type UIElementPosition = { export function useUIElementPositioning( show: boolean, - referencePos: DOMRect | null, + referencePos: DOMRect | HTMLElement | VirtualElement | null, zIndex: number, - options?: Partial, + options?: Partial< + UseFloatingOptions & { canDismiss: boolean | UseDismissProps } + >, ): UIElementPosition { const { refs, update, context, floatingStyles } = useFloating({ open: show, @@ -28,9 +38,15 @@ export function useUIElementPositioning( }); const { isMounted, styles } = useTransitionStyles(context); + const dismissOptions = + typeof options?.canDismiss === "object" + ? options.canDismiss + : { + enabled: options?.canDismiss, + }; // handle "escape" and other dismiss events, these will add some listeners to // getFloatingProps which need to be attached to the floating element - const dismiss = useDismiss(context); + const dismiss = useDismiss(context, dismissOptions); const { getReferenceProps, getFloatingProps } = useInteractions([dismiss]); @@ -43,9 +59,16 @@ export function useUIElementPositioning( if (referencePos === null) { return; } - refs.setReference({ - getBoundingClientRect: () => referencePos, - }); + + if (referencePos instanceof HTMLElement) { + refs.setReference(referencePos); + } else if (isVirtualElement(referencePos)) { + refs.setReference(referencePos); + } else { + refs.setReference({ + getBoundingClientRect: () => referencePos, + }); + } }, [referencePos, refs]); return useMemo(() => { diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index 9341b46171..58c80ee271 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -78,11 +78,11 @@ export * from "./components/FilePanel/FilePanel.js"; export * from "./components/FilePanel/FilePanelController.js"; export * from "./components/FilePanel/FilePanelProps.js"; +export * from "./components/TableHandles/ExtendButton/ExtendButton.js"; +export * from "./components/TableHandles/ExtendButton/ExtendButtonProps.js"; export * from "./components/TableHandles/TableHandle.js"; export * from "./components/TableHandles/TableHandleProps.js"; export * from "./components/TableHandles/TableHandlesController.js"; -export * from "./components/TableHandles/ExtendButton/ExtendButton.js"; -export * from "./components/TableHandles/ExtendButton/ExtendButtonProps.js"; export * from "./components/TableHandles/hooks/useExtendButtonsPositioning.js"; export * from "./components/TableHandles/hooks/useTableHandlesPositioning.js"; @@ -126,3 +126,7 @@ export * from "./schema/ReactStyleSpec.js"; export * from "./util/elementOverflow.js"; export * from "./util/mergeRefs.js"; + +export * from "./components/SuggestionMenu/hooks/useSuggestionMenuKeyboardHandler.js"; +export * from "./hooks/useUIElementPositioning.js"; +export * from "./hooks/useUIPluginState.js"; diff --git a/packages/shadcn/src/form/TextInput.tsx b/packages/shadcn/src/form/TextInput.tsx index 0aa393122e..3f8acf45ee 100644 --- a/packages/shadcn/src/form/TextInput.tsx +++ b/packages/shadcn/src/form/TextInput.tsx @@ -3,6 +3,7 @@ import { ComponentProps } from "@blocknote/react"; import { forwardRef } from "react"; import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js"; +import { cn } from "../lib/utils.js"; export const TextInput = forwardRef< HTMLInputElement, @@ -12,13 +13,17 @@ export const TextInput = forwardRef< className, name, label, + variant, icon, // TODO: implement value, autoFocus, placeholder, + disabled, onKeyDown, onChange, onSubmit, + autoComplete, + rightSection, // TODO: add rightSection ...rest } = props; @@ -26,38 +31,36 @@ export const TextInput = forwardRef< const ShadCNComponents = useShadCNComponentsContext()!; - if (!label) { - return ( - - ); - } - return ( -

- - {label} - - +
+ {icon} +
+ {label && ( + + {label} + + )} + +
+ {rightSection}
); }); diff --git a/packages/shadcn/src/style.css b/packages/shadcn/src/style.css index 00c52b6180..00707adb6b 100644 --- a/packages/shadcn/src/style.css +++ b/packages/shadcn/src/style.css @@ -189,3 +189,8 @@ font-size: 14px; font-style: italic; } + +.bn-shadcn .bn-combobox-error { + color: var(--bn-colors-highlights-red-background); + font-weight: bold; +} diff --git a/packages/shadcn/src/suggestionMenu/SuggestionMenuItem.tsx b/packages/shadcn/src/suggestionMenu/SuggestionMenuItem.tsx index d723e06510..7a6f21b17b 100644 --- a/packages/shadcn/src/suggestionMenu/SuggestionMenuItem.tsx +++ b/packages/shadcn/src/suggestionMenu/SuggestionMenuItem.tsx @@ -24,7 +24,7 @@ export const SuggestionMenuItem = forwardRef< const overflow = elementOverflow( itemRef.current, - document.querySelector(".bn-suggestion-menu")!, + document.querySelector(".bn-suggestion-menu, #ai-suggestion-menu")!, // TODO ); if (overflow === "top") { itemRef.current.scrollIntoView(true); @@ -38,22 +38,47 @@ export const SuggestionMenuItem = forwardRef< // Styles from ShadCN DropdownMenuItem component className={cn( "bn-relative bn-flex bn-cursor-pointer bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50", + props.item.size === "small" ? "bn-gap-3 bn-py-1" : "", className, )} ref={mergeRefs([ref, itemRef])} id={id} + onMouseDown={(event) => event.preventDefault()} onClick={onClick} role="option" aria-selected={isSelected || undefined} > {item.icon && ( -
+
{item.icon}
)}
-
{item.title}
-
{item.subtext}
+
+ {item.title} +
+
+ {item.subtext} +
{item.badge && (
diff --git a/packages/shadcn/src/suggestionMenu/SuggestionMenuLoader.tsx b/packages/shadcn/src/suggestionMenu/SuggestionMenuLoader.tsx index ff43ed5ea8..b8ef2013b2 100644 --- a/packages/shadcn/src/suggestionMenu/SuggestionMenuLoader.tsx +++ b/packages/shadcn/src/suggestionMenu/SuggestionMenuLoader.tsx @@ -2,17 +2,28 @@ import { assertEmpty } from "@blocknote/core"; import { ComponentProps } from "@blocknote/react"; import { forwardRef } from "react"; +import { cn } from "../lib/utils.js"; + export const SuggestionMenuLoader = forwardRef< HTMLDivElement, ComponentProps["SuggestionMenu"]["Loader"] >((props, ref) => { - const { className, children, ...rest } = props; + const { className, ...rest } = props; assertEmpty(rest); return ( -
- {children} +
+ {/* Taken from Google Material Icons */} + {/* https://fonts.google.com/icons?selected=Material+Symbols+Rounded:progress_activity:FILL@0;wght@400;GRAD@0;opsz@24&icon.query=load&icon.size=24&icon.color=%23e8eaed&icon.set=Material+Symbols&icon.style=Rounded&icon.platform=web */} + + +
); }); diff --git a/packages/shadcn/src/toolbar/Toolbar.tsx b/packages/shadcn/src/toolbar/Toolbar.tsx index 654a34ff72..a3bb007572 100644 --- a/packages/shadcn/src/toolbar/Toolbar.tsx +++ b/packages/shadcn/src/toolbar/Toolbar.tsx @@ -5,8 +5,7 @@ import { forwardRef } from "react"; import { cn } from "../lib/utils.js"; import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js"; -type ToolbarProps = ComponentProps["FormattingToolbar"]["Root"] & - ComponentProps["LinkToolbar"]["Root"]; +type ToolbarProps = ComponentProps["Generic"]["Toolbar"]["Root"]; export const Toolbar = forwardRef( (props, ref) => { @@ -42,8 +41,7 @@ export const Toolbar = forwardRef( }, ); -type ToolbarButtonProps = ComponentProps["FormattingToolbar"]["Button"] & - ComponentProps["LinkToolbar"]["Button"]; +type ToolbarButtonProps = ComponentProps["Generic"]["Toolbar"]["Button"]; export const ToolbarButton = forwardRef( (props, ref) => { diff --git a/packages/xl-ai-server/.env.example b/packages/xl-ai-server/.env.example new file mode 100644 index 0000000000..719aa7c60a --- /dev/null +++ b/packages/xl-ai-server/.env.example @@ -0,0 +1,5 @@ +TOKEN= +GROQ_API_KEY= +MISTRAL_API_KEY= +OPENAI_API_KEY= +MY_PROVIDER_API_KEY= diff --git a/packages/xl-ai-server/README.md b/packages/xl-ai-server/README.md new file mode 100644 index 0000000000..ca6c275232 --- /dev/null +++ b/packages/xl-ai-server/README.md @@ -0,0 +1,24 @@ +# BlockNote AI Server + +The BlockNote AI Server is a simple demo node.js ([Hono](http://hono.dev/)) Proxy server you can use to pass requests to third party LLM provider without exposing your LLM API keys on the client. + +The server exposes the endpoint `/ai?url=&provider=` which can handle LLM requests (e.g.: created with the [AI SDK](https://ai-sdk.dev/)). These are forwarded to `URL-TO-FETCH` with API keys loaded from environment variables. + +## Requirements + +Requirements: + +- `mkcert` for local testing over https ([instructions](https://web.dev/articles/how-to-use-local-https)) + +## Configuration + +Configure your environment variables according to `.env.example`. + +## Running (dev mode): + + mkcert localhost + pnpm run dev + +## Client Usage + +use `createBlockNoteAIClient` from `@blocknote/xl-ai` to create an API client to connect to the BlockNote AI Server / proxy. diff --git a/packages/xl-ai-server/package.json b/packages/xl-ai-server/package.json new file mode 100644 index 0000000000..18f81e528d --- /dev/null +++ b/packages/xl-ai-server/package.json @@ -0,0 +1,71 @@ +{ + "name": "@blocknote/xl-ai-server", + "homepage": "https://github.com/TypeCellOS/BlockNote", + "private": false, + "license": "AGPL-3.0 OR PROPRIETARY", + "version": "0.30.0", + "files": [ + "dist", + "types", + "src" + ], + "keywords": [ + "react", + "javascript", + "editor", + "typescript", + "prosemirror", + "wysiwyg", + "rich-text-editor", + "notion", + "yjs", + "block-based", + "tiptap" + ], + "description": "A \"Notion-style\" block-based extensible text editor built on top of Prosemirror and Tiptap.", + "type": "module", + "source": "src/index.ts", + "types": "./types/src/index.d.ts", + "main": "./dist/blocknote-xl-ai-server.umd.cjs", + "module": "./dist/blocknote-xl-ai-server.js", + "exports": { + ".": { + "types": "./types/src/index.d.ts", + "import": "./dist/blocknote-xl-ai-server.js", + "require": "./dist/blocknote-xl-ai-server.umd.cjs" + } + }, + "scripts": { + "dev": "vite-node src/index.ts", + "build": "tsc && vite build", + "start": "node dist/blocknote-xl-ai-server.js", + "lint": "eslint src --max-warnings 0", + "clean": "rimraf dist && rimraf types" + }, + "dependencies": { + "@hono/node-server": "^1.13.7", + "hono": "^4.6.12" + }, + "devDependencies": { + "eslint": "^8.10.0", + "rimraf": "^5.0.5", + "rollup-plugin-webpack-stats": "^0.2.2", + "typescript": "^5.3.3", + "vite": "^5.3.4", + "vite-node": "^2.1.6", + "vite-plugin-eslint": "^1.8.1", + "vite-plugin-externalize-deps": "^0.8.0", + "vitest": "^2.0.3", + "undici": "^6" + }, + "peerDependencies": {}, + "eslintConfig": { + "extends": [ + "../../.eslintrc.js" + ] + }, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + } +} diff --git a/packages/xl-ai-server/src/index.ts b/packages/xl-ai-server/src/index.ts new file mode 100644 index 0000000000..4d784b8d12 --- /dev/null +++ b/packages/xl-ai-server/src/index.ts @@ -0,0 +1,136 @@ +import { serve } from "@hono/node-server"; +import { Hono } from "hono"; +import { bearerAuth } from "hono/bearer-auth"; +import { cors } from "hono/cors"; +import { existsSync, readFileSync } from "node:fs"; +import { createSecureServer } from "node:http2"; +import { Agent, setGlobalDispatcher } from "undici"; + +// make sure our fetch request uses HTTP/2 +setGlobalDispatcher( + new Agent({ + allowH2: true, + }), +); + +const ignoreHeadersRe = /^content-(?:encoding|length|range)$/i; + +// REC: we might be able to replace this by https://github.com/honojs/hono/pull/3589 +export const proxyFetch: typeof fetch = async (request, options) => { + const req = new Request(request, options); + req.headers.delete("accept-encoding"); // TBD: there may be cases where you want to explicitly specify + req.headers.delete("Origin"); + const res = await fetch(req); + + const headers: HeadersInit = [...res.headers.entries()].filter( + ([k]) => !ignoreHeadersRe.test(k) && k !== "strict-transport-security", + ); + + const readable = res.body; + + // For debugging purposes, we can log the chunks as they stream: + + // const { readable, writable } = new TransformStream({ + // async transform(chunk, controller) { + // // Log each chunk as it passes through + + // // optional, wait to test streaming mode + // // await new Promise((resolve) => setTimeout(resolve, 3000)); + + // console.log("Streaming chunk:", new TextDecoder().decode(chunk)); + // controller.enqueue(chunk); + // }, + // }); + + // // Pipe the response body through our transform stream + // res.body?.pipeTo(writable).catch((err) => { + // console.error("Error in stream:", err); + // }); + + return new Response(readable, { + ...res, + status: res.status, + statusText: res.statusText, + headers, + }); +}; + +function getProviderInfo(provider: string) { + const envKey = `${provider.toUpperCase().replace(/-/g, "_")}_API_KEY`; + const key = process.env[envKey]; + if (!key || !key.length) { + return "not-found"; + } + return { + key, + header: provider === "anthropic" ? "x-api-key" : "Authorization", + }; +} + +const app = new Hono(); + +app.use("/health", async (c) => { + return c.json({ status: "ok" }); +}); + +if (process.env.TOKEN?.length) { + app.use("/ai/*", bearerAuth({ token: process.env.TOKEN })); +} else { + // eslint-disable-next-line no-console + console.warn("no token set, ai requests will not be secured"); +} + +app.use("/ai", cors(), async (c) => { + const url = c.req.query("url"); + if (!url) { + return c.json({ error: "url parameter is required" }, 400); + } + + const provider = c.req.query("provider"); + if (!provider) { + return c.json({ error: "provider parameter is required" }, 400); + } + + const providerInfo = getProviderInfo(provider); + + if (providerInfo === "not-found") { + return c.json( + { + error: `provider / key not found for provider ${provider}. Make sure to load correct env variables.`, + }, + 404, + ); + } + + // eslint-disable-next-line no-console + console.log("Proxying request to", url); + const request = new Request(url, c.req.raw); + if (providerInfo.header === "Authorization") { + request.headers.set("Authorization", `Bearer ${providerInfo.key}`); + } else { + request.headers.set(providerInfo.header, `${providerInfo.key}`); + } + + request.headers.set("x-api-key", `${providerInfo.key}`); + return proxyFetch(request); +}); + +const http2 = existsSync("localhost.pem"); +serve( + { + fetch: app.fetch, + createServer: http2 ? createSecureServer : undefined, + + serverOptions: { + key: http2 ? readFileSync("localhost-key.pem") : undefined, + cert: http2 ? readFileSync("localhost.pem") : undefined, + }, + port: Number(process.env.PORT) || 3000, + }, + (info) => { + // eslint-disable-next-line no-console + console.log( + `Server is running on ${info.address}${info.port}, http2: ${http2}`, + ); + }, +); diff --git a/packages/xl-ai-server/tsconfig.json b/packages/xl-ai-server/tsconfig.json new file mode 100644 index 0000000000..283e07431f --- /dev/null +++ b/packages/xl-ai-server/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ESNext", "DOM", "DOM.Iterable"], + "moduleResolution": "Node", + "jsx": "react-jsx", + "strict": true, + "sourceMap": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "noEmit": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "outDir": "dist", + "declaration": true, + "declarationDir": "types", + "composite": true, + "skipLibCheck": true + }, + "include": ["src"], + "references": [] +} diff --git a/packages/xl-ai-server/vite.config.ts b/packages/xl-ai-server/vite.config.ts new file mode 100644 index 0000000000..c2041c3105 --- /dev/null +++ b/packages/xl-ai-server/vite.config.ts @@ -0,0 +1,54 @@ +import * as path from "path"; +import { webpackStats } from "rollup-plugin-webpack-stats"; +import { defineConfig } from "vite"; +import pkg from "./package.json"; +// import eslintPlugin from "vite-plugin-eslint"; + +// https://vitejs.dev/config/ +export default defineConfig((conf) => ({ + test: { + environment: "jsdom", + setupFiles: ["./vitestSetup.ts"], + }, + plugins: [webpackStats()], + // used so that vitest resolves the core package from the sources instead of the built version + resolve: { + alias: + conf.command === "build" + ? ({} as Record) + : ({ + // load live from sources with live reload working + "@blocknote/core": path.resolve(__dirname, "../core/src/"), + } as Record), + }, + build: { + sourcemap: true, + lib: { + entry: path.resolve(__dirname, "src/index.ts"), + name: "blocknote-xl-ai-server", + fileName: "blocknote-xl-ai-server", + }, + rollupOptions: { + // make sure to externalize deps that shouldn't be bundled + // into your library + external: [ + ...Object.keys({ + ...pkg.dependencies, + ...pkg.peerDependencies, + ...pkg.devDependencies, + }), + "node:fs", + "node:http2", + ], + output: { + // Provide global variables to use in the UMD build + // for externalized deps + globals: { + react: "React", + "react-dom": "ReactDOM", + }, + interop: "compat", // https://rollupjs.org/migration/#changed-defaults + }, + }, + }, +})); diff --git a/packages/xl-ai/package.json b/packages/xl-ai/package.json new file mode 100644 index 0000000000..2f32d4c054 --- /dev/null +++ b/packages/xl-ai/package.json @@ -0,0 +1,122 @@ +{ + "name": "@blocknote/xl-ai", + "homepage": "https://github.com/TypeCellOS/BlockNote", + "private": false, + "sideEffects": [ + "*.css" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/TypeCellOS/BlockNote.git", + "directory": "packages/xl-ai" + }, + "license": "AGPL-3.0 OR PROPRIETARY", + "version": "0.30.0", + "files": [ + "dist", + "types", + "src" + ], + "keywords": [ + "ai", + "llm", + "react", + "javascript", + "editor", + "typescript", + "prosemirror", + "wysiwyg", + "rich-text-editor", + "notion", + "yjs", + "block-based", + "tiptap" + ], + "description": "A \"Notion-style\" block-based extensible text editor built on top of Prosemirror and Tiptap.", + "type": "module", + "source": "src/index.ts", + "types": "./types/src/index.d.ts", + "main": "./dist/blocknote-xl-ai.umd.cjs", + "module": "./dist/blocknote-xl-ai.js", + "exports": { + ".": { + "types": "./types/src/index.d.ts", + "import": "./dist/blocknote-xl-ai.js", + "require": "./dist/blocknote-xl-ai.umd.cjs" + }, + "./style.css": { + "import": "./dist/style.css", + "require": "./dist/style.css", + "style": "./dist/style.css" + } + }, + "scripts": { + "dev": "vite", + "build": "tsc --build && vite build", + "lint": "eslint src --max-warnings 0", + "test": "NODE_EXTRA_CA_CERTS=\"$(mkcert -CAROOT)/rootCA.pem\" vitest --run", + "test-watch": "NODE_EXTRA_CA_CERTS=\"$(mkcert -CAROOT)/rootCA.pem\" vitest watch", + "email": "email dev" + }, + "dependencies": { + "@blocknote/prosemirror-suggest-changes": "^0.1.3", + "prosemirror-changeset": "^2.3.0", + "prosemirror-tables": "^1.6.4", + "prosemirror-transform": "^1.10.4", + "prosemirror-model": "^1.24.1", + "ai": "^4.3.15", + "@ai-sdk/openai-compatible": "^0.2.14", + "@ai-sdk/openai": "^1.3.22", + "@ai-sdk/groq": "^1.2.9", + "@ai-sdk/mistral": "^1.2.8", + "@blocknote/core": "workspace:*", + "@blocknote/mantine": "workspace:*", + "@blocknote/react": "workspace:*", + "@floating-ui/react": "^0.26.4", + "@tiptap/core": "^2.7.1", + "lodash.isequal": "^4.5.0", + "prosemirror-state": "^1.4.3", + "prosemirror-view": "^1.33.7", + "react": "^18", + "react-dom": "^18", + "react-icons": "^5.2.1", + "remark-parse": "^10.0.1", + "remark-stringify": "^10.0.2", + "unified": "^10.1.2", + "y-prosemirror": "^1.3.4", + "zustand": "^5.0.3" + }, + "devDependencies": { + "@types/json-schema": "^7.0.15", + "@types/lodash.isequal": "^4.5.8", + "@types/diff": "^6.0.0", + "@types/json-diff": "^1.0.3", + "@types/react": "^18.0.25", + "@types/react-dom": "^18.0.9", + "@vitejs/plugin-react": "^4.3.1", + "eslint": "^8.10.0", + "@mswjs/interceptors": "^0.37.5", + "glob": "^10.3.10", + "headers-polyfill": "^4.0.3", + "msw": "^2.7.3", + "msw-snapshot": "^5.2.0", + "rimraf": "^5.0.5", + "rollup-plugin-webpack-stats": "^0.2.2", + "typescript": "^5.3.3", + "vite": "^5.3.4", + "vite-plugin-eslint": "^1.8.1", + "vite-plugin-externalize-deps": "^0.8.0", + "vitest": "^2.0.3", + "@vitest/runner": "^2.0.3", + "undici": "^6" + }, + "peerDependencies": { + "react": "^18.0 || ^19.0 || >= 19.0.0-rc", + "react-dom": "^18.0 || ^19.0 || >= 19.0.0-rc" + }, + "eslintConfig": { + "extends": [ + "../../.eslintrc.js" + ] + } +} diff --git a/packages/xl-ai/src/AIExtension.ts b/packages/xl-ai/src/AIExtension.ts new file mode 100644 index 0000000000..6c2a503a0d --- /dev/null +++ b/packages/xl-ai/src/AIExtension.ts @@ -0,0 +1,361 @@ +import { + BlockNoteEditor, + BlockNoteExtension, + UnreachableCaseError, +} from "@blocknote/core"; +import { + applySuggestions, + revertSuggestions, + suggestChanges, +} from "@blocknote/prosemirror-suggest-changes"; +import { APICallError, LanguageModel, RetryError } from "ai"; +import { Plugin, PluginKey } from "prosemirror-state"; +import { fixTablesKey } from "prosemirror-tables"; +import { createStore, StoreApi } from "zustand/vanilla"; +import { doLLMRequest, LLMRequestOptions } from "./api/LLMRequest.js"; +import { LLMResponse } from "./api/LLMResponse.js"; +import { PromptBuilder } from "./api/formats/PromptBuilder.js"; +import { LLMFormat, llmFormats } from "./api/index.js"; +import { createAgentCursorPlugin } from "./plugins/AgentCursorPlugin.js"; + +type MakeOptional = Omit & Partial>; + +type ReadonlyStoreApi = Pick< + StoreApi, + "getState" | "getInitialState" | "subscribe" +>; + +type AIPluginState = { + /** + * zustand design considerations: + * - moved this to a nested object to have better typescript typing + * - if we'd do this without a nested object, then we could easily set "wrong" values, + * because "setState" takes a partial object (unless the second parameter "replace" = true), + * and thus we'd lose typescript's typing help + * + */ + aiMenuState: + | ({ + blockId: string; + } & ( + | { + status: "error"; + error: any; + } + | { + status: "user-input" | "thinking" | "ai-writing" | "user-reviewing"; + } + )) + | "closed"; + + /** + * The previous response from the LLM, used for multi-step LLM calls + */ + llmResponse?: LLMResponse; +}; + +/** + * configuration options for LLM calls that are shared across all calls by default + */ +type GlobalLLMRequestOptions = { + /** + * The default language model to use for LLM calls + */ + model: LanguageModel; + /** + * The default data format to use for LLM calls + * "html" is recommended, the other formats are experimental + * @default html + */ + dataFormat?: LLMFormat; + /** + * Whether to stream the LLM response + * @default true + */ + stream?: boolean; + /** + * A function that can be used to customize the prompt sent to the LLM + * @default undefined + */ + promptBuilder?: PromptBuilder; +}; + +type CallSpecificLLMRequestOptions = MakeOptional; + +const PLUGIN_KEY = new PluginKey(`blocknote-ai-plugin`); + +export class AIExtension extends BlockNoteExtension { + private previousRequestOptions: CallSpecificLLMRequestOptions | undefined; + + public static name(): string { + return "ai"; + } + + // internal store including setters + private readonly _store = createStore()((_set) => ({ + aiMenuState: "closed", + })); + + /** + * Returns a read-only zustand store with the state of the AI Extension + */ + public get store() { + // externally, don't expose setters (if we want to do so, expose `set` methods seperately) + return this._store as ReadonlyStoreApi; + } + + /** + * Returns a zustand store with the global configuration of the AI Extension. + * These options are used by default across all LLM calls when calling {@link doLLMRequest} + */ + public readonly options: ReturnType< + ReturnType< + typeof createStore< + MakeOptional, "promptBuilder"> + > + > + >; + + /** + * @internal use `createAIExtension` instead + */ + constructor( + public readonly editor: BlockNoteEditor, + options: GlobalLLMRequestOptions & { + /** + * The name and color of the agent cursor + * + * @default { name: "AI", color: "#8bc6ff" } + */ + agentCursor?: { name: string; color: string }; + }, + ) { + super(); + + this.options = createStore< + MakeOptional, "promptBuilder"> + >()((_set) => ({ + dataFormat: llmFormats.html, + stream: true, + ...options, + })); + + this.addProsemirrorPlugin( + new Plugin({ + key: PLUGIN_KEY, + filterTransaction: (tr) => { + const menuState = this.store.getState().aiMenuState; + + if (menuState !== "closed" && menuState.status === "ai-writing") { + if (tr.getMeta(fixTablesKey)?.fixTables) { + // the fixtables plugin causes the steps between of the AI Agent to become invalid + // so we need to prevent it from running + // (we might need to filter out other / or maybe any transactions during the writing phase) + return false; + } + } + return true; + }, + }), + ); + this.addProsemirrorPlugin(suggestChanges()); + this.addProsemirrorPlugin( + createAgentCursorPlugin( + options.agentCursor || { name: "AI", color: "#8bc6ff" }, + ), + ); + } + + /** + * Open the AI menu at a specific block + */ + public openAIMenuAtBlock(blockID: string) { + this.editor.setForceSelectionVisible(true); + this.editor.isEditable = false; + this._store.setState({ + aiMenuState: { + blockId: blockID, + status: "user-input", + }, + }); + } + + /** + * Close the AI menu + */ + public closeAIMenu() { + this.previousRequestOptions = undefined; + this._store.setState({ + aiMenuState: "closed", + llmResponse: undefined, + }); + this.editor.setForceSelectionVisible(false); + this.editor.isEditable = true; + this.editor.focus(); + } + + /** + * Accept the changes made by the LLM + */ + public acceptChanges() { + this.editor.exec(applySuggestions); + this.closeAIMenu(); + } + + /** + * Reject the changes made by the LLM + */ + public rejectChanges() { + this.editor.exec(revertSuggestions); + this.closeAIMenu(); + } + + /** + * Retry the previous LLM call. + * + * Only valid if the current status is "error" + */ + public async retry() { + const state = this.store.getState().aiMenuState; + if ( + state === "closed" || + state.status !== "error" || + !this.previousRequestOptions + ) { + throw new Error("retry() is only valid when a previous response failed"); + } + if ( + state.error instanceof APICallError || + state.error instanceof RetryError + ) { + // retry the previous call as-is, as there was a network error + return this.callLLM(this.previousRequestOptions); + } else { + // an error occurred while parsing / executing the previous LLM call + // give the LLM a chance to fix the error + // (Possible improvement: maybe this should be a system prompt instead of the userPrompt) + const errorMessage = + state.error instanceof Error + ? state.error.message + : String(state.error); + + return this.callLLM({ + userPrompt: `An error occured: ${errorMessage} + Please retry the previous user request.`, + }); + } + } + + /** + * Update the status of a call to an LLM + * + * @warning This method should usually only be used for advanced use-cases + * if you want to implement how an LLM call is executed. Usually, you should + * use {@link doLLMRequest} instead which will handle the status updates for you. + */ + public setAIResponseStatus( + status: + | "user-input" + | "thinking" + | "ai-writing" + | "user-reviewing" + | { + status: "error"; + error: any; + }, + ) { + const aiMenuState = this.store.getState().aiMenuState; + if (aiMenuState === "closed") { + return; // TODO: log error? + } + + if (status === "ai-writing") { + this.editor.setForceSelectionVisible(false); + } + + if (typeof status === "object") { + if (status.status !== "error") { + throw new UnreachableCaseError(status.status); + } + this._store.setState({ + aiMenuState: { + status: status.status, + error: status.error, + blockId: aiMenuState.blockId, + }, + }); + } else { + this._store.setState({ + aiMenuState: { + status: status, + blockId: aiMenuState.blockId, + }, + }); + } + } + + /** + * Execute a call to an LLM and apply the result to the editor + */ + public async callLLM(opts: CallSpecificLLMRequestOptions) { + this.setAIResponseStatus("thinking"); + + try { + const requestOptions = { + ...this.options.getState(), + ...opts, + previousResponse: this.store.getState().llmResponse, + }; + this.previousRequestOptions = requestOptions; + + const ret = await doLLMRequest(this.editor, { + ...requestOptions, + onStart: () => { + this.setAIResponseStatus("ai-writing"); + }, + onBlockUpdate: (blockId: string) => { + // NOTE: does this setState with an anon object trigger unnecessary re-renders? + this._store.setState({ + aiMenuState: { + blockId, + status: "ai-writing", + }, + }); + }, + }); + + this._store.setState({ + llmResponse: ret, + }); + + await ret.execute(); + + this.setAIResponseStatus("user-reviewing"); + } catch (e) { + this.setAIResponseStatus({ + status: "error", + error: e, + }); + // eslint-disable-next-line no-console + console.warn("Error calling LLM", e); + } + } +} + +/** + * Create a new AIExtension instance, this can be passed to the BlockNote editor via the `extensions` option + */ +export function createAIExtension( + options: ConstructorParameters[1], +) { + return (editor: BlockNoteEditor) => { + return new AIExtension(editor, options); + }; +} + +/** + * Return the AIExtension instance from the editor + */ +export function getAIExtension(editor: BlockNoteEditor) { + return editor.extension(AIExtension); +} diff --git a/packages/xl-ai/src/api/LLMRequest.ts b/packages/xl-ai/src/api/LLMRequest.ts new file mode 100644 index 0000000000..4dee3fcecb --- /dev/null +++ b/packages/xl-ai/src/api/LLMRequest.ts @@ -0,0 +1,231 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { CoreMessage, generateObject, LanguageModelV1, streamObject } from "ai"; +import { + generateOperations, + streamOperations, +} from "../streamTool/callLLMWithStreamTools.js"; +import { isEmptyParagraph } from "../util/emptyBlock.js"; +import { LLMResponse } from "./LLMResponse.js"; +import type { PromptBuilder } from "./formats/PromptBuilder.js"; +import { htmlBlockLLMFormat } from "./formats/html-blocks/htmlBlocks.js"; +import { LLMFormat } from "./index.js"; + +export type LLMRequestOptions = { + /** + * The language model to use for the LLM call (AI SDK) + */ + model: LanguageModelV1; + /** + * The user prompt to use for the LLM call + */ + userPrompt: string; + /** + * Previous response from the LLM, used for multi-step LLM calls + */ + previousResponse?: LLMResponse; + /** + * The default data format to use for LLM calls + * "html" is recommended, the other formats are experimental + * @default html format (`llm.html`) + */ + dataFormat?: LLMFormat; + /** + * The `PromptBuilder` to use for the LLM call + * + * (A PromptBuilder is a function that takes a BlockNoteEditor and details about the user's prompt + * and turns it into an AI SDK `CoreMessage` array to be passed to the LLM) + * + * @default provided by the format (e.g. `llm.html.defaultPromptBuilder`) + */ + promptBuilder?: PromptBuilder; + /** + * The maximum number of retries for the LLM call + * + * @default 2 + */ + maxRetries?: number; + /** + * Whether to use the editor selection for the LLM call + * + * @default true + */ + useSelection?: boolean; + /** + * Defines whether the LLM can add, update, or delete blocks + * + * @default { add: true, update: true, delete: true } + */ + defaultStreamTools?: { + /** Enable the add tool (default: true) */ + add?: boolean; + /** Enable the update tool (default: true) */ + update?: boolean; + /** Enable the delete tool (default: true) */ + delete?: boolean; + }; + /** + * Whether to stream the LLM response or not + * + * When streaming, we use the AI SDK `streamObject` function, + * otherwise, we use the AI SDK `generateObject` function. + * + * @default true + */ + stream?: boolean; + /** + * If the user's cursor is in an empty paragraph, automatically delete it when the AI + * is starting to write. + * + * (This is used when a user starts typing `/ai` in an empty block) + * + * @default true + */ + deleteEmptyCursorBlock?: boolean; + /** + * Callback when a specific block is updated by the LLM + * + * (used by `AIExtension` to update the `AIMenu` position) + */ + onBlockUpdate?: (blockId: string) => void; + /** + * Callback when the AI Agent starts writing + */ + onStart?: () => void; + /** + * Whether to add delays between text update operations, to make the AI simulate a human typing + * + * @default true + */ + withDelays?: boolean; + /** + * Additional options to pass to the `generateObject` function + * (only used when `stream` is `false`) + */ + _generateObjectOptions?: Partial>[0]>; + /** + * Additional options to pass to the `streamObject` function + * (only used when `stream` is `true`) + */ + _streamObjectOptions?: Partial>[0]>; +}; + +/** + * Execute an LLM call and apply the result to the editor + * + * @param editor - The BlockNoteEditor the LLM should operate on + * @param opts - The options for the LLM call (@link {CallLLMOptions}) + * @returns A `LLMResponse` object containing the LLM response which can be applied to the editor + */ +export async function doLLMRequest( + editor: BlockNoteEditor, + opts: LLMRequestOptions, +): Promise { + const { + userPrompt, + useSelection, + deleteEmptyCursorBlock, + stream, + onStart, + withDelays, + dataFormat, + previousResponse, + ...rest + } = { + maxRetries: 2, + deleteEmptyCursorBlock: true, + stream: true, + withDelays: true, + dataFormat: htmlBlockLLMFormat, + ...opts, + }; + + const promptBuilder = opts.promptBuilder ?? dataFormat.defaultPromptBuilder; + const getStreamTools = dataFormat.getStreamTools; + + const cursorBlock = useSelection + ? undefined + : editor.getTextCursorPosition().block; + + const deleteCursorBlock: string | undefined = + cursorBlock && deleteEmptyCursorBlock && isEmptyParagraph(cursorBlock) + ? cursorBlock.id + : undefined; + + const selectionInfo = useSelection + ? editor.getSelectionCutBlocks() + : undefined; + + let previousMessages: CoreMessage[] | undefined = undefined; + + if (previousResponse) { + previousMessages = previousResponse.messages; + /* + We currently insert these messages as "assistant" string messages. + When using Tools, the "official" pattern for this is to use a "tool_result" message. + We might need to switch to this, but it would require more research whether: + - we maybe should switch to streamText / generateText instead of streamObject / generateObject + (this has built in access to `response.messages` on the AI SDK level) + - but, we need to make research whether tool calls are always way to go. + generateObject / streamObject can also use structured outputs, and this + might be yielding better results than tool calls. + + For now, this approach works ok. + */ + previousMessages.push({ + role: "assistant", + content: + "These are the operations returned by a previous LLM call: \n" + + JSON.stringify( + await previousResponse.llmResult.getGeneratedOperations(), + ), + }); + } + + const messages = await promptBuilder(editor, { + selectedBlocks: selectionInfo?.blocks, + userPrompt, + excludeBlockIds: deleteCursorBlock ? [deleteCursorBlock] : undefined, + previousMessages, + }); + + const streamTools = getStreamTools( + editor, + withDelays, + opts.defaultStreamTools, + selectionInfo + ? { from: selectionInfo._meta.startPos, to: selectionInfo._meta.endPos } + : undefined, + opts.onBlockUpdate, + ); + + let response: + | Awaited>> + | Awaited>>; + + if (stream) { + response = await streamOperations( + streamTools, + { + messages, + ...rest, + }, + () => { + if (deleteCursorBlock) { + editor.removeBlocks([deleteCursorBlock]); + } + onStart?.(); + }, + ); + } else { + response = await generateOperations(streamTools, { + messages, + ...rest, + }); + if (deleteCursorBlock) { + editor.removeBlocks([deleteCursorBlock]); + } + onStart?.(); + } + + return new LLMResponse(messages, response, streamTools); +} diff --git a/packages/xl-ai/src/api/LLMResponse.ts b/packages/xl-ai/src/api/LLMResponse.ts new file mode 100644 index 0000000000..1321ab5b9d --- /dev/null +++ b/packages/xl-ai/src/api/LLMResponse.ts @@ -0,0 +1,64 @@ +import { CoreMessage } from "ai"; +import { OperationsResult } from "../streamTool/callLLMWithStreamTools.js"; +import { StreamTool, StreamToolCall } from "../streamTool/streamTool.js"; + +/** + * Result of an LLM call with stream tools that apply changes to a BlockNote Editor + */ +export class LLMResponse { + /** + * @internal + */ + constructor( + /** + * The messages sent to the LLM + */ + public readonly messages: CoreMessage[], + /** + * Result of the underlying LLM call. Use this to access operations the LLM decided to execute, but without applying them. + * (usually this is only used for advanced used cases or debugging) + */ + public readonly llmResult: OperationsResult, + + private readonly streamTools: StreamTool[], + ) {} + + /** + * Apply the operations to the editor and return a stream of results. + * + * (this method consumes underlying streams in `llmResult`) + */ + async *applyToolCalls() { + let currentStream: AsyncIterable<{ + operation: StreamToolCall[]>; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; + }> = this.llmResult.operationsSource; + for (const tool of this.streamTools) { + currentStream = tool.execute(currentStream); + } + yield* currentStream; + } + + /** + * Helper method to apply all operations to the editor if you're not interested in intermediate operations and results. + * + * (this method consumes underlying streams in `llmResult`) + */ + public async execute() { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + for await (const _result of this.applyToolCalls()) { + // no op + } + } + + /** + * @internal + */ + public async _logToolCalls() { + for await (const toolCall of this.llmResult.operationsSource) { + // eslint-disable-next-line no-console + console.log(JSON.stringify(toolCall, null, 2)); + } + } +} diff --git a/packages/xl-ai/src/api/formats/PromptBuilder.ts b/packages/xl-ai/src/api/formats/PromptBuilder.ts new file mode 100644 index 0000000000..5465e25dfd --- /dev/null +++ b/packages/xl-ai/src/api/formats/PromptBuilder.ts @@ -0,0 +1,46 @@ +import { Block, BlockNoteEditor } from "@blocknote/core"; +import { CoreMessage } from "ai"; + +/* +We want users to be able to easily customize the prompts send to an LLM, +especially since different models might need slightly different prompts. + +For this, we use PromptBuilders that the + +Every format (html, markdown, json) has a default PromptBuilder that is used if no custom one is provided, +which is also exposed as `llm.html.defaultPromptBuilder` etc. for possible reuse. +*/ + +/** + * The input passed to a PromptBuilder + */ +export type PromptBuilderInput = { + /** + * The ids of blocks that should be excluded from the prompt + * (e.g.: if `deleteEmptyCursorBlock` is true in the LLMRequest, + * this will be the id of the block that should be ignored) + */ + excludeBlockIds?: string[]; + /** + * The selection of the editor which the LLM should operate on + */ + selectedBlocks?: Block[]; + /** + * The user's prompt + */ + userPrompt: string; + /** + * When following a multi-step conversation, or repairing a previous error, + * the previous messages that have been sent to the LLM + */ + previousMessages?: Array; +}; + +/** + * A PromptBuilder is a function that takes a BlockNoteEditor and details about the user's promot + * and turns it into an array of CoreMessage to be passed to the LLM. + */ +export type PromptBuilder = ( + editor: BlockNoteEditor, + opts: PromptBuilderInput, +) => Promise>; diff --git a/packages/xl-ai/src/api/formats/base-tools/createAddBlocksTool.ts b/packages/xl-ai/src/api/formats/base-tools/createAddBlocksTool.ts new file mode 100644 index 0000000000..0cfa370a4f --- /dev/null +++ b/packages/xl-ai/src/api/formats/base-tools/createAddBlocksTool.ts @@ -0,0 +1,290 @@ +import { BlockNoteEditor, insertBlocks, PartialBlock } from "@blocknote/core"; +import type { JSONSchema7 } from "json-schema"; +import { + AgentStep, + agentStepToTr, + delayAgentStep, + getStepsAsAgent, +} from "../../../prosemirror/agent.js"; +import { updateToReplaceSteps } from "../../../prosemirror/changeset.js"; +import { RebaseTool } from "../../../prosemirror/rebaseTool.js"; +import { Result, streamTool } from "../../../streamTool/streamTool.js"; +import { isEmptyParagraph } from "../../../util/emptyBlock.js"; +import { validateBlockArray } from "./util/validateBlockArray.js"; + +/** + * Factory function to create a StreamTool that adds blocks to the document. + */ +export function createAddBlocksTool(config: { + /** + * The description of the tool + */ + description: string; + /** + * The schema of the tool + */ + schema: + | { + block: JSONSchema7["items"]; + $defs?: JSONSchema7["$defs"]; + } + | ((editor: BlockNoteEditor) => { + block: JSONSchema7["items"]; + $defs?: JSONSchema7["$defs"]; + }); + /** + * A function that can validate a block + */ + validateBlock: ( + block: any, + editor: BlockNoteEditor, + ) => Result; + /** + * The rebaseTool is used to get a projection of the document that + * the JSON Tool Calls will be applied to. By using the rebaseTool we can + * apply operations to a "projected" document, and then map them (rebase) to the actual document + * + * This is to: + * - apply operations without suggestion-marks to an editor that has suggestions in it + * (the projection should have the suggestions applied) + * - apply operations from a format that doesn't support all Block features (e.g.: markdown) + * (the projection should be the the BlockNote document without the unsupported features) + */ + rebaseTool: ( + id: string, + editor: BlockNoteEditor, + ) => Promise; + /** + * Converts the operation from `AddBlocksToolCall` to `AddBlocksToolCall>` + * + * When using these factories to create a tool for a different format (e.g.: HTML / MD), + * the `toJSONToolCall` function is used to convert the operation to a format that we can execute + */ + toJSONToolCall: ( + editor: BlockNoteEditor, + chunk: { + operation: AddBlocksToolCall; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; + }, + ) => Promise> | undefined>; +}) { + return ( + editor: BlockNoteEditor, + options: { + idsSuffixed: boolean; + withDelays: boolean; + onBlockUpdate?: (blockId: string) => void; + }, + ) => { + const schema = + typeof config.schema === "function" + ? config.schema(editor) + : config.schema; + return streamTool>({ + name: "add", + description: config.description, + parameters: { + type: "object", + properties: { + referenceId: { + type: "string", + description: "MUST be an id of a block in the document", + }, + position: { + type: "string", + enum: ["before", "after"], + description: + "`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)", + }, + blocks: { + items: schema.block, + type: "array", + }, + }, + required: ["referenceId", "position", "blocks"], + $defs: schema.$defs, + }, + validate: (operation) => { + if (operation.type !== "add") { + return { + ok: false, + error: "invalid operation type", + }; + } + + if (operation.position !== "before" && operation.position !== "after") { + return { + ok: false, + error: "invalid position", + }; + } + + if (!operation.referenceId || !operation.blocks) { + return { + ok: false, + error: "referenceId and blocks are required", + }; + } + + let referenceId = operation.referenceId; + if (options.idsSuffixed) { + if (!referenceId?.endsWith("$")) { + return { + ok: false, + error: "referenceId must end with $", + }; + } + + referenceId = referenceId.slice(0, -1); + } + + const block = editor.getBlock(referenceId); + + if (!block) { + return { + ok: false, + error: "referenceId not found", + }; + } + + const validatedBlocksResult = validateBlockArray( + operation.blocks, + (block) => config.validateBlock(block, editor), + ); + + if (!validatedBlocksResult.ok) { + return validatedBlocksResult; + } + + return { + ok: true, + value: { + type: operation.type, + referenceId, + position: operation.position, + blocks: validatedBlocksResult.value, + }, + }; + }, + // Note: functionality mostly tested in jsontools.test.ts + // would be nicer to add a direct unit test + execute: async function* (operationsStream) { + // An add operation has some complexity: + // - it can add multiple blocks in 1 operation + // (this is needed because you need an id as reference block - and if you want to insert multiple blocks you can only use an existing block as reference id) + // - when streaming, the first time we encounter a block to add, it's an "insert" operation, but after that (i.e.: more characters are being streamed in) + // it's an update operation (i.e.: update the previously added block) + + // keep track of added block ids to be able to update blocks that have already been added + let addedBlockIds: string[] = []; + + const referenceIdMap: Record = {}; // TODO: unit test + + for await (const chunk of operationsStream) { + if (!chunk.isUpdateToPreviousOperation) { + // we have a new operation, reset the added block ids + addedBlockIds = []; + } + + if (chunk.operation.type !== "add") { + // pass through non-add operations + yield chunk; + continue; + } + + const operation = chunk.operation as AddBlocksToolCall; + + const jsonToolCall = await config.toJSONToolCall(editor, chunk); + + if (!jsonToolCall) { + continue; + } + + if ( + chunk.isPossiblyPartial && + isEmptyParagraph( + jsonToolCall.blocks[jsonToolCall.blocks.length - 1], + ) + ) { + // for example, a parsing just "
    " would first result in an empty paragraph, + // wait for more content before adding the block + continue; + } + + for (let i = 0; i < jsonToolCall.blocks.length; i++) { + const block = jsonToolCall.blocks[i]; + const doc = editor.prosemirrorState.doc; + const tr = editor.prosemirrorState.tr; + + let agentSteps: AgentStep[] = []; + if (i < addedBlockIds.length) { + // we have already added this block, so we need to update it + const tool = await config.rebaseTool(addedBlockIds[i], editor); + const steps = updateToReplaceSteps( + { + id: addedBlockIds[i], + block, + }, + tool.doc, + false, + ); + + const inverted = steps.map((step) => step.map(tool.invertMap)!); + agentSteps = getStepsAsAgent(doc, editor.pmSchema, inverted); + // don't spend time "selecting" the block as an agent, as we're continuing a previous update + agentSteps = agentSteps.filter((step) => step.type !== "select"); + } else { + // we are adding a new block, so we need to insert it + const mappedReferenceId = + operation.position === "after" + ? referenceIdMap[operation.referenceId] + : undefined; + + const ret = insertBlocks( + tr, + [block], + i > 0 + ? addedBlockIds[i - 1] + : mappedReferenceId || operation.referenceId, + i > 0 ? "after" : operation.position, + ); + addedBlockIds.push(...ret.map((r) => r.id)); + agentSteps = getStepsAsAgent(doc, editor.pmSchema, tr.steps); + } + + if (agentSteps.find((step) => step.type === "replace")) { + // throw new Error("unexpected: replace step in add operation"); + // this is unexpected but we've been able to see this when: + // adding a list item, because
      first gets parsed as paragraph, that then gets turned into a list + } + + for (const step of agentSteps) { + if (options.withDelays) { + await delayAgentStep(step); + } + editor.transact((tr) => { + agentStepToTr(tr, step); + }); + options.onBlockUpdate?.(addedBlockIds[i]); + } + } + + if (!chunk.isPossiblyPartial) { + if (operation.position === "after") { + referenceIdMap[operation.referenceId] = + addedBlockIds[addedBlockIds.length - 1]; + } + } + } + }, + }); + }; +} + +export type AddBlocksToolCall = { + type: "add"; + referenceId: string; + position: "before" | "after"; + blocks: T[]; +}; diff --git a/packages/xl-ai/src/api/formats/base-tools/createUpdateBlockTool.ts b/packages/xl-ai/src/api/formats/base-tools/createUpdateBlockTool.ts new file mode 100644 index 0000000000..4a6d32171e --- /dev/null +++ b/packages/xl-ai/src/api/formats/base-tools/createUpdateBlockTool.ts @@ -0,0 +1,268 @@ +import { BlockNoteEditor, PartialBlock, trackPosition } from "@blocknote/core"; +import type { JSONSchema7 } from "json-schema"; +import { + agentStepToTr, + delayAgentStep, + getStepsAsAgent, +} from "../../../prosemirror/agent.js"; +import { updateToReplaceSteps } from "../../../prosemirror/changeset.js"; +import { RebaseTool } from "../../../prosemirror/rebaseTool.js"; +import { + Result, + StreamTool, + streamTool, + StreamToolCall, +} from "../../../streamTool/streamTool.js"; + +export type UpdateBlockToolCall = { + type: "update"; + id: string; + block: T; +}; + +/** + * Factory function to create a StreamTool that Updates blocks in the document. + */ +export function createUpdateBlockTool(config: { + /** + * The description of the tool + */ + description: string; + /** + * The schema of the tool + */ + schema: + | { + block: JSONSchema7; + $defs?: JSONSchema7["$defs"]; + } + | ((editor: BlockNoteEditor) => { + block: JSONSchema7; + $defs?: JSONSchema7["$defs"]; + }); + /** + * A function that can validate a block + */ + validateBlock: ( + block: any, + editor: BlockNoteEditor, + fallbackType?: string, + ) => Result; + /** + * The rebaseTool is used to get a projection of the document that + * the JSON Tool Calls will be applied to. By using the rebaseTool we can + * apply operations to a "projected" document, and then map them (rebase) to the actual document + * + * This is to: + * - apply operations without suggestion-marks to an editor that has suggestions in it + * (the projection should have the suggestions applied) + * - apply operations from a format that doesn't support all Block features (e.g.: markdown) + * (the projection should be the the BlockNote document without the unsupported features) + */ + rebaseTool: ( + id: string, + editor: BlockNoteEditor, + ) => Promise; + /** + * Converts the operation from `AddBlocksToolCall` to `AddBlocksToolCall>` + * + * When using these factories to create a tool for a different format (e.g.: HTML / MD), + * the `toJSONToolCall` function is used to convert the operation to a format that we can execute + */ + toJSONToolCall: ( + editor: BlockNoteEditor, + chunk: { + operation: UpdateBlockToolCall; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; + }, + ) => Promise> | undefined>; +}) { + return ( + editor: BlockNoteEditor, + options: { + idsSuffixed: boolean; + withDelays: boolean; + updateSelection?: { + from: number; + to: number; + }; + onBlockUpdate?: (blockId: string) => void; + }, + ) => { + const schema = + typeof config.schema === "function" + ? config.schema(editor) + : config.schema; + return streamTool>({ + name: "update", + description: config.description, + parameters: { + type: "object", + properties: { + id: { + type: "string", + description: "id of block to update", + }, + block: schema.block, + }, + required: ["id", "block"], + $defs: schema.$defs, + }, + validate: (operation) => { + if (operation.type !== "update") { + return { + ok: false, + error: "invalid operation type", + }; + } + + if (!operation.id) { + return { + ok: false, + error: "id is required", + }; + } + + let id = operation.id; + if (options.idsSuffixed) { + if (!id?.endsWith("$")) { + return { + ok: false, + error: "id must end with $", + }; + } + + id = id.slice(0, -1); + } + + if (!operation.block) { + return { + ok: false, + error: "block is required", + }; + } + + const block = editor.getBlock(id); + + if (!block) { + // eslint-disable-next-line no-console + console.error("BLOCK NOT FOUND", id); + return { + ok: false, + error: "block not found", + }; + } + + const ret = config.validateBlock(operation.block, editor, block.type); + + if (!ret.ok) { + return ret; + } + + return { + ok: true, + value: { + type: operation.type, + id, + block: ret.value, + }, + }; + }, + // Note: functionality mostly tested in jsontools.test.ts + // would be nicer to add a direct unit test + execute: async function* ( + operationsStream: AsyncIterable<{ + operation: StreamToolCall[]>; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; + }>, + ) { + const STEP_SIZE = 50; + let minSize = STEP_SIZE; + const selectionPositions = options.updateSelection + ? { + from: trackPosition(editor, options.updateSelection.from), + to: trackPosition(editor, options.updateSelection.to), + } + : undefined; + + for await (const chunk of operationsStream) { + if (chunk.operation.type !== "update") { + // pass through non-update operations + yield chunk; + continue; + } + + const operation = chunk.operation as UpdateBlockToolCall; + + if (chunk.isPossiblyPartial) { + const size = JSON.stringify(operation.block).length; + if (size < minSize) { + continue; + } else { + // increase minSize for next chunk + minSize = size + STEP_SIZE; + } + } else { + // reset for next chunk + minSize = STEP_SIZE; + } + + // REC: we could investigate whether we can use a single rebasetool across operations instead of + // creating a new one every time (possibly expensive) + const tool = await config.rebaseTool(operation.id, editor); + + const fromPos = selectionPositions + ? tool.invertMap.invert().map(selectionPositions.from()) + : undefined; + + const toPos = selectionPositions + ? tool.invertMap.invert().map(selectionPositions.to()) + : undefined; + + const jsonToolCall = await config.toJSONToolCall(editor, chunk); + if (!jsonToolCall) { + continue; + } + + const steps = updateToReplaceSteps( + jsonToolCall, + tool.doc, + chunk.isPossiblyPartial, + fromPos, + toPos, + ); + + if (steps.length === 1 && chunk.isPossiblyPartial) { + // when replacing a larger piece of text (try translating a 3 paragraph document), we want to do this as one single operation + // we don't want to do this "sentence-by-sentence" + + // if there's only a single replace step to be done and we're partial, let's wait for more content + + // REC: unit test this and see if it's still needed even if we pass `dontReplaceContentAtEnd` to `updateToReplaceSteps` + continue; + } + + const inverted = steps.map((step) => step.map(tool.invertMap)!); + + const agentSteps = getStepsAsAgent( + editor.prosemirrorState.doc, + editor.pmSchema, + inverted, + ); + + for (const step of agentSteps) { + if (options.withDelays) { + await delayAgentStep(step); + } + editor.transact((tr) => { + agentStepToTr(tr, step); + }); + options.onBlockUpdate?.(operation.id); + } + } + }, + }); + }; +} diff --git a/packages/xl-ai/src/api/formats/base-tools/delete.ts b/packages/xl-ai/src/api/formats/base-tools/delete.ts new file mode 100644 index 0000000000..cca1faabd1 --- /dev/null +++ b/packages/xl-ai/src/api/formats/base-tools/delete.ts @@ -0,0 +1,115 @@ +import { BlockNoteEditor, removeAndInsertBlocks } from "@blocknote/core"; +import { + agentStepToTr, + delayAgentStep, + getStepsAsAgent, +} from "../../../prosemirror/agent.js"; +import { streamTool } from "../../../streamTool/streamTool.js"; + +/** + * Factory function to create a StreamTool that deletes a block from the document. + */ +export const deleteBlockTool = ( + editor: BlockNoteEditor, + options: { + idsSuffixed: boolean; + withDelays: boolean; + onBlockUpdate?: (blockId: string) => void; + }, +) => + streamTool({ + name: "delete", + description: "Delete a block", + parameters: { + type: "object", + properties: { + id: { + type: "string", + description: "id of block to delete", + }, + }, + required: ["id"], + }, + validate: (operation) => { + if (operation.type !== "delete") { + return { + ok: false, + error: "invalid operation type", + }; + } + + if (!operation.id) { + return { + ok: false, + error: "id is required", + }; + } + + let id = operation.id; + if (options.idsSuffixed) { + if (!id?.endsWith("$")) { + return { + ok: false, + error: "id must end with $", + }; + } + + id = id.slice(0, -1); + } + + const block = editor.getBlock(id); + + if (!block) { + return { + ok: false, + error: "block not found", + }; + } + + return { + ok: true, + value: { + type: "delete", // TODO + id, + }, + }; + }, + // Note: functionality mostly tested in jsontools.test.ts + // would be nicer to add a direct unit test + execute: async function* (operationsStream) { + for await (const chunk of operationsStream) { + if (chunk.operation.type !== "delete") { + // pass through non-delete operations + yield chunk; + continue; + } + + const operation = chunk.operation as DeleteBlockToolCall; + + const tr = editor.prosemirrorState.tr; + + removeAndInsertBlocks(tr, [operation.id], []); + + const agentSteps = getStepsAsAgent( + editor.prosemirrorState.doc, + editor.pmSchema, + tr.steps, + ); + + for (const step of agentSteps) { + if (options.withDelays) { + await delayAgentStep(step); + } + editor.transact((tr) => { + agentStepToTr(tr, step); + }); + options.onBlockUpdate?.(operation.id); + } + } + }, + }); + +export type DeleteBlockToolCall = { + type: "delete"; + id: string; +}; diff --git a/packages/xl-ai/src/api/formats/base-tools/util/validateBlockArray.ts b/packages/xl-ai/src/api/formats/base-tools/util/validateBlockArray.ts new file mode 100644 index 0000000000..7f9dff6f6f --- /dev/null +++ b/packages/xl-ai/src/api/formats/base-tools/util/validateBlockArray.ts @@ -0,0 +1,32 @@ +import { DeepPartial } from "ai"; +import { Result } from "../../../../streamTool/streamTool.js"; + +export function validateBlockArray( + inputArray: DeepPartial>, + validateItem: (item: DeepPartial) => Result, +): Result { + if (!inputArray || !Array.isArray(inputArray) || inputArray.length === 0) { + return { + ok: false, + error: "blocks is required", + }; + } + + const validatedBlocks: U[] = []; + + for (const item of inputArray) { + const validationResult = validateItem(item as DeepPartial); + if (!validationResult.ok) { + return { + ok: false, + error: `Invalid block: ${validationResult.error}`, + }; + } + validatedBlocks.push(validationResult.value); + } + + return { + ok: true, + value: validatedBlocks, + }; +} diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/Add heading (h1) and code block_1_112bacb4ae22459e8e8b87c510a5a1ab.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/Add heading (h1) and code block_1_112bacb4ae22459e8e8b87c510a5a1ab.json new file mode 100644 index 0000000000..ff7de6f5a5 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/Add heading (h1) and code block_1_112bacb4ae22459e8e8b87c510a5a1ab.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"at the end of doc, add a heading `Code` and a javascript code block with `console.log('hello world');`\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-ec40f7c0b274499f8c68dfc3186fdfbf\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-210790e35fc74749b75e1558ab0101e0\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"add\\\", \\\"referenceId\\\": \\\"ref2$\\\", \\\"position\\\": \\\"after\\\", \\\"blocks\\\": [\\\"

      Code

      \\\", \\\"
      console.log('hello world');
      \\\"]}] }\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169489,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":59,\"prompt_tokens\":1026,\"total_tokens\":1085,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a list (end)_1_fd2cdf7edb597b5eee87ae1b4c9d8a9e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a list (end)_1_fd2cdf7edb597b5eee87ae1b4c9d8a9e.json new file mode 100644 index 0000000000..6c0112dd36 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a list (end)_1_fd2cdf7edb597b5eee87ae1b4c9d8a9e.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a list with the items 'Apples' and 'Bananas' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-c4ac36bf49814b25b694a205209509fc\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-04e44de6a8c044f5a41a0ae4285c3957\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"add\\\", \\\"referenceId\\\": \\\"ref2$\\\", \\\"position\\\": \\\"after\\\", \\\"blocks\\\": [\\\"
      • Apples
      \\\", \\\"
      • Bananas
      \\\"]}] }\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169487,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":55,\"prompt_tokens\":1019,\"total_tokens\":1074,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a new paragraph (end)_1_f9f8cec49b3218519501c03ff5c4a3ba.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a new paragraph (end)_1_f9f8cec49b3218519501c03ff5c4a3ba.json new file mode 100644 index 0000000000..9edfa5d6a0 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a new paragraph (end)_1_f9f8cec49b3218519501c03ff5c4a3ba.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-de4615e533824f098ad3dfc24150bfac\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-6c25776533b748c5a78e13dda4b79b4e\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"add\\\", \\\"referenceId\\\": \\\"ref2$\\\", \\\"position\\\": \\\"after\\\", \\\"blocks\\\": [\\\"

      You look great today!

      \\\"]}] }\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169486,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":40,\"prompt_tokens\":1017,\"total_tokens\":1057,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a new paragraph (start)_1_d152c585ba7d2fa6e68b1d4b063f266c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a new paragraph (start)_1_d152c585ba7d2fa6e68b1d4b063f266c.json new file mode 100644 index 0000000000..8f444d3742 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add a new paragraph (start)_1_d152c585ba7d2fa6e68b1d4b063f266c.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-a8a63b1b8fd842b7a4b95fe1ef392563\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-854f46b70ff44f2392df1e6bbff3321d\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"add\\\", \\\"referenceId\\\": \\\"ref1$\\\", \\\"position\\\": \\\"before\\\", \\\"blocks\\\": [\\\"

      You look great today!

      \\\"]}] }\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169395,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":40,\"prompt_tokens\":1017,\"total_tokens\":1057,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (streaming)/add a new paragraph (start)_1_ae61114b97c12fbf57d14d6c64ffd647.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (streaming)/add a new paragraph (start)_1_ae61114b97c12fbf57d14d6c64ffd647.json new file mode 100644 index 0000000000..c37c2d1467 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (streaming)/add a new paragraph (start)_1_ae61114b97c12fbf57d14d6c64ffd647.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\" [{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\" \\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"\\\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\" \\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\" \\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"$\\\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\" \\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\" \\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"before\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"\\\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\" \\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\" [\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\">You\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\" look\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\" great\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\" today\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"\\\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"}]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\" }\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-ef5de584b13243d7be4fdacfbba056cc\",\"object\":\"chat.completion.chunk\",\"created\":1747169371,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"name\":\"json\",\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":\"stop\",\"stop_reason\":null}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/Add heading (h1) and code block_1_c9a31b6237ae08647b85c7348edd052f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/Add heading (h1) and code block_1_c9a31b6237ae08647b85c7348edd052f.json new file mode 100644 index 0000000000..0b093f96ec --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/Add heading (h1) and code block_1_c9a31b6237ae08647b85c7348edd052f.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"at the end of doc, add a heading `Code` and a javascript code block with `console.log('hello world');`\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-ce0f0554-8187-4ed4-9666-a56145673eb9\",\"object\":\"chat.completion\",\"created\":1747170025,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_7629\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"\\u003ch1\\u003eCode\\u003c/h1\\u003e\\\",\\\"\\u003cpre\\u003e\\u003ccode data-language=\\\\\\\"javascript\\\\\\\"\\u003econsole.log('hello world');\\u003c/code\\u003e\\u003c/pre\\u003e\\\"]}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.09505998100000002,\"prompt_tokens\":842,\"prompt_time\":0.054691882,\"completion_tokens\":55,\"completion_time\":0.2,\"total_tokens\":897,\"total_time\":0.254691882},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_3f3b593e33\",\"x_groq\":{\"id\":\"req_01jv5q5r0ff1erzqp9x2mt7vbc\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/Add heading and code block_1_c9a31b6237ae08647b85c7348edd052f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/Add heading and code block_1_c9a31b6237ae08647b85c7348edd052f.json new file mode 100644 index 0000000000..5084073956 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/Add heading and code block_1_c9a31b6237ae08647b85c7348edd052f.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"at the end of doc, add a heading `Code` and a javascript code block with `console.log('hello world');`\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-e9e28157-bc5c-471d-b273-1d66bac076e2\",\"object\":\"chat.completion\",\"created\":1747168998,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_vgf8\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"\\u003ch1\\u003eCode\\u003c/h1\\u003e\\\",\\\"\\u003cpre\\u003e\\u003ccode data-language=\\\\\\\"javascript\\\\\\\"\\u003econsole.log('hello world');\\u003c/code\\u003e\\u003c/pre\\u003e\\\"]}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.11221671899999999,\"prompt_tokens\":842,\"prompt_time\":0.054762096,\"completion_tokens\":55,\"completion_time\":0.2,\"total_tokens\":897,\"total_time\":0.254762096},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_9a8b91ba77\",\"x_groq\":{\"id\":\"req_01jv5p6da8e0asd5d2f47hx2q4\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a list (end)_1_db45f2ba8778e15e8a5f7a320508be46.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a list (end)_1_db45f2ba8778e15e8a5f7a320508be46.json new file mode 100644 index 0000000000..35b3203366 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a list (end)_1_db45f2ba8778e15e8a5f7a320508be46.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a list with the items 'Apples' and 'Bananas' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-4fe27609-db38-47c6-8e40-48f8cc6bb169\",\"object\":\"chat.completion\",\"created\":1747168998,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_ap0z\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"\\u003cul\\u003e\\u003cli\\u003eApples\\u003c/li\\u003e\\u003c/ul\\u003e\\\",\\\"\\u003cul\\u003e\\u003cli\\u003eBananas\\u003c/li\\u003e\\u003c/ul\\u003e\\\"]}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.09519743500000001,\"prompt_tokens\":835,\"prompt_time\":0.06535181,\"completion_tokens\":51,\"completion_time\":0.185454545,\"total_tokens\":886,\"total_time\":0.250806355},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_9a8b91ba77\",\"x_groq\":{\"id\":\"req_01jv5p6ctyezfvxb69h1pmzenh\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (end)_1_f3eaf50ddad718f55acaa05dcc1a2809.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (end)_1_f3eaf50ddad718f55acaa05dcc1a2809.json new file mode 100644 index 0000000000..6b355e4a37 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (end)_1_f3eaf50ddad718f55acaa05dcc1a2809.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-75b980c7-cf5c-4532-9353-ee4e145eb7bf\",\"object\":\"chat.completion\",\"created\":1747168998,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_gpqx\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"\\u003cp\\u003eYou look great today!\\u003c/p\\u003e\\\"]}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.109649134,\"prompt_tokens\":833,\"prompt_time\":0.063162432,\"completion_tokens\":35,\"completion_time\":0.127272727,\"total_tokens\":868,\"total_time\":0.190435159},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_9a8b91ba77\",\"x_groq\":{\"id\":\"req_01jv5p6cgdezf8n2akntvyqk38\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (start)_1_33db3205ea17e8f6ea3a5e2728b6f10e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (start)_1_33db3205ea17e8f6ea3a5e2728b6f10e.json new file mode 100644 index 0000000000..861e5d15a8 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add a new paragraph (start)_1_33db3205ea17e8f6ea3a5e2728b6f10e.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-8178d9b2-0922-44f7-b9bf-7ced73e9c70d\",\"object\":\"chat.completion\",\"created\":1747168997,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_4mhc\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"\\u003cp\\u003eYou look great today!\\u003c/p\\u003e\\\"]}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.26469998899999997,\"prompt_tokens\":833,\"prompt_time\":0.118430617,\"completion_tokens\":35,\"completion_time\":0.127272727,\"total_tokens\":868,\"total_time\":0.245703344},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_4e32347616\",\"x_groq\":{\"id\":\"req_01jv5p6bxke9bs55wxz3pnh86s\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading (h1) and code block_1_5790f7702887daff99c884204e6ae3df.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading (h1) and code block_1_5790f7702887daff99c884204e6ae3df.json new file mode 100644 index 0000000000..c68d8e18ef --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading (h1) and code block_1_5790f7702887daff99c884204e6ae3df.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"at the end of doc, add a heading `Code` and a javascript code block with `console.log('hello world');`\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-c1717121-d770-449f-abed-8d926470bc4c\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5q5qchfwmv4hx0354zcmdj\"}}\n\ndata: {\"id\":\"chatcmpl-c1717121-d770-449f-abed-8d926470bc4c\",\"object\":\"chat.completion.chunk\",\"created\":1747170025,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_v8zn\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"\\u003ch1\\u003eCode\\u003c/h1\\u003e\\\",\\\"\\u003cpre\\u003e\\u003ccode data-language=\\\\\\\"javascript\\\\\\\"\\u003econsole.log('hello world');\\u003c/code\\u003e\\u003c/pre\\u003e\\\"]}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-c1717121-d770-449f-abed-8d926470bc4c\",\"object\":\"chat.completion.chunk\",\"created\":1747170025,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5q5qchfwmv4hx0354zcmdj\",\"usage\":{\"queue_time\":0.094995369,\"prompt_tokens\":842,\"prompt_time\":0.061812596,\"completion_tokens\":55,\"completion_time\":0.2,\"total_tokens\":897,\"total_time\":0.261812596}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading and code block_1_5790f7702887daff99c884204e6ae3df.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading and code block_1_5790f7702887daff99c884204e6ae3df.json new file mode 100644 index 0000000000..0363c91ba1 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/Add heading and code block_1_5790f7702887daff99c884204e6ae3df.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"at the end of doc, add a heading `Code` and a javascript code block with `console.log('hello world');`\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-69c542c9-0659-4d2f-9873-7bd11b4f7c2f\",\"object\":\"chat.completion.chunk\",\"created\":1747168986,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p61kre98txh5sv1fzt9md\"}}\n\ndata: {\"id\":\"chatcmpl-69c542c9-0659-4d2f-9873-7bd11b4f7c2f\",\"object\":\"chat.completion.chunk\",\"created\":1747168987,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_jr7b\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"\\u003ch1\\u003eCode\\u003c/h1\\u003e\\\",\\\"\\u003cpre\\u003e\\u003ccode data-language=\\\\\\\"javascript\\\\\\\"\\u003econsole.log('hello world');\\u003c/code\\u003e\\u003c/pre\\u003e\\\"]}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-69c542c9-0659-4d2f-9873-7bd11b4f7c2f\",\"object\":\"chat.completion.chunk\",\"created\":1747168987,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p61kre98txh5sv1fzt9md\",\"usage\":{\"queue_time\":0.111869994,\"prompt_tokens\":842,\"prompt_time\":0.058347442,\"completion_tokens\":55,\"completion_time\":0.2,\"total_tokens\":897,\"total_time\":0.258347442}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a list (end)_1_321607ef45a4235ca02c411097005de2.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a list (end)_1_321607ef45a4235ca02c411097005de2.json new file mode 100644 index 0000000000..87302de998 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a list (end)_1_321607ef45a4235ca02c411097005de2.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a list with the items 'Apples' and 'Bananas' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-6bc90ec3-5649-4f10-b596-9bd4f15788ed\",\"object\":\"chat.completion.chunk\",\"created\":1747168986,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p6133fzsrchcrhkz536jh\"}}\n\ndata: {\"id\":\"chatcmpl-6bc90ec3-5649-4f10-b596-9bd4f15788ed\",\"object\":\"chat.completion.chunk\",\"created\":1747168986,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_fd0e\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"\\u003cul\\u003e\\u003cli\\u003eApples\\u003c/li\\u003e\\u003c/ul\\u003e\\\",\\\"\\u003cul\\u003e\\u003cli\\u003eBananas\\u003c/li\\u003e\\u003c/ul\\u003e\\\"]}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-6bc90ec3-5649-4f10-b596-9bd4f15788ed\",\"object\":\"chat.completion.chunk\",\"created\":1747168986,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p6133fzsrchcrhkz536jh\",\"usage\":{\"queue_time\":0.095047051,\"prompt_tokens\":835,\"prompt_time\":0.148876645,\"completion_tokens\":51,\"completion_time\":0.185454545,\"total_tokens\":886,\"total_time\":0.33433119}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (end)_1_709e808af3f5fb39418413416804a03e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (end)_1_709e808af3f5fb39418413416804a03e.json new file mode 100644 index 0000000000..49fbb2ff33 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (end)_1_709e808af3f5fb39418413416804a03e.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-a6076c84-d162-4f18-8d98-29127684ac1a\",\"object\":\"chat.completion.chunk\",\"created\":1747168985,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p60r8ez7rte01zk6s5hkv\"}}\n\ndata: {\"id\":\"chatcmpl-a6076c84-d162-4f18-8d98-29127684ac1a\",\"object\":\"chat.completion.chunk\",\"created\":1747168986,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_6h17\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"\\u003cp\\u003eYou look great today!\\u003c/p\\u003e\\\"]}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-a6076c84-d162-4f18-8d98-29127684ac1a\",\"object\":\"chat.completion.chunk\",\"created\":1747168986,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p60r8ez7rte01zk6s5hkv\",\"usage\":{\"queue_time\":0.100163767,\"prompt_tokens\":833,\"prompt_time\":0.066282051,\"completion_tokens\":35,\"completion_time\":0.127272727,\"total_tokens\":868,\"total_time\":0.193554778}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (start)_1_034fd3f9b57eba789a6449d5ff3714c4.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (start)_1_034fd3f9b57eba789a6449d5ff3714c4.json new file mode 100644 index 0000000000..df150cc834 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add a new paragraph (start)_1_034fd3f9b57eba789a6449d5ff3714c4.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-e424e723-8091-45b4-939a-cfe33383ce6d\",\"object\":\"chat.completion.chunk\",\"created\":1747168985,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p60dsfzsssn77e49arqx4\"}}\n\ndata: {\"id\":\"chatcmpl-e424e723-8091-45b4-939a-cfe33383ce6d\",\"object\":\"chat.completion.chunk\",\"created\":1747168985,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_ad59\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"\\u003cp\\u003eYou look great today!\\u003c/p\\u003e\\\"]}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-e424e723-8091-45b4-939a-cfe33383ce6d\",\"object\":\"chat.completion.chunk\",\"created\":1747168985,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p60dsfzsssn77e49arqx4\",\"usage\":{\"queue_time\":0.10212511599999999,\"prompt_tokens\":833,\"prompt_time\":0.06505606,\"completion_tokens\":35,\"completion_time\":0.127272727,\"total_tokens\":868,\"total_time\":0.192328787}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_084f72a77d80ec6bb6cd2081b3b1d301.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_084f72a77d80ec6bb6cd2081b3b1d301.json new file mode 100644 index 0000000000..3e969ef721 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_084f72a77d80ec6bb6cd2081b3b1d301.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"at the end of doc, add a heading `Code` and a javascript code block with `console.log('hello world');`\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr1bVrJF6POwBdo4bKwfnrBENaLn\",\n \"object\": \"chat.completion\",\n \"created\": 1747170023,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_JBA2F0JboQH96Zw5ch7nh7SA\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"

      Code

      \\\",\\\"
      console.log('hello world');
      \\\"]}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 564,\n \"completion_tokens\": 55,\n \"total_tokens\": 619,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading and code block_1_084f72a77d80ec6bb6cd2081b3b1d301.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading and code block_1_084f72a77d80ec6bb6cd2081b3b1d301.json new file mode 100644 index 0000000000..30055ca03d --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading and code block_1_084f72a77d80ec6bb6cd2081b3b1d301.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"at the end of doc, add a heading `Code` and a javascript code block with `console.log('hello world');`\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkZneFFrUPs6hHtY2GyKC4MfVJK\",\n \"object\": \"chat.completion\",\n \"created\": 1747168967,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_iVcm6giwwVN4UTiKnubOTGss\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"

      Code

      \\\",\\\"
      console.log('hello world');
      \\\"]}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 564,\n \"completion_tokens\": 55,\n \"total_tokens\": 619,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_5c081c7846ad89b59477ceda44c2a349.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_5c081c7846ad89b59477ceda44c2a349.json new file mode 100644 index 0000000000..7e085d33b7 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_5c081c7846ad89b59477ceda44c2a349.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a list with the items 'Apples' and 'Bananas' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkVFRZzr3gAHqgMhNH0g78kNGXz\",\n \"object\": \"chat.completion\",\n \"created\": 1747168963,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_R8NR47jlWShpCRqlSjx0DzYD\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"
      • Apples
      \\\",\\\"
      • Bananas
      \\\"]}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 557,\n \"completion_tokens\": 50,\n \"total_tokens\": 607,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_97770b1d0462a25cfacd049807a59110.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_97770b1d0462a25cfacd049807a59110.json new file mode 100644 index 0000000000..0e98f86962 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_97770b1d0462a25cfacd049807a59110.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkVsPCI52z9bVPjgSFcBTiM8yo8\",\n \"object\": \"chat.completion\",\n \"created\": 1747168963,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_tB9Xr3ococ60oEsBY2RXfB1o\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"

      You look great today!

      \\\"]}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 555,\n \"completion_tokens\": 34,\n \"total_tokens\": 589,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_ecf9943025fd7f7183aac8d86c4e0b6c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_ecf9943025fd7f7183aac8d86c4e0b6c.json new file mode 100644 index 0000000000..0d58be97a9 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_ecf9943025fd7f7183aac8d86c4e0b6c.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkUiGHmND0Kd10ig5rA2tmB71Jj\",\n \"object\": \"chat.completion\",\n \"created\": 1747168962,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_wyUoYP3YIkxjJnpvRn1OQY8I\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"

      You look great today!

      \\\"]}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 555,\n \"completion_tokens\": 34,\n \"total_tokens\": 589,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_b19471ad74a7a4bf4b288369edf35407.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_b19471ad74a7a4bf4b288369edf35407.json new file mode 100644 index 0000000000..33b8d0647c --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_b19471ad74a7a4bf4b288369edf35407.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"at the end of doc, add a heading `Code` and a javascript code block with `console.log('hello world');`\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_8oiTouy8jkc45zd2sIjpDFXK\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"after\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"h\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Code\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"pre\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"><\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"code\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-language\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"javascript\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"console\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\".log\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"('\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"');\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqpHwqW5yKxfDFGeQTCdakJMOL0u\",\"object\":\"chat.completion.chunk\",\"created\":1747169259,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading and code block_1_b19471ad74a7a4bf4b288369edf35407.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading and code block_1_b19471ad74a7a4bf4b288369edf35407.json new file mode 100644 index 0000000000..bae398bd3b --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading and code block_1_b19471ad74a7a4bf4b288369edf35407.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"at the end of doc, add a heading `Code` and a javascript code block with `console.log('hello world');`\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_scRt1qMJACqjdlw2O11nmnF3\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"after\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"h\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Code\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"pre\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"><\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"code\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-language\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"javascript\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"console\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\".log\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"('\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"');\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkC5gyNQ3bnydhPjeCIg5xJJH1B\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_8105f57bbca898c1626edd5cd33308ed.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_8105f57bbca898c1626edd5cd33308ed.json new file mode 100644 index 0000000000..6166f25709 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_8105f57bbca898c1626edd5cd33308ed.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a list with the items 'Apples' and 'Bananas' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_icz1JvgarGNGn9uAMNUcGsNq\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"after\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ul\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"><\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"li\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Ap\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ples\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ul\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"><\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"li\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Ban\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"anas\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkCtFM7ednz07mzhelcCepGBnAH\",\"object\":\"chat.completion.chunk\",\"created\":1747168944,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_2f4aa2dfa4f6046506c9e133c5d60e76.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_2f4aa2dfa4f6046506c9e133c5d60e76.json new file mode 100644 index 0000000000..f269e90ae8 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_2f4aa2dfa4f6046506c9e133c5d60e76.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_VZ90dCVlAULnpCNdNyjPyb8h\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"after\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">You\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" look\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" great\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" today\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkBRu4aGmTlobvdKqFNWgu5749k\",\"object\":\"chat.completion.chunk\",\"created\":1747168943,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_7352df4919df344c441fb32b5cdae62b.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_7352df4919df344c441fb32b5cdae62b.json new file mode 100644 index 0000000000..235124ae1b --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_7352df4919df344c441fb32b5cdae62b.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      How are you?

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_7yLOWPOIWngAicMcakWV2ovt\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"before\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">You\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" look\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" great\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" today\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkA2CLPft6AWhk9D1ZHDCNMW2Y4\",\"object\":\"chat.completion.chunk\",\"created\":1747168942,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add and update paragraph_1_861b7da5f0734c4350466fb42da57dfe.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add and update paragraph_1_861b7da5f0734c4350466fb42da57dfe.json new file mode 100644 index 0000000000..6bd14bce6b --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add and update paragraph_1_861b7da5f0734c4350466fb42da57dfe.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate 'Hello, world' to dutch\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-04498315a0a04abd8e0ff31d9d75a154\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-e4cb5cfa4141454bafdcbb1318359b2c\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"add\\\", \\\"referenceId\\\": \\\"ref1$\\\", \\\"position\\\": \\\"after\\\", \\\"blocks\\\": [\\\"

      You look great today!

      \\\"]}, {\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref1$\\\", \\\"block\\\": \\\"

      Hallo, wereld!

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169520,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":66,\"prompt_tokens\":1122,\"total_tokens\":1188,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add paragraph and update selection_1_4821f5b399d9ebc5b564c530740345ea.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add paragraph and update selection_1_4821f5b399d9ebc5b564c530740345ea.json new file mode 100644 index 0000000000..317d9e9c18 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/add paragraph and update selection_1_4821f5b399d9ebc5b564c530740345ea.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a paragraph with the text 'You look great today!' at the beginning and translate selection to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-55175dc862504391922b714fa7d681d5\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-b8539321243a4ea3b548ce5a9a7ecc1b\",\"function\":{\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[]}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169522,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":23,\"prompt_tokens\":966,\"total_tokens\":989,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add and update paragraph_1_0d6f9f822d5ba2310e9cb3b5330d1ef0.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add and update paragraph_1_0d6f9f822d5ba2310e9cb3b5330d1ef0.json new file mode 100644 index 0000000000..ec15599ae2 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add and update paragraph_1_0d6f9f822d5ba2310e9cb3b5330d1ef0.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate 'Hello, world' to dutch\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-5aca0aea-cfd0-415a-81d3-acf8e63f425b\",\"object\":\"chat.completion\",\"created\":1747169009,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_w3yq\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHallo, wereld!\\u003c/p\\u003e\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"\\u003cp\\u003eYou look great today!\\u003c/p\\u003e\\\"]}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.095180028,\"prompt_tokens\":938,\"prompt_time\":0.144985184,\"completion_tokens\":57,\"completion_time\":0.207272727,\"total_tokens\":995,\"total_time\":0.352257911},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_2ddfbb0da0\",\"x_groq\":{\"id\":\"req_01jv5p6qbeezk92zvhw3g2kjkt\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add paragraph and update selection_1_0ca431ee9c56812e10198e60552a536f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add paragraph and update selection_1_0ca431ee9c56812e10198e60552a536f.json new file mode 100644 index 0000000000..bc9c2fbbea --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/add paragraph and update selection_1_0ca431ee9c56812e10198e60552a536f.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a paragraph with the text 'You look great today!' at the beginning and translate selection to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-7e664e25-d5ab-4d73-a5d9-3da9a6433017\",\"object\":\"chat.completion\",\"created\":1747169009,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_3aqh\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"add\\\", \\\"referenceId\\\": \\\"ref2$\\\", \\\"position\\\": \\\"before\\\", \\\"blocks\\\": [\\\"\\u003cp\\u003eYou look great today!\\u003c/p\\u003e\\\"]}, {\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"\\u003cp\\u003eHallo\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.095283385,\"prompt_tokens\":777,\"prompt_time\":0.085452833,\"completion_tokens\":66,\"completion_time\":0.24,\"total_tokens\":843,\"total_time\":0.325452833},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_2ddfbb0da0\",\"x_groq\":{\"id\":\"req_01jv5p6qtwe9gbp34zbggh2vsg\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add and update paragraph_1_96cb428c4df1b42645632abe5969170c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add and update paragraph_1_96cb428c4df1b42645632abe5969170c.json new file mode 100644 index 0000000000..71beddb6df --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add and update paragraph_1_96cb428c4df1b42645632abe5969170c.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate 'Hello, world' to dutch\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-4982a6cb-0bda-411f-8db8-a30df43ce4fc\",\"object\":\"chat.completion.chunk\",\"created\":1747168996,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p6b2ye9brr1fwmdmvx0yc\"}}\n\ndata: {\"id\":\"chatcmpl-4982a6cb-0bda-411f-8db8-a30df43ce4fc\",\"object\":\"chat.completion.chunk\",\"created\":1747168996,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_znd1\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHallo, wereld!\\u003c/p\\u003e\\\"},{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"\\u003cp\\u003eYou look great today!\\u003c/p\\u003e\\\"]}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-4982a6cb-0bda-411f-8db8-a30df43ce4fc\",\"object\":\"chat.completion.chunk\",\"created\":1747168996,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p6b2ye9brr1fwmdmvx0yc\",\"usage\":{\"queue_time\":0.095262266,\"prompt_tokens\":938,\"prompt_time\":0.06851764,\"completion_tokens\":57,\"completion_time\":0.207272727,\"total_tokens\":995,\"total_time\":0.275790367}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_04f9e76ff73eff953288564e5385dbd4.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_04f9e76ff73eff953288564e5385dbd4.json new file mode 100644 index 0000000000..b632a250a0 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/add paragraph and update selection_1_04f9e76ff73eff953288564e5385dbd4.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a paragraph with the text 'You look great today!' at the beginning and translate selection to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-63c1458d-36d5-4fc8-855f-4300bd557d4f\",\"object\":\"chat.completion.chunk\",\"created\":1747168996,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p6bfzezfadg89p8nwdhxh\"}}\n\ndata: {\"id\":\"chatcmpl-63c1458d-36d5-4fc8-855f-4300bd557d4f\",\"object\":\"chat.completion.chunk\",\"created\":1747168997,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_7wpc\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"add\\\", \\\"referenceId\\\": \\\"ref2$\\\", \\\"position\\\": \\\"before\\\", \\\"blocks\\\": [\\\"\\u003cp\\u003eYou look great today!\\u003c/p\\u003e\\\"]}, {\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"\\u003cp\\u003eHallo\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-63c1458d-36d5-4fc8-855f-4300bd557d4f\",\"object\":\"chat.completion.chunk\",\"created\":1747168997,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p6bfzezfadg89p8nwdhxh\",\"usage\":{\"queue_time\":0.102718631,\"prompt_tokens\":777,\"prompt_time\":0.054679916,\"completion_tokens\":66,\"completion_time\":0.24,\"total_tokens\":843,\"total_time\":0.294679916}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_80b906ff9d95e8b88b30c4efd246dc4b.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_80b906ff9d95e8b88b30c4efd246dc4b.json new file mode 100644 index 0000000000..0f47e96385 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_80b906ff9d95e8b88b30c4efd246dc4b.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate 'Hello, world' to dutch\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkpYMM1nMsikrn7HnRPBmj8Gnqd\",\n \"object\": \"chat.completion\",\n \"created\": 1747168983,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_VZimuoiEvIWkn1qorkSubsrn\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[\\\"

      You look great today!

      \\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hallo, wereld!

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 660,\n \"completion_tokens\": 56,\n \"total_tokens\": 716,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_90122d973c\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add paragraph and update selection_1_f5cd402d603bead3d759ebb5485f39c3.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add paragraph and update selection_1_f5cd402d603bead3d759ebb5485f39c3.json new file mode 100644 index 0000000000..66e7dfe4d6 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add paragraph and update selection_1_f5cd402d603bead3d759ebb5485f39c3.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a paragraph with the text 'You look great today!' at the beginning and translate selection to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkqkLBbb4NHx1Y5JgR257Olip9l\",\n \"object\": \"chat.completion\",\n \"created\": 1747168984,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_SrCj1m6a9VFzqvqWeji9X3TA\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[\\\"

      You look great today!

      \\\"]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hallo

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 503,\n \"completion_tokens\": 54,\n \"total_tokens\": 557,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_e0a277e6c9c61c532876788f8c914f42.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_e0a277e6c9c61c532876788f8c914f42.json new file mode 100644 index 0000000000..18c63ad343 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_e0a277e6c9c61c532876788f8c914f42.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate 'Hello, world' to dutch\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_KScszp6NkG8VbimroAdCYBEo\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"after\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">You\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" look\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" great\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" today\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hallo\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" wereld\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkSgNCqbK834RhFdbikYZ8Fskrq\",\"object\":\"chat.completion.chunk\",\"created\":1747168960,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_fc5837fa3ab53d1a511a8092a926d87d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_fc5837fa3ab53d1a511a8092a926d87d.json new file mode 100644 index 0000000000..28f01acfa1 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_fc5837fa3ab53d1a511a8092a926d87d.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a paragraph with the text 'You look great today!' at the beginning and translate selection to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_D3sfQ94TKdeWfmaks9ZihSUR\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"before\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">You\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" look\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" great\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" today\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hallo\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkTez3W6FUvtbUqGlaclGX6PgYI\",\"object\":\"chat.completion.chunk\",\"created\":1747168961,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/delete first block_1_ba835c26344e8e2082ee1f404bacb992.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/delete first block_1_ba835c26344e8e2082ee1f404bacb992.json new file mode 100644 index 0000000000..967c9a6bb9 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/delete first block_1_ba835c26344e8e2082ee1f404bacb992.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"delete the first paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-6e95944df4694ffd83bd7f60a5423896\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-7a7494fb32e64001abdf9dce8a1e4647\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"delete\\\", \\\"id\\\": \\\"ref1$\\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169519,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":19,\"prompt_tokens\":1099,\"total_tokens\":1118,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/delete first block_1_d857ced55373d86233599394800f1a63.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/delete first block_1_d857ced55373d86233599394800f1a63.json new file mode 100644 index 0000000000..2cea7a0168 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/delete first block_1_d857ced55373d86233599394800f1a63.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"delete the first paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-c50f8aa1-9bb9-46a5-914a-276baa4aa515\",\"object\":\"chat.completion\",\"created\":1747169008,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_20eb\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"delete\\\", \\\"id\\\": \\\"ref1$\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.31206105399999995,\"prompt_tokens\":915,\"prompt_time\":0.09898587,\"completion_tokens\":21,\"completion_time\":0.076363636,\"total_tokens\":936,\"total_time\":0.175349506},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_4e32347616\",\"x_groq\":{\"id\":\"req_01jv5p6ppqe0rr7z3nzg9p6cqj\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_f88ee2c9e0a85200bb5550e4502fc0e5.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_f88ee2c9e0a85200bb5550e4502fc0e5.json new file mode 100644 index 0000000000..2e86247e69 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/delete first block_1_f88ee2c9e0a85200bb5550e4502fc0e5.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"delete the first paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-43ab7b94-4a47-44f4-abcb-8f47a87734e8\",\"object\":\"chat.completion.chunk\",\"created\":1747168996,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_4e32347616\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p6af4e07tszdbw45zsfxa\"}}\n\ndata: {\"id\":\"chatcmpl-43ab7b94-4a47-44f4-abcb-8f47a87734e8\",\"object\":\"chat.completion.chunk\",\"created\":1747168996,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_4e32347616\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_vycn\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"delete\\\", \\\"id\\\": \\\"ref1$\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-43ab7b94-4a47-44f4-abcb-8f47a87734e8\",\"object\":\"chat.completion.chunk\",\"created\":1747168996,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_4e32347616\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p6af4e07tszdbw45zsfxa\",\"usage\":{\"queue_time\":0.40713977,\"prompt_tokens\":915,\"prompt_time\":0.10659224,\"completion_tokens\":21,\"completion_time\":0.076363636,\"total_tokens\":936,\"total_time\":0.182955876}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_c2ce81529453c6009b31fc3e2d3f8aea.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_c2ce81529453c6009b31fc3e2d3f8aea.json new file mode 100644 index 0000000000..71ffd40b88 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_c2ce81529453c6009b31fc3e2d3f8aea.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"delete the first paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkoGhA09lwtuyZ4R31tVrAOyrh9\",\n \"object\": \"chat.completion\",\n \"created\": 1747168982,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_mtcoiyjzKjRuuNqthHN5vYOt\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 637,\n \"completion_tokens\": 16,\n \"total_tokens\": 653,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_90f8de8d41648f556395ecf223aa0e6e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_90f8de8d41648f556395ecf223aa0e6e.json new file mode 100644 index 0000000000..f5c2b50565 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_90f8de8d41648f556395ecf223aa0e6e.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"delete the first paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_RyXPxmKY4ilDk85jm6wS5Dh8\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"delete\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRpToUaGuc5XkjjBjBp2Eyq3XQ\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/drop mark and link and change text within mark_1_953804d0569e88c225ebe8711ac1d209.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/drop mark and link and change text within mark_1_953804d0569e88c225ebe8711ac1d209.json new file mode 100644 index 0000000000..b1092ab011 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/drop mark and link and change text within mark_1_953804d0569e88c225ebe8711ac1d209.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-23329a619a1b4cf4bb8a7dd6e7b98dca\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-e05d4299f35a4753900d7a23503f8dcf\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref3$\\\", \\\"block\\\": \\\"

      Hi, world! Bold the text. Link.

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169513,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":37,\"prompt_tokens\":1118,\"total_tokens\":1155,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/drop mark and link_1_9cfdcdc629e0d2c8ba65e699037e007c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/drop mark and link_1_9cfdcdc629e0d2c8ba65e699037e007c.json new file mode 100644 index 0000000000..9715309252 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/drop mark and link_1_9cfdcdc629e0d2c8ba65e699037e007c.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-4e162f78556c4995941d2da8b04e19b8\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-db65e094fa75484c90dc41531bf7cb03\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref3$\\\", \\\"block\\\": \\\"

      Hello, world! Bold text. Link.

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169511,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":35,\"prompt_tokens\":1112,\"total_tokens\":1147,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/modify nested content_1_595e0413e677a7d0e1cf7024e2cdbf11.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/modify nested content_1_595e0413e677a7d0e1cf7024e2cdbf11.json new file mode 100644 index 0000000000..55cdcc2d49 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/modify nested content_1_595e0413e677a7d0e1cf7024e2cdbf11.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make apples uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-19a5730de5474dbaa293aed1b2ff6a28\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-cbaf0e88054c4dcabc4f5e542d0ffc02\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"

      APPLES

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169516,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":30,\"prompt_tokens\":1003,\"total_tokens\":1033,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/modify parent content_1_8a40e8e484dd5e6352b3019e81255567.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/modify parent content_1_8a40e8e484dd5e6352b3019e81255567.json new file mode 100644 index 0000000000..cff5286ef1 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/modify parent content_1_8a40e8e484dd5e6352b3019e81255567.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-2e5ceb9082bd40c79886466163a642f2\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-0d52782debac406585a3345f4c4c6056\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref1$\\\", \\\"block\\\": \\\"

      I NEED TO BUY:

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169517,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":31,\"prompt_tokens\":1005,\"total_tokens\":1036,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/plain source block, add mention_1_03e2c4dfae2ceb146b12fc9a266da98e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/plain source block, add mention_1_03e2c4dfae2ceb146b12fc9a266da98e.json new file mode 100644 index 0000000000..f3ae8335b4 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/plain source block, add mention_1_03e2c4dfae2ceb146b12fc9a266da98e.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-9515d6f8ab824a339bd9daec35700c66\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-9cef80f9065b4cb69952a5ac9d672c9f\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref1$\\\", \\\"block\\\": \\\"

      Hello, @Jane Doe!

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169507,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":50,\"prompt_tokens\":1110,\"total_tokens\":1160,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/standard update_1_f65e23072a2f6be046fc618e0dbf3949.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/standard update_1_f65e23072a2f6be046fc618e0dbf3949.json new file mode 100644 index 0000000000..5cafff6da9 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/standard update_1_f65e23072a2f6be046fc618e0dbf3949.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the first paragraph to german\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-1e4f12ee19344637abd4acb2e7ecd460\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-28d99cf7f55148feb52a5ff5e2987575\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref1$\\\", \\\"block\\\": \\\"

      Hallo, Welt!

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169491,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":31,\"prompt_tokens\":1101,\"total_tokens\":1132,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, remove mark_1_3e4d4d1ba3f4c2e80cb1d38f35425665.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, remove mark_1_3e4d4d1ba3f4c2e80cb1d38f35425665.json new file mode 100644 index 0000000000..418e7ffcca --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, remove mark_1_3e4d4d1ba3f4c2e80cb1d38f35425665.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the bold style from the second block\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-91dc37d2f7eb41cfb5ee4e39e69047ad\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-4a7d72d9194f4354b06b472730cade82\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169500,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":70,\"prompt_tokens\":1103,\"total_tokens\":1173,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, remove mention_1_7c0c0ebbf2e5eb36903b25d3e63f2a96.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, remove mention_1_7c0c0ebbf2e5eb36903b25d3e63f2a96.json new file mode 100644 index 0000000000..857bdf4b4a --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, remove mention_1_7c0c0ebbf2e5eb36903b25d3e63f2a96.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-b7631ae996f84bc7a3369082b578e8e3\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-a1e8711919754fc98f1b1cbabd47f531\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"

      Hello! How are you doing? How are you doing? This text is blue!

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169503,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":58,\"prompt_tokens\":1119,\"total_tokens\":1177,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, replace content_1_f8c8827fbecd6977bdb2e5152b493530.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, replace content_1_f8c8827fbecd6977bdb2e5152b493530.json new file mode 100644 index 0000000000..5faed790cc --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, replace content_1_f8c8827fbecd6977bdb2e5152b493530.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the content of the second block to 'Hello, updated content'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-ccbeb5fa764849ab90f6b1dcd1cc6689\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-1b6292feb2d9436c8f0ceb7ee0b695f0\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"

      Hello, updated content

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169496,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":31,\"prompt_tokens\":1109,\"total_tokens\":1140,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, update mention prop_1_f4e5d300be72cb5a6c2ef33c32ce7325.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, update mention prop_1_f4e5d300be72cb5a6c2ef33c32ce7325.json new file mode 100644 index 0000000000..91b934693f --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, update mention prop_1_f4e5d300be72cb5a6c2ef33c32ce7325.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the mention to Jane Doe\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-7253251a3083401a9edaa00688f6f4f9\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-5d368ca709624dbf8fb0d0a10b7c2392\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"

      Hello, @Jane Doe! How are you doing? This text is blue!

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169509,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":75,\"prompt_tokens\":1101,\"total_tokens\":1176,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, update text_1_388a274079ba06bcec0049a35278fc01.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, update text_1_388a274079ba06bcec0049a35278fc01.json new file mode 100644 index 0000000000..e9cc26a59f --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in source block, update text_1_388a274079ba06bcec0049a35278fc01.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the second block to german (use dir instead of Ihnen)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-7e85d108a02f4ee4b4d7ef5e0c1edc66\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-13a9b16e241d49e7803c220e657ade4a\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"

      Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169498,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":78,\"prompt_tokens\":1108,\"total_tokens\":1186,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_c7be52683c9d405365815f334ed1f4db.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_c7be52683c9d405365815f334ed1f4db.json new file mode 100644 index 0000000000..ea15e42acd --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_c7be52683c9d405365815f334ed1f4db.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make first paragraph bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-89fdf4bbe25c4c9e8fd828841eacc3d3\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-7862fea5749e40fdaad935f2180d60bd\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref1$\\\", \\\"block\\\": \\\"

      Hello, world!

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169506,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":34,\"prompt_tokens\":1099,\"total_tokens\":1133,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in target block, add mark (word)_1_9bc0da43041ca4b3a188fbdfd9562bae.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in target block, add mark (word)_1_9bc0da43041ca4b3a188fbdfd9562bae.json new file mode 100644 index 0000000000..5d8d306514 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/styles + ic in target block, add mark (word)_1_9bc0da43041ca4b3a188fbdfd9562bae.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make 'world!' (in the first block) bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-e99ffb2f99eb4f24a443a8b20496860f\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-d25c041b38994cb9b3d56bc23629f15a\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref1$\\\", \\\"block\\\": \\\"

      Hello, world!

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169505,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":30,\"prompt_tokens\":1106,\"total_tokens\":1136,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/translate selection_1_6f0c6d98d9a99081b01869826a538c74.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/translate selection_1_6f0c6d98d9a99081b01869826a538c74.json new file mode 100644 index 0000000000..730345d5f9 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/translate selection_1_6f0c6d98d9a99081b01869826a538c74.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-87ff736c96224847bb92adb7d75d8db7\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-da32c8d852904db8bdcbe44d164ecba2\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"

      Hallo

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169492,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":29,\"prompt_tokens\":949,\"total_tokens\":978,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/turn paragraphs into list_1_122467a8b6979ad2a47b0417976218a9.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/turn paragraphs into list_1_122467a8b6979ad2a47b0417976218a9.json new file mode 100644 index 0000000000..3ea315e201 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/turn paragraphs into list_1_122467a8b6979ad2a47b0417976218a9.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Bananas

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"block\\\":\\\"

      Apples

      \\\"},{\\\"block\\\":\\\"

      Bananas

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"turn into list (update existing blocks)\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-16da6d56786d46e09263a10129687cee\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-790acab9e86948bf98cdcbdf3f6b7cc7\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"
      • Apples
      \\\"}, {\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref3$\\\", \\\"block\\\": \\\"
      • Bananas
      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169514,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":63,\"prompt_tokens\":895,\"total_tokens\":958,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/update block type and content_1_ace9cde890d5c4b2a131f8867e7b5596.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/update block type and content_1_ace9cde890d5c4b2a131f8867e7b5596.json new file mode 100644 index 0000000000..c8d4487c8b --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/update block type and content_1_ace9cde890d5c4b2a131f8867e7b5596.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-faa04a4cea4e426e8fe183a632f52a16\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-1d3587ec34c54fe0bf3d13ceabb897e6\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref1$\\\", \\\"block\\\": \\\"

      What's up, world!

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169495,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":35,\"prompt_tokens\":1113,\"total_tokens\":1148,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/update block type_1_d356646093fb778e9c8bce47f7133ef8.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/update block type_1_d356646093fb778e9c8bce47f7133ef8.json new file mode 100644 index 0000000000..9806bd84b9 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/albert-etalab.chat/neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8 (non-streaming)/update block type_1_d356646093fb778e9c8bce47f7133ef8.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=albert-etalab&url=https%3A%2F%2Falbert.api.etalab.gouv.fr%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-68c728cd49c44c3585631d01dd67b7ed\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"\",\"refusal\":null,\"role\":\"assistant\",\"audio\":null,\"function_call\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-3f206627165b4fe79aa3a1b981d98710\",\"function\":{\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref1$\\\", \\\"block\\\": \\\"

      Hello, world!

      \\\"}]}\",\"name\":\"json\"},\"type\":\"function\"}],\"reasoning_content\":null},\"stop_reason\":null}],\"created\":1747169494,\"model\":\"neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8\",\"object\":\"chat.completion\",\"service_tier\":null,\"system_fingerprint\":null,\"usage\":{\"completion_tokens\":32,\"prompt_tokens\":1101,\"total_tokens\":1133,\"completion_tokens_details\":null,\"prompt_tokens_details\":null},\"search_results\":[],\"prompt_logprobs\":null}", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/drop mark and link and change text within mark_1_6b9ad94993b0b3dc39ee8fab8057b967.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/drop mark and link and change text within mark_1_6b9ad94993b0b3dc39ee8fab8057b967.json new file mode 100644 index 0000000000..475baeca5f --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/drop mark and link and change text within mark_1_6b9ad94993b0b3dc39ee8fab8057b967.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-49d17c3f-c752-4ab3-aa97-b9b565f2a44c\",\"object\":\"chat.completion\",\"created\":1747169007,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_06k2\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHi, world! Bold the text. Link.\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.098364483,\"prompt_tokens\":934,\"prompt_time\":0.082554559,\"completion_tokens\":35,\"completion_time\":0.127272727,\"total_tokens\":969,\"total_time\":0.209827286},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_9a8b91ba77\",\"x_groq\":{\"id\":\"req_01jv5p6na0e9f896v32fddvnq4\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/drop mark and link_1_bde418f70f7c93522d3cff713cb6e8b2.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/drop mark and link_1_bde418f70f7c93522d3cff713cb6e8b2.json new file mode 100644 index 0000000000..a6193f0066 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/drop mark and link_1_bde418f70f7c93522d3cff713cb6e8b2.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-5546de96-5f09-487c-a57b-c7a497a25f2c\",\"object\":\"chat.completion\",\"created\":1747169006,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_6dmy\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref3$\\\", \\\"block\\\": \\\"\\u003cp\\u003eHello, world! Bold text. Link.\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.09561196400000002,\"prompt_tokens\":928,\"prompt_time\":0.158490536,\"completion_tokens\":37,\"completion_time\":0.134545455,\"total_tokens\":965,\"total_time\":0.293035991},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_3f3b593e33\",\"x_groq\":{\"id\":\"req_01jv5p6mv2ezjts25tpbcs8y9c\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify nested content_1_6d6efada9f514cd6b5d479b784960905.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify nested content_1_6d6efada9f514cd6b5d479b784960905.json new file mode 100644 index 0000000000..f40bf03473 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify nested content_1_6d6efada9f514cd6b5d479b784960905.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make apples uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-ddbed522-7b09-403f-96c4-95b07ffe7596\",\"object\":\"chat.completion\",\"created\":1747169007,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_9dwb\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"\\u003cp\\u003eAPPLES\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.094470532,\"prompt_tokens\":819,\"prompt_time\":0.081647207,\"completion_tokens\":28,\"completion_time\":0.101818182,\"total_tokens\":847,\"total_time\":0.183465389},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_2ddfbb0da0\",\"x_groq\":{\"id\":\"req_01jv5p6p2se0rr4a2dpw46na3n\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify parent content_1_0b00b5e42872d9f249427436ed23ca40.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify parent content_1_0b00b5e42872d9f249427436ed23ca40.json new file mode 100644 index 0000000000..81357e3b2c --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/modify parent content_1_0b00b5e42872d9f249427436ed23ca40.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-02724330-1565-430e-9896-dc18c977315b\",\"object\":\"chat.completion\",\"created\":1747169008,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_64qc\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref1$\\\", \\\"block\\\": \\\"\\u003cp\\u003eI NEED TO BUY:\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.101928613,\"prompt_tokens\":821,\"prompt_time\":0.053447976,\"completion_tokens\":33,\"completion_time\":0.12,\"total_tokens\":854,\"total_time\":0.173447976},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_3f3b593e33\",\"x_groq\":{\"id\":\"req_01jv5p6pcse9fsnjerjck51cr3\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/plain source block, add mention_1_a0f2a68ef2f46c1a3c014966a1d41463.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/plain source block, add mention_1_a0f2a68ef2f46c1a3c014966a1d41463.json new file mode 100644 index 0000000000..7966646c13 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/plain source block, add mention_1_a0f2a68ef2f46c1a3c014966a1d41463.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-a5138477-f8e6-473f-ace6-4c909773ee5a\",\"object\":\"chat.completion\",\"created\":1747169005,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_yd3a\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHello, \\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"Jane Doe\\\\\\\"\\u003e@Jane Doe\\u003c/span\\u003e!\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.09500302299999999,\"prompt_tokens\":926,\"prompt_time\":0.070934364,\"completion_tokens\":48,\"completion_time\":0.174545455,\"total_tokens\":974,\"total_time\":0.245479819},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_9a8b91ba77\",\"x_groq\":{\"id\":\"req_01jv5p6m00e0nv5kz1w1dj2zkz\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/standard update_1_69863686209bcd70d5d432c6c5646ec6.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/standard update_1_69863686209bcd70d5d432c6c5646ec6.json new file mode 100644 index 0000000000..ebb31cedb7 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/standard update_1_69863686209bcd70d5d432c6c5646ec6.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the first paragraph to german\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-7f0824e4-e27d-472f-8239-3f34f8b231c3\",\"object\":\"chat.completion\",\"created\":1747168999,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_xsq6\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref1$\\\", \\\"block\\\": \\\"\\u003cp\\u003eHallo, Welt!\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.09570181099999997,\"prompt_tokens\":917,\"prompt_time\":0.373198536,\"completion_tokens\":33,\"completion_time\":0.12,\"total_tokens\":950,\"total_time\":0.493198536},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_3f3b593e33\",\"x_groq\":{\"id\":\"req_01jv5p6dpxe9crjg90590txymj\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mark_1_26a2249225e49ac962f2ffc4d186f048.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mark_1_26a2249225e49ac962f2ffc4d186f048.json new file mode 100644 index 0000000000..c2ff4c5835 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mark_1_26a2249225e49ac962f2ffc4d186f048.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the bold style from the second block\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-8aef3ca2-219f-478d-b598-3de4c4ff3f21\",\"object\":\"chat.completion\",\"created\":1747169004,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_svjp\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"\\u003cp\\u003eHello, \\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"John Doe\\\\\\\"\\u003e@John Doe\\u003c/span\\u003e! How are you doing? \\u003cspan data-text-color=\\\\\\\"blue\\\\\\\"\\u003eThis text is blue!\\u003c/span\\u003e\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.870878699,\"prompt_tokens\":919,\"prompt_time\":0.100599248,\"completion_tokens\":72,\"completion_time\":0.261818182,\"total_tokens\":991,\"total_time\":0.36241743},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_4e32347616\",\"x_groq\":{\"id\":\"req_01jv5p6hq4ezh93zz25mz9ar6e\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mention_1_8a9dfa091990b0ea68d8b5e600e5ded4.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mention_1_8a9dfa091990b0ea68d8b5e600e5ded4.json new file mode 100644 index 0000000000..0e0b0ce73e --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, remove mention_1_8a9dfa091990b0ea68d8b5e600e5ded4.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-e7ae62ba-bed9-4f36-9354-4475541ec411\",\"object\":\"chat.completion\",\"created\":1747169004,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_sgnj\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHello! \\u003cstrong\\u003eHow are you doing?\\u003c/strong\\u003e \\u003cspan data-text-color=\\\\\\\"blue\\\\\\\"\\u003eThis text is blue!\\u003c/span\\u003e\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.09507396900000001,\"prompt_tokens\":935,\"prompt_time\":0.067631896,\"completion_tokens\":51,\"completion_time\":0.185454545,\"total_tokens\":986,\"total_time\":0.253086441},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_2ddfbb0da0\",\"x_groq\":{\"id\":\"req_01jv5p6jz5e0jrq276bydfy1nh\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, replace content_1_b5da218448fab4a6144aee7b49fe7cfd.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, replace content_1_b5da218448fab4a6144aee7b49fe7cfd.json new file mode 100644 index 0000000000..79a819f365 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, replace content_1_b5da218448fab4a6144aee7b49fe7cfd.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the content of the second block to 'Hello, updated content'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-5f78e6de-7f02-4294-9235-e2742e41be8e\",\"object\":\"chat.completion\",\"created\":1747169002,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_6y3c\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHello, updated content\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.10164246599999999,\"prompt_tokens\":925,\"prompt_time\":0.225538069,\"completion_tokens\":29,\"completion_time\":0.105454545,\"total_tokens\":954,\"total_time\":0.330992614},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_2ddfbb0da0\",\"x_groq\":{\"id\":\"req_01jv5p6gn4e0e9gzttg9ydhfs3\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update mention prop_1_93cd31cde8f8a9d7bcc6ec163bd82e32.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update mention prop_1_93cd31cde8f8a9d7bcc6ec163bd82e32.json new file mode 100644 index 0000000000..8858ad2826 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update mention prop_1_93cd31cde8f8a9d7bcc6ec163bd82e32.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the mention to Jane Doe\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-f5984d68-5cdf-49c1-b743-7be9fcfb0cf3\",\"object\":\"chat.completion\",\"created\":1747169006,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_mbhr\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHello, \\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"Jane Doe\\\\\\\"\\u003e@Jane Doe\\u003c/span\\u003e! \\u003cstrong\\u003eHow are you doing?\\u003c/strong\\u003e \\u003cspan data-text-color=\\\\\\\"blue\\\\\\\"\\u003eThis text is blue!\\u003c/span\\u003e\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.09555989399999999,\"prompt_tokens\":917,\"prompt_time\":0.076064445,\"completion_tokens\":73,\"completion_time\":0.265454545,\"total_tokens\":990,\"total_time\":0.34151899},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_9a8b91ba77\",\"x_groq\":{\"id\":\"req_01jv5p6mbze0pbz2chy18hqkjc\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update text_1_98388769d4b6c534a448363e38006369.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update text_1_98388769d4b6c534a448363e38006369.json new file mode 100644 index 0000000000..cfcdc7e8d8 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in source block, update text_1_98388769d4b6c534a448363e38006369.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the second block to german (use dir instead of Ihnen)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-e4d0b660-4651-47f1-8686-3220911c5bd4\",\"object\":\"chat.completion\",\"created\":1747169002,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_nn1n\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"\\u003cp\\u003eHallo, \\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"John Doe\\\\\\\"\\u003e@John Doe\\u003c/span\\u003e! \\u003cstrong\\u003eWie geht es dir?\\u003c/strong\\u003e \\u003cspan data-text-color=\\\\\\\"blue\\\\\\\"\\u003eDieser Text ist blau!\\u003c/span\\u003e\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.09532773400000001,\"prompt_tokens\":924,\"prompt_time\":0.070841634,\"completion_tokens\":80,\"completion_time\":0.290909091,\"total_tokens\":1004,\"total_time\":0.361750725},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_9a8b91ba77\",\"x_groq\":{\"id\":\"req_01jv5p6h79e0ertx4vk7m46cab\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in target block, add mark (paragraph)_1_039df897cf40b1464a3e77597698630f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in target block, add mark (paragraph)_1_039df897cf40b1464a3e77597698630f.json new file mode 100644 index 0000000000..3163527f61 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in target block, add mark (paragraph)_1_039df897cf40b1464a3e77597698630f.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make first paragraph bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-6a4ecc21-976b-4644-a81f-e43271fc6f93\",\"object\":\"chat.completion\",\"created\":1747169005,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_0mrh\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\u003cp\\u003e\\u003cstrong\\u003eHello, world!\\u003c/strong\\u003e\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.09545125399999999,\"prompt_tokens\":915,\"prompt_time\":0.066395385,\"completion_tokens\":32,\"completion_time\":0.116363636,\"total_tokens\":947,\"total_time\":0.182759021},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_3f3b593e33\",\"x_groq\":{\"id\":\"req_01jv5p6knre0mvnnccs4xk7n5d\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in target block, add mark (word)_1_ecfba97d707a7df556c8be55a94491bd.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in target block, add mark (word)_1_ecfba97d707a7df556c8be55a94491bd.json new file mode 100644 index 0000000000..c584ed303d --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/styles + ic in target block, add mark (word)_1_ecfba97d707a7df556c8be55a94491bd.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make 'world!' (in the first block) bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-6c5ce929-b040-4c8d-8d55-36d7b92799e2\",\"object\":\"chat.completion\",\"created\":1747169005,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_3p7j\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHello, \\u003cstrong\\u003eworld!\\u003c/strong\\u003e\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.09504306700000001,\"prompt_tokens\":922,\"prompt_time\":0.067196003,\"completion_tokens\":33,\"completion_time\":0.120556483,\"total_tokens\":955,\"total_time\":0.187752486},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_2ddfbb0da0\",\"x_groq\":{\"id\":\"req_01jv5p6kbhe9dsf7scbgq4ce8c\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/translate selection_1_674d4ec4b8af2ac528ec90892731f67a.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/translate selection_1_674d4ec4b8af2ac528ec90892731f67a.json new file mode 100644 index 0000000000..bc23cca4c5 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/translate selection_1_674d4ec4b8af2ac528ec90892731f67a.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-03aed7cc-1d95-4570-9f50-b94ef0f78a7b\",\"object\":\"chat.completion\",\"created\":1747169001,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_mcxr\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"\\u003cp\\u003eHallo\\u003c/p\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":1.270603073,\"prompt_tokens\":760,\"prompt_time\":0.100671792,\"completion_tokens\":31,\"completion_time\":0.112727273,\"total_tokens\":791,\"total_time\":0.213399065},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_fcc3b74982\",\"x_groq\":{\"id\":\"req_01jv5p6eaqe9csfv7t5n67jsza\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/turn paragraphs into list_1_1ec910c96203d1d86b7dcce97e352e91.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/turn paragraphs into list_1_1ec910c96203d1d86b7dcce97e352e91.json new file mode 100644 index 0000000000..11975b5efc --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/turn paragraphs into list_1_1ec910c96203d1d86b7dcce97e352e91.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Bananas

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"block\\\":\\\"

      Apples

      \\\"},{\\\"block\\\":\\\"

      Bananas

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"turn into list (update existing blocks)\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-29f6b203-42d6-4182-84e8-c6141b39a9bc\",\"object\":\"chat.completion\",\"created\":1747169007,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_bqsm\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"\\u003cul\\u003e\\u003cli\\u003eApples\\u003c/li\\u003e\\u003c/ul\\u003e\\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"\\u003cul\\u003e\\u003cli\\u003eBananas\\u003c/li\\u003e\\u003c/ul\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.11009905499999999,\"prompt_tokens\":706,\"prompt_time\":0.052804217,\"completion_tokens\":57,\"completion_time\":0.207272727,\"total_tokens\":763,\"total_time\":0.260076944},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_9a8b91ba77\",\"x_groq\":{\"id\":\"req_01jv5p6nnbe0racwjrzc9f952a\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type and content_1_56b6b0d7b3b4585a4ca5598979ccc319.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type and content_1_56b6b0d7b3b4585a4ca5598979ccc319.json new file mode 100644 index 0000000000..11210369af --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type and content_1_56b6b0d7b3b4585a4ca5598979ccc319.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-ac2e1ad1-4bd6-4e46-83c7-9c34c959c2d2\",\"object\":\"chat.completion\",\"created\":1747169001,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_3ymh\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\u003ch1\\u003eWhat's up, world!\\u003c/h1\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.107864571,\"prompt_tokens\":929,\"prompt_time\":0.094435472,\"completion_tokens\":33,\"completion_time\":0.12,\"total_tokens\":962,\"total_time\":0.214435472},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_3f3b593e33\",\"x_groq\":{\"id\":\"req_01jv5p6g87e0e9h8ejew4tr0fg\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type_1_cec06b764f3e6538c0a0baeb04d60587.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type_1_cec06b764f3e6538c0a0baeb04d60587.json new file mode 100644 index 0000000000..e75057e091 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (non-streaming)/update block type_1_cec06b764f3e6538c0a0baeb04d60587.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\"id\":\"chatcmpl-d380c74a-ca54-4f25-86d8-438b7a1d8080\",\"object\":\"chat.completion\",\"created\":1747169001,\"model\":\"llama-3.3-70b-versatile\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"tool_calls\":[{\"id\":\"call_ppa8\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\u003ch1\\u003eHello, world!\\u003c/h1\\u003e\\\"}]}\"}}]},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":{\"queue_time\":0.11170175899999998,\"prompt_tokens\":917,\"prompt_time\":0.170071797,\"completion_tokens\":30,\"completion_time\":0.109090909,\"total_tokens\":947,\"total_time\":0.279162706},\"usage_breakdown\":{\"models\":null},\"system_fingerprint\":\"fp_3f3b593e33\",\"x_groq\":{\"id\":\"req_01jv5p6ftjezhbw4ay2a9b9x8b\"}}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link and change text within mark_1_60a05ae4a6b034fe6eaafb2b7bfb9638.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link and change text within mark_1_60a05ae4a6b034fe6eaafb2b7bfb9638.json new file mode 100644 index 0000000000..0985195d1e --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link and change text within mark_1_60a05ae4a6b034fe6eaafb2b7bfb9638.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-b8579ec0-b884-43ab-a371-cabaeab0f6bc\",\"object\":\"chat.completion.chunk\",\"created\":1747168994,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p692ge04ab5wby5qh1fxx\"}}\n\ndata: {\"id\":\"chatcmpl-b8579ec0-b884-43ab-a371-cabaeab0f6bc\",\"object\":\"chat.completion.chunk\",\"created\":1747168994,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_qahe\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHi, world! Bold the text. Link.\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-b8579ec0-b884-43ab-a371-cabaeab0f6bc\",\"object\":\"chat.completion.chunk\",\"created\":1747168994,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p692ge04ab5wby5qh1fxx\",\"usage\":{\"queue_time\":0.094737869,\"prompt_tokens\":934,\"prompt_time\":0.07943074,\"completion_tokens\":35,\"completion_time\":0.127272727,\"total_tokens\":969,\"total_time\":0.206703467}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link_1_df81f4ea9e9cda25c1ef6b1d0de62e6e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link_1_df81f4ea9e9cda25c1ef6b1d0de62e6e.json new file mode 100644 index 0000000000..0237042346 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/drop mark and link_1_df81f4ea9e9cda25c1ef6b1d0de62e6e.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-0f12f646-ec0c-4023-9681-ad70b4f957f1\",\"object\":\"chat.completion.chunk\",\"created\":1747168994,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p68qwezds9mj1z6y1scch\"}}\n\ndata: {\"id\":\"chatcmpl-0f12f646-ec0c-4023-9681-ad70b4f957f1\",\"object\":\"chat.completion.chunk\",\"created\":1747168994,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_hrpq\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref3$\\\", \\\"block\\\": \\\"\\u003cp\\u003eHello, world! Bold text. Link.\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-0f12f646-ec0c-4023-9681-ad70b4f957f1\",\"object\":\"chat.completion.chunk\",\"created\":1747168994,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p68qwezds9mj1z6y1scch\",\"usage\":{\"queue_time\":0.095316706,\"prompt_tokens\":928,\"prompt_time\":0.072032452,\"completion_tokens\":37,\"completion_time\":0.134545455,\"total_tokens\":965,\"total_time\":0.206577907}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify nested content_1_c473102de44b6890149109c418f224a7.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify nested content_1_c473102de44b6890149109c418f224a7.json new file mode 100644 index 0000000000..3e3c1faea7 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify nested content_1_c473102de44b6890149109c418f224a7.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make apples uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-8c7ffe38-ffd7-4332-8f63-bfad4446d7b8\",\"object\":\"chat.completion.chunk\",\"created\":1747168995,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p69tse9asrznvk7h8tpg9\"}}\n\ndata: {\"id\":\"chatcmpl-8c7ffe38-ffd7-4332-8f63-bfad4446d7b8\",\"object\":\"chat.completion.chunk\",\"created\":1747168995,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_eqp6\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"\\u003cp\\u003eAPPLES\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-8c7ffe38-ffd7-4332-8f63-bfad4446d7b8\",\"object\":\"chat.completion.chunk\",\"created\":1747168995,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p69tse9asrznvk7h8tpg9\",\"usage\":{\"queue_time\":0.094981271,\"prompt_tokens\":819,\"prompt_time\":0.075476925,\"completion_tokens\":32,\"completion_time\":0.116363636,\"total_tokens\":851,\"total_time\":0.191840561}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify parent content_1_c8cc1e445e2ea3a61af98fae49719bb2.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify parent content_1_c8cc1e445e2ea3a61af98fae49719bb2.json new file mode 100644 index 0000000000..8ec9fca967 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/modify parent content_1_c8cc1e445e2ea3a61af98fae49719bb2.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-9e394fd0-a3eb-4347-bdf2-c9fde5aea778\",\"object\":\"chat.completion.chunk\",\"created\":1747168995,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p6a4ye069h4q24zswf3e9\"}}\n\ndata: {\"id\":\"chatcmpl-9e394fd0-a3eb-4347-bdf2-c9fde5aea778\",\"object\":\"chat.completion.chunk\",\"created\":1747168995,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_89h7\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\u003cp\\u003eI NEED TO BUY:\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-9e394fd0-a3eb-4347-bdf2-c9fde5aea778\",\"object\":\"chat.completion.chunk\",\"created\":1747168995,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p6a4ye069h4q24zswf3e9\",\"usage\":{\"queue_time\":0.09492940100000001,\"prompt_tokens\":821,\"prompt_time\":0.0685514,\"completion_tokens\":29,\"completion_time\":0.121086512,\"total_tokens\":850,\"total_time\":0.189637912}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/plain source block, add mention_1_e6db90ec1ad4b48b7e225a5ef7b7ea08.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/plain source block, add mention_1_e6db90ec1ad4b48b7e225a5ef7b7ea08.json new file mode 100644 index 0000000000..fc6c07f865 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/plain source block, add mention_1_e6db90ec1ad4b48b7e225a5ef7b7ea08.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-11ea6475-2176-4403-9491-dada8d5b4f44\",\"object\":\"chat.completion.chunk\",\"created\":1747168993,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p67tte03ara9gjxpe6p3z\"}}\n\ndata: {\"id\":\"chatcmpl-11ea6475-2176-4403-9491-dada8d5b4f44\",\"object\":\"chat.completion.chunk\",\"created\":1747168993,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_6h7t\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHello, \\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"Jane Doe\\\\\\\"\\u003e@Jane Doe\\u003c/span\\u003e!\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-11ea6475-2176-4403-9491-dada8d5b4f44\",\"object\":\"chat.completion.chunk\",\"created\":1747168993,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p67tte03ara9gjxpe6p3z\",\"usage\":{\"queue_time\":0.09443048300000001,\"prompt_tokens\":926,\"prompt_time\":0.12522345,\"completion_tokens\":48,\"completion_time\":0.174545455,\"total_tokens\":974,\"total_time\":0.299768905}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_afb308d981984d812bf89191d498ddac.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_afb308d981984d812bf89191d498ddac.json new file mode 100644 index 0000000000..e060c6876e --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/standard update_1_afb308d981984d812bf89191d498ddac.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the first paragraph to german\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-28d002e2-5dc5-45c9-9d7c-4d4181b85809\",\"object\":\"chat.completion.chunk\",\"created\":1747168987,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p620vez8shnsresbz0n0h\"}}\n\ndata: {\"id\":\"chatcmpl-28d002e2-5dc5-45c9-9d7c-4d4181b85809\",\"object\":\"chat.completion.chunk\",\"created\":1747168987,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_0vgk\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref1$\\\", \\\"block\\\": \\\"\\u003cp\\u003eHallo, Welt!\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-28d002e2-5dc5-45c9-9d7c-4d4181b85809\",\"object\":\"chat.completion.chunk\",\"created\":1747168987,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p620vez8shnsresbz0n0h\",\"usage\":{\"queue_time\":0.10461503899999999,\"prompt_tokens\":917,\"prompt_time\":0.066683093,\"completion_tokens\":33,\"completion_time\":0.12,\"total_tokens\":950,\"total_time\":0.186683093}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mark_1_7d6962e90a2fb300f8efab2620d77389.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mark_1_7d6962e90a2fb300f8efab2620d77389.json new file mode 100644 index 0000000000..f2b181e61d --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mark_1_7d6962e90a2fb300f8efab2620d77389.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the bold style from the second block\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-c10bc875-0b26-4aab-b05a-04646472a33d\",\"object\":\"chat.completion.chunk\",\"created\":1747168989,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p647ce9997axb7wdgaqk5\"}}\n\ndata: {\"id\":\"chatcmpl-c10bc875-0b26-4aab-b05a-04646472a33d\",\"object\":\"chat.completion.chunk\",\"created\":1747168989,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_9rz7\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHello, \\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"John Doe\\\\\\\"\\u003e@John Doe\\u003c/span\\u003e! How are you doing? \\u003cspan data-text-color=\\\\\\\"blue\\\\\\\"\\u003eThis text is blue!\\u003c/span\\u003e\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-c10bc875-0b26-4aab-b05a-04646472a33d\",\"object\":\"chat.completion.chunk\",\"created\":1747168989,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p647ce9997axb7wdgaqk5\",\"usage\":{\"queue_time\":0.095037715,\"prompt_tokens\":919,\"prompt_time\":0.067275524,\"completion_tokens\":68,\"completion_time\":0.247272727,\"total_tokens\":987,\"total_time\":0.314548251}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mention_1_a13d0c4ae92fddfbcbef8c619c092951.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mention_1_a13d0c4ae92fddfbcbef8c619c092951.json new file mode 100644 index 0000000000..47ec892794 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, remove mention_1_a13d0c4ae92fddfbcbef8c619c092951.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-f2a2e28c-cd6d-4680-9d80-8057cfa97670\",\"object\":\"chat.completion.chunk\",\"created\":1747168989,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p64nqe00bbm4ytnqbtkhe\"}}\n\ndata: {\"id\":\"chatcmpl-f2a2e28c-cd6d-4680-9d80-8057cfa97670\",\"object\":\"chat.completion.chunk\",\"created\":1747168991,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_sa63\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"\\u003cp\\u003eHello! \\u003cstrong\\u003eHow are you doing?\\u003c/strong\\u003e \\u003cspan data-text-color=\\\\\\\"blue\\\\\\\"\\u003eThis text is blue!\\u003c/span\\u003e\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-f2a2e28c-cd6d-4680-9d80-8057cfa97670\",\"object\":\"chat.completion.chunk\",\"created\":1747168991,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p64nqe00bbm4ytnqbtkhe\",\"usage\":{\"queue_time\":0.09508124200000001,\"prompt_tokens\":935,\"prompt_time\":0.807303716,\"completion_tokens\":55,\"completion_time\":0.517512297,\"total_tokens\":990,\"total_time\":1.324816013}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, replace content_1_8d4842fb70ad278064faa2c3c6efa73e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, replace content_1_8d4842fb70ad278064faa2c3c6efa73e.json new file mode 100644 index 0000000000..25a0b8e187 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, replace content_1_8d4842fb70ad278064faa2c3c6efa73e.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the content of the second block to 'Hello, updated content'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-b82a1733-8872-4694-87c2-90c42a139008\",\"object\":\"chat.completion.chunk\",\"created\":1747168988,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p63dxez99mdvbtnw0rhdn\"}}\n\ndata: {\"id\":\"chatcmpl-b82a1733-8872-4694-87c2-90c42a139008\",\"object\":\"chat.completion.chunk\",\"created\":1747168988,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_vkq0\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHello, updated content\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-b82a1733-8872-4694-87c2-90c42a139008\",\"object\":\"chat.completion.chunk\",\"created\":1747168988,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p63dxez99mdvbtnw0rhdn\",\"usage\":{\"queue_time\":0.095449962,\"prompt_tokens\":925,\"prompt_time\":0.067087974,\"completion_tokens\":29,\"completion_time\":0.105454545,\"total_tokens\":954,\"total_time\":0.172542519}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update mention prop_1_70a3e6c68033303f4dce207ea802bba9.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update mention prop_1_70a3e6c68033303f4dce207ea802bba9.json new file mode 100644 index 0000000000..e84a4645c6 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update mention prop_1_70a3e6c68033303f4dce207ea802bba9.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the mention to Jane Doe\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-2ab1f8f8-c0e3-4392-9b46-926deae0bbea\",\"object\":\"chat.completion.chunk\",\"created\":1747168993,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p688pe9ar5pfn8e1gy2x7\"}}\n\ndata: {\"id\":\"chatcmpl-2ab1f8f8-c0e3-4392-9b46-926deae0bbea\",\"object\":\"chat.completion.chunk\",\"created\":1747168993,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_kh6g\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHello, \\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"Jane Doe\\\\\\\"\\u003e@Jane Doe\\u003c/span\\u003e! \\u003cstrong\\u003eHow are you doing?\\u003c/strong\\u003e \\u003cspan data-text-color=\\\\\\\"blue\\\\\\\"\\u003eThis text is blue!\\u003c/span\\u003e\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-2ab1f8f8-c0e3-4392-9b46-926deae0bbea\",\"object\":\"chat.completion.chunk\",\"created\":1747168993,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p688pe9ar5pfn8e1gy2x7\",\"usage\":{\"queue_time\":0.095318089,\"prompt_tokens\":917,\"prompt_time\":0.083429069,\"completion_tokens\":73,\"completion_time\":0.265454545,\"total_tokens\":990,\"total_time\":0.348883614}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update text_1_3f639531f292bf1edb20bbb65c6ad0e0.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update text_1_3f639531f292bf1edb20bbb65c6ad0e0.json new file mode 100644 index 0000000000..9e5ff4618a --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in source block, update text_1_3f639531f292bf1edb20bbb65c6ad0e0.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the second block to german (use dir instead of Ihnen)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-e6d9a7f3-1e40-4baa-9a9d-4143dd7cdf1d\",\"object\":\"chat.completion.chunk\",\"created\":1747168989,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p63qkfzya38eehxgrc4sy\"}}\n\ndata: {\"id\":\"chatcmpl-e6d9a7f3-1e40-4baa-9a9d-4143dd7cdf1d\",\"object\":\"chat.completion.chunk\",\"created\":1747168989,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_htsn\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"\\u003cp\\u003eHallo, \\u003cspan data-inline-content-type=\\\\\\\"mention\\\\\\\" data-user=\\\\\\\"John Doe\\\\\\\"\\u003e@John Doe\\u003c/span\\u003e! \\u003cstrong\\u003eWie geht es dir?\\u003c/strong\\u003e \\u003cspan data-text-color=\\\\\\\"blue\\\\\\\"\\u003eDieser Text ist blau!\\u003c/span\\u003e\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-e6d9a7f3-1e40-4baa-9a9d-4143dd7cdf1d\",\"object\":\"chat.completion.chunk\",\"created\":1747168989,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p63qkfzya38eehxgrc4sy\",\"usage\":{\"queue_time\":0.095162129,\"prompt_tokens\":924,\"prompt_time\":0.066936286,\"completion_tokens\":80,\"completion_time\":0.290909091,\"total_tokens\":1004,\"total_time\":0.357845377}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (paragraph)_1_ca41f979b0669b1a9285363b55a53b23.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (paragraph)_1_ca41f979b0669b1a9285363b55a53b23.json new file mode 100644 index 0000000000..b66bbe04c2 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (paragraph)_1_ca41f979b0669b1a9285363b55a53b23.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make first paragraph bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-c13ba3a7-28ad-46b1-a62a-0cb88c29dc1e\",\"object\":\"chat.completion.chunk\",\"created\":1747168992,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p67dve9at7qc2d0jch4a6\"}}\n\ndata: {\"id\":\"chatcmpl-c13ba3a7-28ad-46b1-a62a-0cb88c29dc1e\",\"object\":\"chat.completion.chunk\",\"created\":1747168993,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_67hz\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\u003cp\\u003e\\u003cstrong\\u003eHello, world!\\u003c/strong\\u003e\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-c13ba3a7-28ad-46b1-a62a-0cb88c29dc1e\",\"object\":\"chat.completion.chunk\",\"created\":1747168993,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p67dve9at7qc2d0jch4a6\",\"usage\":{\"queue_time\":0.11093209799999998,\"prompt_tokens\":915,\"prompt_time\":0.133566801,\"completion_tokens\":32,\"completion_time\":0.120453958,\"total_tokens\":947,\"total_time\":0.254020759}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (word)_1_f3cba828671b95cae0b485ad554942cd.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (word)_1_f3cba828671b95cae0b485ad554942cd.json new file mode 100644 index 0000000000..9fc44bd0f1 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/styles + ic in target block, add mark (word)_1_f3cba828671b95cae0b485ad554942cd.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make 'world!' (in the first block) bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-f0ffeed7-619c-4436-8b28-a7ecc030b392\",\"object\":\"chat.completion.chunk\",\"created\":1747168991,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p6643e9abh80xea5jf2bz\"}}\n\ndata: {\"id\":\"chatcmpl-f0ffeed7-619c-4436-8b28-a7ecc030b392\",\"object\":\"chat.completion.chunk\",\"created\":1747168992,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_36y4\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\u003cp\\u003eHello, \\u003cstrong\\u003eworld!\\u003c/strong\\u003e\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-f0ffeed7-619c-4436-8b28-a7ecc030b392\",\"object\":\"chat.completion.chunk\",\"created\":1747168992,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_3f3b593e33\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p6643e9abh80xea5jf2bz\",\"usage\":{\"queue_time\":0.598447683,\"prompt_tokens\":922,\"prompt_time\":0.569092729,\"completion_tokens\":33,\"completion_time\":0.12307244,\"total_tokens\":955,\"total_time\":0.692165169}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_54ec8515dd6ab214d8b92c5cf4f09529.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_54ec8515dd6ab214d8b92c5cf4f09529.json new file mode 100644 index 0000000000..74d8c45b06 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/translate selection_1_54ec8515dd6ab214d8b92c5cf4f09529.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-87a5823d-b4e4-460f-868f-75305557a2d6\",\"object\":\"chat.completion.chunk\",\"created\":1747168987,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p62b9fzttsm8fxcam7mg7\"}}\n\ndata: {\"id\":\"chatcmpl-87a5823d-b4e4-460f-868f-75305557a2d6\",\"object\":\"chat.completion.chunk\",\"created\":1747168987,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_dbb8\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"\\u003cp\\u003eHallo\\u003c/p\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-87a5823d-b4e4-460f-868f-75305557a2d6\",\"object\":\"chat.completion.chunk\",\"created\":1747168987,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p62b9fzttsm8fxcam7mg7\",\"usage\":{\"queue_time\":0.103731913,\"prompt_tokens\":760,\"prompt_time\":0.084372711,\"completion_tokens\":31,\"completion_time\":0.112727273,\"total_tokens\":791,\"total_time\":0.197099984}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/turn paragraphs into list_1_ec7bd4074c354be223256a9d0ab17e64.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/turn paragraphs into list_1_ec7bd4074c354be223256a9d0ab17e64.json new file mode 100644 index 0000000000..a77aef3abe --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/turn paragraphs into list_1_ec7bd4074c354be223256a9d0ab17e64.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Bananas

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"block\\\":\\\"

      Apples

      \\\"},{\\\"block\\\":\\\"

      Bananas

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"turn into list (update existing blocks)\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-48491325-7c71-4ad7-b19e-0bbf2959fda7\",\"object\":\"chat.completion.chunk\",\"created\":1747168994,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p69daezeb6pbt4prjpzfe\"}}\n\ndata: {\"id\":\"chatcmpl-48491325-7c71-4ad7-b19e-0bbf2959fda7\",\"object\":\"chat.completion.chunk\",\"created\":1747168995,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_dte8\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\": [{\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref2$\\\", \\\"block\\\": \\\"\\u003cul\\u003e\\u003cli\\u003eApples\\u003c/li\\u003e\\u003c/ul\\u003e\\\"}, {\\\"type\\\": \\\"update\\\", \\\"id\\\": \\\"ref3$\\\", \\\"block\\\": \\\"\\u003cul\\u003e\\u003cli\\u003eBananas\\u003c/li\\u003e\\u003c/ul\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-48491325-7c71-4ad7-b19e-0bbf2959fda7\",\"object\":\"chat.completion.chunk\",\"created\":1747168995,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p69daezeb6pbt4prjpzfe\",\"usage\":{\"queue_time\":0.09465785099999999,\"prompt_tokens\":706,\"prompt_time\":0.055568379,\"completion_tokens\":66,\"completion_time\":0.24,\"total_tokens\":772,\"total_time\":0.295568379}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type and content_1_d0dca6e4fab1bc2c56ba2099e199fb05.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type and content_1_d0dca6e4fab1bc2c56ba2099e199fb05.json new file mode 100644 index 0000000000..54f0cb7bdd --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type and content_1_d0dca6e4fab1bc2c56ba2099e199fb05.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-09438909-65b7-4164-99a2-833919d10918\",\"object\":\"chat.completion.chunk\",\"created\":1747168988,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p62ztez9b8r27ddwc39z8\"}}\n\ndata: {\"id\":\"chatcmpl-09438909-65b7-4164-99a2-833919d10918\",\"object\":\"chat.completion.chunk\",\"created\":1747168988,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_wyne\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\u003ch1\\u003eWhat's up, world!\\u003c/h1\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-09438909-65b7-4164-99a2-833919d10918\",\"object\":\"chat.completion.chunk\",\"created\":1747168988,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_2ddfbb0da0\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p62ztez9b8r27ddwc39z8\",\"usage\":{\"queue_time\":0.094996571,\"prompt_tokens\":929,\"prompt_time\":0.071901079,\"completion_tokens\":33,\"completion_time\":0.12,\"total_tokens\":962,\"total_time\":0.191901079}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_18c554c2e45b6f5a1f491396916dcb46.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_18c554c2e45b6f5a1f491396916dcb46.json new file mode 100644 index 0000000000..be1ca490e5 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/groq.chat/llama-3.3-70b-versatile (streaming)/update block type_1_18c554c2e45b6f5a1f491396916dcb46.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=groq&url=https%3A%2F%2Fapi.groq.com%2Fopenai%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-19d04d37-0254-4ccf-b7ef-8d4c4db327d6\",\"object\":\"chat.completion.chunk\",\"created\":1747168987,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"x_groq\":{\"id\":\"req_01jv5p62nxez8stwc9631mearz\"}}\n\ndata: {\"id\":\"chatcmpl-19d04d37-0254-4ccf-b7ef-8d4c4db327d6\",\"object\":\"chat.completion.chunk\",\"created\":1747168988,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"id\":\"call_fe2v\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"\\u003ch1\\u003eHello, world!\\u003c/h1\\u003e\\\"}]}\"},\"index\":0}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-19d04d37-0254-4ccf-b7ef-8d4c4db327d6\",\"object\":\"chat.completion.chunk\",\"created\":1747168988,\"model\":\"llama-3.3-70b-versatile\",\"system_fingerprint\":\"fp_9a8b91ba77\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"x_groq\":{\"id\":\"req_01jv5p62nxez8stwc9631mearz\",\"usage\":{\"queue_time\":0.095165881,\"prompt_tokens\":917,\"prompt_time\":0.066734428,\"completion_tokens\":30,\"completion_time\":0.109090909,\"total_tokens\":947,\"total_time\":0.175825337}}}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link and change text within mark_1_feb4bd702156a044fe3c72729f12d83c.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link and change text within mark_1_feb4bd702156a044fe3c72729f12d83c.json new file mode 100644 index 0000000000..9a7d1e698e --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link and change text within mark_1_feb4bd702156a044fe3c72729f12d83c.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqklB9EGeteTKKksY3Yz7KdAPADv\",\n \"object\": \"chat.completion\",\n \"created\": 1747168979,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_oGpuyFOGNfzr13RpSMkT0sa8\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hi, world! Bold the text. Link.

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 656,\n \"completion_tokens\": 34,\n \"total_tokens\": 690,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_1e8bbd364a267db768002ed243692a79.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_1e8bbd364a267db768002ed243692a79.json new file mode 100644 index 0000000000..071515a25a --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_1e8bbd364a267db768002ed243692a79.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqklXGBoMNLlU7Q3X0GOYx3agSnT\",\n \"object\": \"chat.completion\",\n \"created\": 1747168979,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_oVjaLJli44c9RVwlw0rTbuZU\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 650,\n \"completion_tokens\": 32,\n \"total_tokens\": 682,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify nested content_1_b48a9c33b3a0d37850bd38f4c95b310f.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify nested content_1_b48a9c33b3a0d37850bd38f4c95b310f.json new file mode 100644 index 0000000000..fe8437f494 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify nested content_1_b48a9c33b3a0d37850bd38f4c95b310f.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make apples uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqknGAoyZtrMWhQu5TUenlnfaFoP\",\n \"object\": \"chat.completion\",\n \"created\": 1747168981,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_IopLOlDzkvNq3z2SbrX33iPh\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      APPLES

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 541,\n \"completion_tokens\": 27,\n \"total_tokens\": 568,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_90122d973c\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify parent content_1_b8c66592925ae0e551a329b7b2f3b3e2.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify parent content_1_b8c66592925ae0e551a329b7b2f3b3e2.json new file mode 100644 index 0000000000..acef7a6daf --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify parent content_1_b8c66592925ae0e551a329b7b2f3b3e2.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkop4GFqnLZXmpiMwjBdtTPRzE0\",\n \"object\": \"chat.completion\",\n \"created\": 1747168982,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_iP3Y3gCRCXhXMwxXz71mT6LB\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      I NEED TO BUY:

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 543,\n \"completion_tokens\": 28,\n \"total_tokens\": 571,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_196e976a8d5748fd3b667cc39b96cc4d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_196e976a8d5748fd3b667cc39b96cc4d.json new file mode 100644 index 0000000000..d1f94762b6 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_196e976a8d5748fd3b667cc39b96cc4d.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkjNNoQvQ69VtfzGLfofAmiLDtE\",\n \"object\": \"chat.completion\",\n \"created\": 1747168977,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_eUYfczfJ58NjjBlpi2e4FEJe\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, @Jane Doe!

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 648,\n \"completion_tokens\": 47,\n \"total_tokens\": 695,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_62ccc02aa192415d17e9a1f5c53dffb1.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_62ccc02aa192415d17e9a1f5c53dffb1.json new file mode 100644 index 0000000000..d1250f0d06 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_62ccc02aa192415d17e9a1f5c53dffb1.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the first paragraph to german\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkbgZaU3rw0cS9hxADP8BI88Gb6\",\n \"object\": \"chat.completion\",\n \"created\": 1747168969,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_jpdfl8ulA2P1Bzlnbit8koVr\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hallo, Welt!

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 639,\n \"completion_tokens\": 28,\n \"total_tokens\": 667,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_ab9642000a9e81712bf7bf3292769536.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_ab9642000a9e81712bf7bf3292769536.json new file mode 100644 index 0000000000..4682fdb378 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_ab9642000a9e81712bf7bf3292769536.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the bold style from the second block\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkg7742tsvz3Vw2KqTVDTDoVHy0\",\n \"object\": \"chat.completion\",\n \"created\": 1747168974,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_bAj2M3Ys3KLWeIGFrhY7Z5x9\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 641,\n \"completion_tokens\": 67,\n \"total_tokens\": 708,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_aedf9aba96ec8de63204dc0bd079cce0.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_aedf9aba96ec8de63204dc0bd079cce0.json new file mode 100644 index 0000000000..f1b1f34ecf --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_aedf9aba96ec8de63204dc0bd079cce0.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkgpOzkqHLvdNcMo8lQGkI9UXox\",\n \"object\": \"chat.completion\",\n \"created\": 1747168974,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_1DycPDLwfdDFdMArxeXPOKcW\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello! How are you doing? This text is blue!

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 657,\n \"completion_tokens\": 50,\n \"total_tokens\": 707,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_4032f8de849b4d06146cea086f5faee0.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_4032f8de849b4d06146cea086f5faee0.json new file mode 100644 index 0000000000..a8977a8cc5 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_4032f8de849b4d06146cea086f5faee0.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the content of the second block to 'Hello, updated content'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkegG3PZmqLVm1meiXbHmrGwf8C\",\n \"object\": \"chat.completion\",\n \"created\": 1747168972,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_fwGBaGYdH2xUlCuNxx234ywU\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, updated content

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 647,\n \"completion_tokens\": 28,\n \"total_tokens\": 675,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update mention prop_1_37c8ad3a742c0e37960ee3c688ecff05.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update mention prop_1_37c8ad3a742c0e37960ee3c688ecff05.json new file mode 100644 index 0000000000..edc59f1d7f --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update mention prop_1_37c8ad3a742c0e37960ee3c688ecff05.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the mention to Jane Doe\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkkJAZDzWzkCHB9MQxwvczzyRlm\",\n \"object\": \"chat.completion\",\n \"created\": 1747168978,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_c6jd3ZEfnfQPQkJtSBV9iyoW\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @Jane Doe! How are you doing? This text is blue!

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 639,\n \"completion_tokens\": 72,\n \"total_tokens\": 711,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_34b0f8d08eec54b64843fe3f13048db5.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_34b0f8d08eec54b64843fe3f13048db5.json new file mode 100644 index 0000000000..f03561ce87 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_34b0f8d08eec54b64843fe3f13048db5.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the second block to german (use dir instead of Ihnen)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkeYm8vvu5pA3qQjJpWggdHIYA6\",\n \"object\": \"chat.completion\",\n \"created\": 1747168972,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_4H2rxFWEiIn56TjuLtRUXanW\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hallo, @John Doe! Wie geht es dir? Dieser Text ist blau!

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 646,\n \"completion_tokens\": 73,\n \"total_tokens\": 719,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_15ae85e2a52e28738a9cd2f4585a5e87.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_15ae85e2a52e28738a9cd2f4585a5e87.json new file mode 100644 index 0000000000..4e8b8eec86 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_15ae85e2a52e28738a9cd2f4585a5e87.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make first paragraph bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkiruFq0drWUJNkaILrokIvismb\",\n \"object\": \"chat.completion\",\n \"created\": 1747168976,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_lvFqJSQTq9rKxWxxxcC0lna1\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 637,\n \"completion_tokens\": 31,\n \"total_tokens\": 668,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_49c10b96b8a5342b3afe37277f0b2ec0.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_49c10b96b8a5342b3afe37277f0b2ec0.json new file mode 100644 index 0000000000..72795bf190 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_49c10b96b8a5342b3afe37277f0b2ec0.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make 'world!' (in the first block) bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkhH7ZkRMzXcPEyPyMtAfSl0q7M\",\n \"object\": \"chat.completion\",\n \"created\": 1747168975,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_dc9AaXzRl8SZJGemA4fj9O3C\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 644,\n \"completion_tokens\": 32,\n \"total_tokens\": 676,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/translate selection_1_83bf8aa261516bf197d1391294bbcb06.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/translate selection_1_83bf8aa261516bf197d1391294bbcb06.json new file mode 100644 index 0000000000..626afba42e --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/translate selection_1_83bf8aa261516bf197d1391294bbcb06.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkcal3aOZF5sNUOnO2DA4ELI4iE\",\n \"object\": \"chat.completion\",\n \"created\": 1747168970,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_tgvHk6geMECeFHlcsypMz7qv\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hallo

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 486,\n \"completion_tokens\": 26,\n \"total_tokens\": 512,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/turn paragraphs into list_1_5aa207db4b8600962363d2352bf0b1c4.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/turn paragraphs into list_1_5aa207db4b8600962363d2352bf0b1c4.json new file mode 100644 index 0000000000..d6618a5bba --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/turn paragraphs into list_1_5aa207db4b8600962363d2352bf0b1c4.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Bananas

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"block\\\":\\\"

      Apples

      \\\"},{\\\"block\\\":\\\"

      Bananas

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"turn into list (update existing blocks)\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkmieGpQtfts5lKnjlCp8T5CeoL\",\n \"object\": \"chat.completion\",\n \"created\": 1747168980,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_r7mVrgv8IXbHrj68ly8624uD\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"
      • Apples
      \\\"},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"
      • Bananas
      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 432,\n \"completion_tokens\": 56,\n \"total_tokens\": 488,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_fa30ce9145d3237fa4a0b86a61965fb3.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_fa30ce9145d3237fa4a0b86a61965fb3.json new file mode 100644 index 0000000000..e19ea541dc --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_fa30ce9145d3237fa4a0b86a61965fb3.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkd9pJn9E1Z10s4u84REH0YaeeA\",\n \"object\": \"chat.completion\",\n \"created\": 1747168971,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_neNUR3kpEptJ792Tsmcjxav1\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      What's up, world!

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 650,\n \"completion_tokens\": 31,\n \"total_tokens\": 681,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_e5c648bb981ba9ce20b93054446c721d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_e5c648bb981ba9ce20b93054446c721d.json new file mode 100644 index 0000000000..66a99e8e25 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_e5c648bb981ba9ce20b93054446c721d.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWqkchw6SJ4PhIfFtYUXhYpmb8L9a\",\n \"object\": \"chat.completion\",\n \"created\": 1747168970,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_vRohlIT6lo5riUfJ4Hz9hbX7\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 639,\n \"completion_tokens\": 29,\n \"total_tokens\": 668,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_148394a5f5658c93445adc9e68410296.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_148394a5f5658c93445adc9e68410296.json new file mode 100644 index 0000000000..d1d27a6242 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_148394a5f5658c93445adc9e68410296.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_Ywudl1L4gDgCPUFVKkp26zOR\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"3\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hi\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Bold\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" the\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\".\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Link\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\".\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkOjLUePMqz2QAuhJATQR1oSWGz\",\"object\":\"chat.completion.chunk\",\"created\":1747168956,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_b61d90f1021054f8bcf1258cf9d11fe4.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_b61d90f1021054f8bcf1258cf9d11fe4.json new file mode 100644 index 0000000000..53977a3aaa --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_b61d90f1021054f8bcf1258cf9d11fe4.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_d9ZE4NvY8J9Mty8ZHgLCuxfl\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"3\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Bold\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\".\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Link\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\".\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkN7tbkbvLWO8PjXOXTN3RoZjbv\",\"object\":\"chat.completion.chunk\",\"created\":1747168955,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_6dcc3499f6996bd4b16327d079c23b21.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_6dcc3499f6996bd4b16327d079c23b21.json new file mode 100644 index 0000000000..7da24d6f68 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_6dcc3499f6996bd4b16327d079c23b21.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make apples uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_k59S1viUoYxxLprsCaBxRtd8\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"APP\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"LES\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkQDnTr7Q2auXqwWTO4EKDXQVc2\",\"object\":\"chat.completion.chunk\",\"created\":1747168958,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_efbe6b2b8f77c628de12b4ae99dc6939.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_efbe6b2b8f77c628de12b4ae99dc6939.json new file mode 100644 index 0000000000..67b6cc555a --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_efbe6b2b8f77c628de12b4ae99dc6939.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_TwvjyLsNJYpFoIaBbuo6wWoM\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">I\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" NEED\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" TO\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" BUY\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkRTiWVG7hyLw56o6FKEeBff0j1\",\"object\":\"chat.completion.chunk\",\"created\":1747168959,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_c3ec555a7988880acc8c448befdc501d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_c3ec555a7988880acc8c448befdc501d.json new file mode 100644 index 0000000000..32f0803abb --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_c3ec555a7988880acc8c448befdc501d.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_0dUoQVzwhkWYr3VI0DMuss8e\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" <\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"span\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-inline\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"mention\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-user\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Jane\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Doe\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"@\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Jane\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Doe\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkLlStJknAs3KFCjOZ2bbWndZ2A\",\"object\":\"chat.completion.chunk\",\"created\":1747168953,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_7f328ec2574aff0eba83678fedea486a.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_7f328ec2574aff0eba83678fedea486a.json new file mode 100644 index 0000000000..5deb24e441 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_7f328ec2574aff0eba83678fedea486a.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the first paragraph to german\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_IJ8IpdMlslzhzfdwBboizrUH\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hallo\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Welt\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkDbVtRvJz2liSgRrwiTNMTs9ds\",\"object\":\"chat.completion.chunk\",\"created\":1747168945,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_2246a490805512b4459ec130c3f7b028.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_2246a490805512b4459ec130c3f7b028.json new file mode 100644 index 0000000000..ed8e5f7bff --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_2246a490805512b4459ec130c3f7b028.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the bold style from the second block\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_QbyVmagsf2w4MsiEXDEbbcP5\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" <\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"span\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-inline\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"mention\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-user\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"John\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Doe\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"@\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"John\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Doe\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" How\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" are\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" you\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" doing\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"?\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" <\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"span\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-color\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"This\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" is\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkIqocpARJWkUq0YTzldJh1Inm5\",\"object\":\"chat.completion.chunk\",\"created\":1747168950,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_089c1b96e5eef0e337d6ae0646f3670d.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_089c1b96e5eef0e337d6ae0646f3670d.json new file mode 100644 index 0000000000..0e6bb7226f --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_089c1b96e5eef0e337d6ae0646f3670d.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_wwIQpmkHe8SQ3USVu06o21Be\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" <\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"strong\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"How\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" are\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" you\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" doing\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"?\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" <\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"span\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-color\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"This\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" is\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkJDC6ot8bMQtPexyrBTlswOSUT\",\"object\":\"chat.completion.chunk\",\"created\":1747168951,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_1b70479170637ef990c696b81982a9ff.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_1b70479170637ef990c696b81982a9ff.json new file mode 100644 index 0000000000..d0e0f1189e --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_1b70479170637ef990c696b81982a9ff.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the content of the second block to 'Hello, updated content'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_T8WXnadY1zixXWU46VH5q9G5\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" updated\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkG0QzWFMfbHTlApj79mDnYifdJ\",\"object\":\"chat.completion.chunk\",\"created\":1747168948,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_8fc18a40e2b4ccc90a9be4a3a826572b.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_8fc18a40e2b4ccc90a9be4a3a826572b.json new file mode 100644 index 0000000000..ac8eef2246 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_8fc18a40e2b4ccc90a9be4a3a826572b.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the mention to Jane Doe\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_hokkOq370TmEwqpfuLhIJ4St\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" <\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"span\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-inline\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"mention\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-user\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Jane\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Doe\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"@\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Jane\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Doe\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" <\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"strong\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"How\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" are\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" you\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" doing\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"?\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" <\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"span\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-color\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"This\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" is\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkMNbYsFehuF5xG00FsShvcK4OC\",\"object\":\"chat.completion.chunk\",\"created\":1747168954,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_7187509500683cd511ef79bc79adf45e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_7187509500683cd511ef79bc79adf45e.json new file mode 100644 index 0000000000..4eb5b3b881 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_7187509500683cd511ef79bc79adf45e.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the second block to german (use dir instead of Ihnen)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_frjyNtG0IpYqmxLpQwQOG5Y4\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hallo\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" <\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"span\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-inline\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"mention\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-user\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"John\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Doe\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"@\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"John\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Doe\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" <\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"strong\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Wie\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" geht\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" es\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" dir\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"?\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" <\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"span\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" data\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"-color\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"=\\\\\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\\\\\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Dieser\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" ist\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" blau\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkHogZhQ3zKtcCybq64BLBicrav\",\"object\":\"chat.completion.chunk\",\"created\":1747168949,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_263f9c25f7a85f762b255a3778136737.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_263f9c25f7a85f762b255a3778136737.json new file mode 100644 index 0000000000..b6a12d093f --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_263f9c25f7a85f762b255a3778136737.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make first paragraph bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_wgPCxMlbD9DHuAJwtg38ehxz\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"><\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"strong\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkK05kQqI4KRs1Ur1DdRBfajY8S\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_030b36dcdf89ff60ac373c9797f5caa8.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_030b36dcdf89ff60ac373c9797f5caa8.json new file mode 100644 index 0000000000..3dbcb9eabf --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_030b36dcdf89ff60ac373c9797f5caa8.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make 'world!' (in the first block) bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_geCwkiPxyVrvig4NRdgkmyRI\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" <\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"strong\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkKySFjjxWJ0IxN9yEYqDpF6PIl\",\"object\":\"chat.completion.chunk\",\"created\":1747168952,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/translate selection_1_8cfca4c1847085a8a31be1818346738e.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/translate selection_1_8cfca4c1847085a8a31be1818346738e.json new file mode 100644 index 0000000000..f7a50bf1ef --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/translate selection_1_8cfca4c1847085a8a31be1818346738e.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_zfp1IUk7MXxKLSvkBi2PtTI9\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"p\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hallo\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkEIPvCGeGIb7CtsVFhSVDE2FLe\",\"object\":\"chat.completion.chunk\",\"created\":1747168946,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_2f31610c836b996af773c3856634d5c3.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_2f31610c836b996af773c3856634d5c3.json new file mode 100644 index 0000000000..2f978dc6b0 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_2f31610c836b996af773c3856634d5c3.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using HTML blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n This is the selection as an array of html blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Apples

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Bananas

      \\\"}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":\\\"

      I need to buy:

      \\\"},{\\\"block\\\":\\\"

      Apples

      \\\"},{\\\"block\\\":\\\"

      Bananas

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"turn into list (update existing blocks)\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_pPMwmIHfpO78UT2ykRTVpvyc\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ul\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"><\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"li\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Ap\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ples\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"3\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ul\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"><\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"li\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Ban\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"anas\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkPO8f1ejPGxfuh5bD6KvITfC5O\",\"object\":\"chat.completion.chunk\",\"created\":1747168957,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_6bc68512d0085273aa59c32b20ff22b9.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_6bc68512d0085273aa59c32b20ff22b9.json new file mode 100644 index 0000000000..da3e985d09 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_6bc68512d0085273aa59c32b20ff22b9.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_IX7LlAzM6PPGOI1Qnpr6bOpm\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"h\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"What's\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" up\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkFGCEOYzwx2GQHjFEOVgxl7hKh\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_171c87db8855dba2d6bbcd06ae45fbb5.json b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_171c87db8855dba2d6bbcd06ae45fbb5.json new file mode 100644 index 0000000000..a0c964cc22 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/__snapshots__/htmlBlocks.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_171c87db8855dba2d6bbcd06ae45fbb5.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using HTML blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n List items are 1 block with 1 list item each, so block content `
      • item1
      ` is valid, but `
      • item1
      • item2
      ` is invalid. We'll merge them automatically.\\n For code blocks, you can use the `data-language` attribute on a code block to specify the language.\\n This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":\\\"

      Hello, world!

      \\\"},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":\\\"

      Hello, @John Doe! How are you doing? This text is blue!

      \\\"},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":\\\"

      Hello, world! Bold text. Link.

      \\\"}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating existing blocks over removing and adding (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"block\":{\"type\":\"string\",\"description\":\"html of block (MUST be a single HTML element)\"}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_uez7hpYYOHyE6FnFSOC9goav\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"<\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"h\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\">Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWqkF74wFw0p90zCFHF8ZdxO2b3mk\",\"object\":\"chat.completion.chunk\",\"created\":1747168947,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/html-blocks/defaultHTMLPromptBuilder.ts b/packages/xl-ai/src/api/formats/html-blocks/defaultHTMLPromptBuilder.ts new file mode 100644 index 0000000000..ad332657e2 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/defaultHTMLPromptBuilder.ts @@ -0,0 +1,172 @@ +import { CoreMessage } from "ai"; +import type { PromptBuilder } from "../PromptBuilder.js"; +import { + getDataForPromptNoSelection, + getDataForPromptWithSelection, +} from "./htmlPromptData.js"; + +function promptManipulateSelectionHTMLBlocks(opts: { + userPrompt: string; + htmlSelectedBlocks: { + id: string; + block: string; + }[]; + htmlDocument: { + block: string; + }[]; +}): Array { + return [ + { + role: "system", + content: `You're manipulating a selected part of a text document using HTML blocks. + Make sure to follow the json schema provided and always include the trailing $ in ids. + List items are 1 block with 1 list item each, so block content \`
      • item1
      \` is valid, but \`
      • item1
      • item2
      \` is invalid. We'll merge them automatically. + This is the selection as an array of html blocks:`, + }, + { + role: "system", + content: JSON.stringify(opts.htmlSelectedBlocks), + }, + { + role: "system", + content: + "This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:", + }, + { + role: "system", + content: JSON.stringify(opts.htmlDocument), + }, + { + role: "system", + content: "The user asks you to do the following:", + }, + { + role: "user", + content: opts.userPrompt, + }, + ]; +} + +function promptManipulateDocumentUseHTMLBlocks(opts: { + userPrompt: string; + htmlBlocks: Array< + | { + id: string; + block: string; + } + | { + cursor: true; + } + >; +}): Array { + return [ + { + role: "system", + content: `You're manipulating a text document using HTML blocks. + Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). + List items are 1 block with 1 list item each, so block content \`
      • item1
      \` is valid, but \`
      • item1
      • item2
      \` is invalid. We'll merge them automatically. + For code blocks, you can use the \`data-language\` attribute on a code block to specify the language. + This is the document as an array of html blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):`, + }, + { + role: "system", + content: JSON.stringify(opts.htmlBlocks), + }, + { + role: "system", + content: "The user asks you to do the following:", + }, + { + role: "user", + content: opts.userPrompt, + }, + { + role: "system", + content: `First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed. + EXAMPLE: if user says "below" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. + EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need \`referenceId\` to point to the block before the cursor with position \`after\` (or block below and \`before\`). + + Prefer updating existing blocks over removing and adding (but this also depends on the user's question).`, + }, + ]; +} + +export const defaultHTMLPromptBuilder: PromptBuilder = async (editor, opts) => { + if (opts.selectedBlocks) { + const data = await getDataForPromptWithSelection(editor, { + selectedBlocks: opts.selectedBlocks, + }); + + if (opts.previousMessages) { + return [ + ...opts.previousMessages, + { + role: "system", + content: `After processing the previous response, this is the updated selection. + Ignore previous documents, you MUST issue operations against this latest version of the document:`, + }, + { + role: "system", + content: JSON.stringify(data.htmlSelectedBlocks), + }, + { + role: "system", + content: "This is the updated entire document:", + }, + { + role: "system", + content: JSON.stringify(data.htmlDocument), + }, + { + role: "system", + content: `You SHOULD use "update" operations to update blocks you added / edited previously + (unless the user explicitly asks you otherwise to add or delete other blocks). + + The user now asks you to do the following:`, + }, + { + role: "user", + content: opts.userPrompt, + }, + ]; + } + + return promptManipulateSelectionHTMLBlocks({ + ...data, + userPrompt: opts.userPrompt, + }); + } else { + const data = await getDataForPromptNoSelection(editor, opts); + + if (opts.previousMessages) { + return [ + ...opts.previousMessages, + { + role: "system", + content: `After processing the previous response, this is the updated document. + Ignore previous documents, you MUST issue operations against this latest version of the document:`, + }, + { + role: "system", + content: JSON.stringify(data.htmlBlocks), + }, + { + role: "system", + content: `You SHOULD use "update" operations to update blocks you added / edited previously + (unless the user explicitly asks you otherwise to add or delete other blocks). + + The user now asks you to do the following:`, + }, + { + role: "user", + content: opts.userPrompt, + }, + ]; + } + + return promptManipulateDocumentUseHTMLBlocks({ + ...data, + userPrompt: opts.userPrompt, + }); + } +}; diff --git a/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.test.ts b/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.test.ts new file mode 100644 index 0000000000..594ffaa262 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.test.ts @@ -0,0 +1,132 @@ +import { getCurrentTest } from "@vitest/runner"; +import { getSortedEntries, snapshot, toHashString } from "msw-snapshot"; +import { setupServer } from "msw/node"; +import path from "path"; +import { afterAll, afterEach, beforeAll, describe } from "vitest"; +import { testAIModels } from "../../../testUtil/testAIModels.js"; +import { doLLMRequest } from "../../LLMRequest.js"; +import { generateSharedTestCases } from "../tests/sharedTestCases.js"; +import { htmlBlockLLMFormat } from "./htmlBlocks.js"; + +const BASE_FILE_PATH = path.resolve( + __dirname, + "__snapshots__", + path.basename(__filename), +); + +const fetchCountMap: Record = {}; + +async function createRequestHash(req: Request) { + const url = new URL(req.url); + return [ + // url.host, + // url.pathname, + toHashString([ + req.method, + url.origin, + url.pathname, + getSortedEntries(url.searchParams), + getSortedEntries(req.headers), + // getSortedEntries(req.cookies), + new TextDecoder("utf-8").decode(await req.arrayBuffer()), + ]), + ].join("/"); +} + +// Main test suite with snapshot middleware +describe("Models", () => { + // Define server with snapshot middleware for the main tests + const server = setupServer( + snapshot({ + updateSnapshots: "missing", + // onSnapshotUpdated: "all", + // ignoreSnapshots: true, + async createSnapshotPath(info) { + // use a unique path for each model + const t = getCurrentTest()!; + const mswPath = path.join( + t.suite!.name, // same directory as the test snapshot + "__msw_snapshots__", + t.suite!.suite!.name, // model / streaming params + t.name, + ); + // in case there are multiple requests in a test, we need to use a separate snapshot for each request + fetchCountMap[mswPath] = (fetchCountMap[mswPath] || 0) + 1; + const hash = await createRequestHash(info.request); + return mswPath + `_${fetchCountMap[mswPath]}_${hash}.json`; + }, + basePath: BASE_FILE_PATH, + // onFetchFromSnapshot(info, snapshot) { + // console.log("onFetchFromSnapshot", info, snapshot); + // }, + // onFetchFromServer(info, snapshot) { + // console.log("onFetchFromServer", info, snapshot); + // }, + }), + ); + + beforeAll(() => { + server.listen(); + }); + + afterAll(() => { + server.close(); + }); + + afterEach(() => { + delete (window as Window & { __TEST_OPTIONS?: any }).__TEST_OPTIONS; + }); + + const testMatrix = [ + { + model: testAIModels.openai, + stream: true, + }, + { + model: testAIModels.openai, + stream: false, + }, + { + model: testAIModels.groq, + stream: true, + }, + { + model: testAIModels.groq, + stream: false, + }, + // currently doesn't support streaming + // https://github.com/vercel/ai/issues/5350 + // { + // model: testAIModels.albert, + // stream: true, + // }, + // This works for most prompts, but not all (would probably need a llama upgrade?) + // { + // model: testAIModels.albert, + // stream: false, + // }, + ]; + + for (const params of testMatrix) { + describe(`${params.model.provider}/${params.model.modelId} (${ + params.stream ? "streaming" : "non-streaming" + })`, () => { + generateSharedTestCases( + (editor, options) => + doLLMRequest(editor, { + ...options, + dataFormat: htmlBlockLLMFormat, + model: params.model, + maxRetries: 0, + stream: params.stream, + withDelays: false, + }), + // TODO: remove when matthew's parsing PR is merged + { + textAlignment: true, + blockColor: true, + }, + ); + }); + } +}); diff --git a/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.ts b/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.ts new file mode 100644 index 0000000000..e819271f58 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/htmlBlocks.ts @@ -0,0 +1,74 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { StreamTool } from "../../../streamTool/streamTool.js"; + +import { defaultHTMLPromptBuilder } from "./defaultHTMLPromptBuilder.js"; +import { + getDataForPromptNoSelection, + getDataForPromptWithSelection, +} from "./htmlPromptData.js"; +import { tools } from "./tools/index.js"; + +function getStreamTools( + editor: BlockNoteEditor, + withDelays: boolean, + defaultStreamTools?: { + /** Enable the add tool (default: true) */ + add?: boolean; + /** Enable the update tool (default: true) */ + update?: boolean; + /** Enable the delete tool (default: true) */ + delete?: boolean; + }, + selectionInfo?: { + from: number; + to: number; + }, + onBlockUpdate?: (blockId: string) => void, +) { + const mergedStreamTools = { + add: true, + update: true, + delete: true, + ...defaultStreamTools, + }; + + const streamTools: StreamTool[] = [ + ...(mergedStreamTools.update + ? [ + tools.update(editor, { + idsSuffixed: true, + withDelays, + updateSelection: selectionInfo, + onBlockUpdate, + }), + ] + : []), + ...(mergedStreamTools.add + ? [tools.add(editor, { idsSuffixed: true, withDelays, onBlockUpdate })] + : []), + ...(mergedStreamTools.delete + ? [tools.delete(editor, { idsSuffixed: true, withDelays, onBlockUpdate })] + : []), + ]; + + return streamTools; +} + +export const htmlBlockLLMFormat = { + /** + * Function to get the stream tools that can apply HTML block updates to the editor + */ + getStreamTools, + /** + * The default PromptBuilder that determines how a userPrompt is converted to an array of + * LLM Messages (CoreMessage[]) + */ + defaultPromptBuilder: defaultHTMLPromptBuilder, + /** + * Helper functions which can be used when implementing a custom PromptBuilder + */ + promptHelpers: { + getDataForPromptNoSelection, + getDataForPromptWithSelection, + }, +}; diff --git a/packages/xl-ai/src/api/formats/html-blocks/htmlPromptData.ts b/packages/xl-ai/src/api/formats/html-blocks/htmlPromptData.ts new file mode 100644 index 0000000000..5949509702 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/htmlPromptData.ts @@ -0,0 +1,53 @@ +import { Block, BlockNoteEditor } from "@blocknote/core"; +import { addCursorPosition } from "../../promptHelpers/addCursorPosition.js"; +import { convertBlocks } from "../../promptHelpers/convertBlocks.js"; +import { flattenBlocks } from "../../promptHelpers/flattenBlocks.js"; +import { suffixIDs } from "../../promptHelpers/suffixIds.js"; +import { trimEmptyBlocks } from "../../promptHelpers/trimEmptyBlocks.js"; + +export async function getDataForPromptNoSelection( + editor: BlockNoteEditor, + opts: { + excludeBlockIds?: string[]; + }, +) { + const input = trimEmptyBlocks(editor.document); + const blockArray = await convertBlocks( + flattenBlocks(input), + async (block) => { + return editor.blocksToHTMLLossy([block]); + }, + ); + const withCursor = addCursorPosition(editor, blockArray); + const filtered = withCursor.filter( + (b) => "cursor" in b || !(opts.excludeBlockIds || []).includes(b.id), + ); + const suffixed = suffixIDs(filtered); + return { + htmlBlocks: suffixed, + }; +} + +export async function getDataForPromptWithSelection( + editor: BlockNoteEditor, + opts: { + selectedBlocks: Block[]; + }, +) { + const blockArray = await convertBlocks( + flattenBlocks(opts.selectedBlocks), + async (block) => { + return editor.blocksToHTMLLossy([block]); + }, + ); + const suffixed = suffixIDs(blockArray); + + return { + htmlSelectedBlocks: suffixed, + htmlDocument: ( + await convertBlocks(flattenBlocks(editor.document), async (block) => { + return editor.blocksToHTMLLossy([block]); + }) + ).map(({ block }) => ({ block })), // strip ids so LLM can't accidentally issue updates to ids not in selection + }; +} diff --git a/packages/xl-ai/src/api/formats/html-blocks/tools/getPartialHTML.test.ts b/packages/xl-ai/src/api/formats/html-blocks/tools/getPartialHTML.test.ts new file mode 100644 index 0000000000..e0cd84b92a --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/tools/getPartialHTML.test.ts @@ -0,0 +1,76 @@ +import { describe, expect, it } from "vitest"; +import { getPartialHTML } from "./getPartialHTML.js"; + +describe("getPartialHTML", () => { + // Test cases from the function's documentation + it("completes simple paragraph tag", () => { + expect(getPartialHTML("

      hello")).toBe("

      hello

      "); + }); + + it("handles incomplete tag at the end", () => { + expect(getPartialHTML("

      hello hello

      "); + }); + + it("handles incomplete tag with content", () => { + expect(getPartialHTML("

      hello hello

      "); + }); + + it("completes nested tags", () => { + expect(getPartialHTML("

      hello ")).toBe( + "

      hello

      ", + ); + }); + + it("completes nested tags with content", () => { + expect(getPartialHTML("

      hello world")).toBe( + "

      hello world

      ", + ); + }); + + it("leaves already complete HTML unchanged", () => { + expect(getPartialHTML("

      hello world

      ")).toBe( + "

      hello world

      ", + ); + }); + + // Additional test cases + it("handles empty string", () => { + expect(getPartialHTML("")).toBe(""); + }); + + it("handles incomplete entity", () => { + expect(getPartialHTML("

      hello &")).toBe("

      hello

      "); + }); + + it("handles incomplete entity with partial name", () => { + expect(getPartialHTML("

      hello &")).toBe("

      hello

      "); + }); + + it("handles complete entity", () => { + expect(getPartialHTML("

      hello &")).toBe("

      hello &

      "); + }); + + it("handles multiple nested tags", () => { + expect(getPartialHTML("

      hello")).toBe( + "

      hello

      ", + ); + }); + + it("handles self-closing tags", () => { + expect(getPartialHTML('
      hello')).toBe( + '
      hello
      ', + ); + }); + + it("handles self-closing tags (incomplete)", () => { + expect(getPartialHTML('
      "); + }); + + it("returns undefined for only incomplete tag", () => { + expect(getPartialHTML("<")).toBeUndefined(); + }); + + it("handles attributes in incomplete tags", () => { + expect(getPartialHTML('

      hello ->

      hello

      + *

      hello

      hello

      + *

      hello

      hello

      + *

      hello ->

      hello

      + *

      hello world ->

      hello world

      + *

      hello world ->

      hello world

      + * + * @param html A potentially incomplete HTML string + * @returns A properly formed HTML string with all tags closed + */ +export function getPartialHTML(html: string): string | undefined { + // Simple check: if the last '<' doesn't have a matching '>', + // then we have an incomplete tag at the end + const lastOpenBracket = html.lastIndexOf("<"); + const lastCloseBracket = html.lastIndexOf(">"); + + // Handle incomplete tags by removing everything after the last complete tag + let htmlToProcess = html; + if (lastOpenBracket > lastCloseBracket) { + htmlToProcess = html.substring(0, lastOpenBracket); + // If nothing remains after removing the incomplete tag, return empty string + if (!htmlToProcess.trim()) { + return undefined; + } + } + + // if we're half-way through an entity tag that isn't closed, we need to remove the entity tag + const match = htmlToProcess.match(/&[a-zA-Z0-9]*$/); + if (match) { + htmlToProcess = htmlToProcess.substring( + 0, + htmlToProcess.length - match[0].length, + ); + } + + // Parse the HTML + const parser = new DOMParser(); + const doc = parser.parseFromString( + `
      ${htmlToProcess}
      `, + "text/html", + ); + const el = doc.body.firstChild as HTMLElement; + return el ? el.innerHTML : ""; +} diff --git a/packages/xl-ai/src/api/formats/html-blocks/tools/index.ts b/packages/xl-ai/src/api/formats/html-blocks/tools/index.ts new file mode 100644 index 0000000000..054d809823 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/tools/index.ts @@ -0,0 +1,112 @@ +import { PartialBlock } from "@blocknote/core"; +import { + AddBlocksToolCall, + createAddBlocksTool, +} from "../../base-tools/createAddBlocksTool.js"; +import { + createUpdateBlockTool, + UpdateBlockToolCall, +} from "../../base-tools/createUpdateBlockTool.js"; +import { deleteBlockTool } from "../../base-tools/delete.js"; +import { getPartialHTML } from "./getPartialHTML.js"; +import { createHTMLRebaseTool } from "./rebaseTool.js"; +import { validateBlockFunction } from "./validate.js"; + +export const tools = { + add: createAddBlocksTool({ + description: "Insert new blocks", + schema: { + block: { + $ref: "#/$defs/block", + }, + $defs: { + block: { + type: "string", + description: "html of block (MUST be a single HTML element)", + }, + }, + }, + validateBlock: validateBlockFunction, + rebaseTool: createHTMLRebaseTool, + toJSONToolCall: async (editor, chunk) => { + const initialMockID = (window as any).__TEST_OPTIONS?.mockID; + + const blocks = ( + await Promise.all( + chunk.operation.blocks.map(async (html) => { + const parsedHtml = chunk.isPossiblyPartial + ? getPartialHTML(html) + : html; + if (!parsedHtml) { + return []; + } + return (await editor.tryParseHTMLToBlocks(parsedHtml)).map( + (block) => { + delete (block as any).id; + return block; + }, + ); + }), + ) + ).flat(); + + // hacky + if ((window as any).__TEST_OPTIONS) { + (window as Window & { __TEST_OPTIONS?: any }).__TEST_OPTIONS.mockID = + initialMockID; + } + + if (blocks.length === 0) { + return undefined; + } + + return { + ...chunk.operation, + blocks, + } satisfies AddBlocksToolCall>; + }, + }), + update: createUpdateBlockTool({ + description: "Update a block", + schema: { + block: { + $ref: "#/$defs/block", + }, + $defs: { + block: { + type: "string", + description: "html of block (MUST be a single HTML element)", + }, + }, + }, + validateBlock: validateBlockFunction, + rebaseTool: createHTMLRebaseTool, + toJSONToolCall: async (editor, chunk) => { + const html = chunk.isPossiblyPartial + ? getPartialHTML(chunk.operation.block) + : chunk.operation.block; + + if (!html) { + return undefined; + } + + const block = (await editor.tryParseHTMLToBlocks(html))[0]; + + // console.log("update", operation.block); + // console.log("html", html); + // hacky + if ((window as any).__TEST_OPTIONS) { + (window as Window & { __TEST_OPTIONS?: any }).__TEST_OPTIONS.mockID = + undefined; + } + + delete (block as any).id; + + return { + ...chunk.operation, + block, + } satisfies UpdateBlockToolCall>; + }, + }), + delete: deleteBlockTool, +}; diff --git a/packages/xl-ai/src/api/formats/html-blocks/tools/rebaseTool.ts b/packages/xl-ai/src/api/formats/html-blocks/tools/rebaseTool.ts new file mode 100644 index 0000000000..7e949c02f6 --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/tools/rebaseTool.ts @@ -0,0 +1,56 @@ +import { BlockNoteEditor, getBlock } from "@blocknote/core"; +import { updateToReplaceSteps } from "../../../../prosemirror/changeset.js"; +import { + getApplySuggestionsTr, + rebaseTool, +} from "../../../../prosemirror/rebaseTool.js"; + +export async function createHTMLRebaseTool( + id: string, + editor: BlockNoteEditor, +) { + const tr = getApplySuggestionsTr(editor); + const block = getBlock(tr.doc, id); + if (!block) { + throw new Error("block not found"); + } + + const html = await editor.blocksToHTMLLossy([ + { + ...block, + children: [], + }, + ]); + + const initialMockID = (window as any).__TEST_OPTIONS?.mockID; + + const blocks = await editor.tryParseHTMLToBlocks(html); + + // hacky + if ((window as any).__TEST_OPTIONS) { + (window as Window & { __TEST_OPTIONS?: any }).__TEST_OPTIONS.mockID = + initialMockID; + } + + if (blocks.length !== 1) { + throw new Error("html diff invalid block count"); + } + + const htmlBlock = blocks[0]; + htmlBlock.id = id; + + const steps = updateToReplaceSteps( + { + id, + block: htmlBlock, + }, + tr.doc, + ); + + if (steps.length) { + // console.error("html diff", steps); + throw new Error("html diff"); + } + + return rebaseTool(editor, tr); +} diff --git a/packages/xl-ai/src/api/formats/html-blocks/tools/validate.ts b/packages/xl-ai/src/api/formats/html-blocks/tools/validate.ts new file mode 100644 index 0000000000..3468cdd80f --- /dev/null +++ b/packages/xl-ai/src/api/formats/html-blocks/tools/validate.ts @@ -0,0 +1,15 @@ +import { Result } from "../../../../streamTool/streamTool.js"; + +export function validateBlockFunction(block: any): Result { + if (typeof block !== "string") { + return { + ok: false, + error: "block must be a string", + }; + } + + return { + ok: true, + value: block, + }; +} diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_4b13d164d4335cc9e201d217c288f3a0.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_4b13d164d4335cc9e201d217c288f3a0.json new file mode 100644 index 0000000000..f0671f8fd7 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/Add heading (h1) and code block_1_4b13d164d4335cc9e201d217c288f3a0.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you?\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"at the end of doc, add a heading `Code` and a javascript code block with `console.log('hello world');`\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2AMNdfuG1UAvkIdveRgKv6wNFK\",\n \"object\": \"chat.completion\",\n \"created\": 1747170058,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_TSfObvANWFlGvEOirpLR0epC\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[{\\\"type\\\":\\\"heading\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Code\\\"}],\\\"props\\\":{\\\"level\\\":1}},{\\\"type\\\":\\\"codeBlock\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"console.log('hello world');\\\"}],\\\"props\\\":{\\\"language\\\":\\\"javascript\\\"}}]}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1008,\n \"completion_tokens\": 76,\n \"total_tokens\": 1084,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_2e1b3d58032f40317616d76bf4fea81c.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_2e1b3d58032f40317616d76bf4fea81c.json new file mode 100644 index 0000000000..cd831726d5 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a list (end)_1_2e1b3d58032f40317616d76bf4fea81c.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you?\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a list with the items 'Apples' and 'Bananas' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr29cfCUtDL6hK2Dj6iOMZ2KZUTk\",\n \"object\": \"chat.completion\",\n \"created\": 1747170057,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_Iz91l1XPLjQqC5EepqST2XSR\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[{\\\"type\\\":\\\"bulletListItem\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Apples\\\"}]},{\\\"type\\\":\\\"bulletListItem\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bananas\\\"}]}]}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1001,\n \"completion_tokens\": 64,\n \"total_tokens\": 1065,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_4267ae57d44c64aa8b70a89aab67f159.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_4267ae57d44c64aa8b70a89aab67f159.json new file mode 100644 index 0000000000..6c6de3f846 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (end)_1_4267ae57d44c64aa8b70a89aab67f159.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you?\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr29vZEkGEHxkfNYp3WHCQ4huupX\",\n \"object\": \"chat.completion\",\n \"created\": 1747170057,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_XjLKo0rgaSknQZErwIhOqyUf\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"You look great today!\\\"}]}]}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 999,\n \"completion_tokens\": 45,\n \"total_tokens\": 1044,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_9d50ec65e996e7a56294ea29bc698367.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_9d50ec65e996e7a56294ea29bc698367.json new file mode 100644 index 0000000000..409dd5c3ac --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add a new paragraph (start)_1_9d50ec65e996e7a56294ea29bc698367.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you?\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr28QV79sU9VNbz5iR3rCvDGZxhP\",\n \"object\": \"chat.completion\",\n \"created\": 1747170056,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_UmGWzZFbrTUAVsNPEW1zvcoy\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"You look great today!\\\"}]}]}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 999,\n \"completion_tokens\": 45,\n \"total_tokens\": 1044,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_8c55f5cd009ab351956e1b40605abc34.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_8c55f5cd009ab351956e1b40605abc34.json new file mode 100644 index 0000000000..ab6f99258f --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/Add heading (h1) and code block_1_8c55f5cd009ab351956e1b40605abc34.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you?\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"at the end of doc, add a heading `Code` and a javascript code block with `console.log('hello world');`\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_wkllzjAegdRWuKyZRmNb3VDy\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"after\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"heading\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Code\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"],\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"props\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"level\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}},\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"code\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"console\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\".log\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"('\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"');\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"],\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"props\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"language\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"javascript\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1fNMOnQrRLjp6dNR9fNKHsDNCV\",\"object\":\"chat.completion.chunk\",\"created\":1747170027,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_eabec381f0f6973116f9e49dc86810d4.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_eabec381f0f6973116f9e49dc86810d4.json new file mode 100644 index 0000000000..27525c939b --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a list (end)_1_eabec381f0f6973116f9e49dc86810d4.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you?\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a list with the items 'Apples' and 'Bananas' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_caywPO0uICoiGF8oJIYI31VB\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"after\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"bullet\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"List\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Item\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Ap\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ples\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"bullet\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"List\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Item\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Ban\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"anas\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1eDdWKPqWZ2t8s1V06CFp7Xb7o\",\"object\":\"chat.completion.chunk\",\"created\":1747170026,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_018cc4d3757dfb60819403609f61a74d.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_018cc4d3757dfb60819403609f61a74d.json new file mode 100644 index 0000000000..70cc9fdd4c --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (end)_1_018cc4d3757dfb60819403609f61a74d.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you?\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the last sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_Owj2dfSjZTDn2Sf26SZ7WmwY\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"after\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"You\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" look\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" great\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" today\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1c0I8SWap6MzlipQD3iocoRUVW\",\"object\":\"chat.completion.chunk\",\"created\":1747170024,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_aeee8d53d8e28d27a45229e9f04bfd02.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_aeee8d53d8e28d27a45229e9f04bfd02.json new file mode 100644 index 0000000000..025494a88d --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Add/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add a new paragraph (start)_1_aeee8d53d8e28d27a45229e9f04bfd02.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you?\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' before the first sentence\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_02KMh9cqtvpBvkDT512bI8RV\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"before\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"You\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" look\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" great\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" today\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1b9mkJ5M2Ay8NYUTuVMW2JZPBj\",\"object\":\"chat.completion.chunk\",\"created\":1747170023,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_46911433377fbe117de27b4ebef430f5.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_46911433377fbe117de27b4ebef430f5.json new file mode 100644 index 0000000000..741a8b9699 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add and update paragraph_1_46911433377fbe117de27b4ebef430f5.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate 'Hello, world' to dutch\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr3ppCb4KP9rhO932vp8RoNxm7uV\",\n \"object\": \"chat.completion\",\n \"created\": 1747170161,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_tLio8rGymY04EAu4QFWab06E\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref1$\\\",\\\"position\\\":\\\"after\\\",\\\"blocks\\\":[{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"You look great today!\\\"}]}]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hallo, wereld!\\\"}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1180,\n \"completion_tokens\": 77,\n \"total_tokens\": 1257,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add paragraph and update selection_1_caeb25fbcd6743ad509ab18526f09180.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add paragraph and update selection_1_caeb25fbcd6743ad509ab18526f09180.json new file mode 100644 index 0000000000..83a3811197 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/add paragraph and update selection_1_caeb25fbcd6743ad509ab18526f09180.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using JSON blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n This is the selection as an array of JSON blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello\\\",\\\"styles\\\":{}}],\\\"children\\\":[]}}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a paragraph with the text 'You look great today!' at the beginning and translate selection to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr3qwMTWNoKl1SsHDwvxufkoJxtj\",\n \"object\": \"chat.completion\",\n \"created\": 1747170162,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_td5YTSgLfpJKehFLvqN1nzha\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"add\\\",\\\"referenceId\\\":\\\"ref2$\\\",\\\"position\\\":\\\"before\\\",\\\"blocks\\\":[{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"You look great today!\\\"}]}]},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hallo\\\"}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1071,\n \"completion_tokens\": 75,\n \"total_tokens\": 1146,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_55d88aaf2f\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_049c64f71763963c05852957cdcd40bd.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_049c64f71763963c05852957cdcd40bd.json new file mode 100644 index 0000000000..fab9e4a9ef --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add and update paragraph_1_049c64f71763963c05852957cdcd40bd.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a new paragraph with the text 'You look great today!' after the first paragraph and translate 'Hello, world' to dutch\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_WBI2V0Bmnu80r8YonCye5Tzm\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"after\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"You\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" look\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" great\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" today\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hallo\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" wereld\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4TH6dP2Dh3clIYufEVSM4pDD8i\",\"object\":\"chat.completion.chunk\",\"created\":1747170201,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_d7907adc86da5742363bfc4422e490e6.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_d7907adc86da5742363bfc4422e490e6.json new file mode 100644 index 0000000000..c83a3021c6 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Combined/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/add paragraph and update selection_1_d7907adc86da5742363bfc4422e490e6.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using JSON blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n This is the selection as an array of JSON blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello\\\",\\\"styles\\\":{}}],\\\"children\\\":[]}}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"add a paragraph with the text 'You look great today!' at the beginning and translate selection to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_ViesLC46LzlOoWWXRKheDiMz\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"add\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"reference\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"position\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"before\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blocks\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"You\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" look\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" great\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" today\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hallo\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4UliREX8IzDzKcYFHQSmM4h7fU\",\"object\":\"chat.completion.chunk\",\"created\":1747170202,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_5515f1ecee9bd348f415319f4a843add.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_5515f1ecee9bd348f415319f4a843add.json new file mode 100644 index 0000000000..fd5d087f54 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/delete first block_1_5515f1ecee9bd348f415319f4a843add.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"delete the first paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr3mOmkBqSlICyjNDRHEhG2nSONm\",\n \"object\": \"chat.completion\",\n \"created\": 1747170158,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_ALzb6pegTbWtNsVSAEi4WUib\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"delete\\\",\\\"id\\\":\\\"ref1$\\\"}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1157,\n \"completion_tokens\": 16,\n \"total_tokens\": 1173,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 1152,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_7c35b931bd8677fa1920b9e5f8128f4a.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_7c35b931bd8677fa1920b9e5f8128f4a.json new file mode 100644 index 0000000000..1c9b5f37cc --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Delete/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/delete first block_1_7c35b931bd8677fa1920b9e5f8128f4a.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"delete the first paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_yeTVbcnLx55qZZEpHPPsgTBx\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"delete\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr4SWP5sGsjH9i4xKFjpYSUgvIMV\",\"object\":\"chat.completion.chunk\",\"created\":1747170200,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/clear block formatting_1_25bc98ef490234deedb61e16a00d439e.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/clear block formatting_1_25bc98ef490234deedb61e16a00d439e.json new file mode 100644 index 0000000000..04f14bcf6e --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/clear block formatting_1_25bc98ef490234deedb61e16a00d439e.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"red\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Colored text\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"right\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Aligned text\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"clear the formatting (colors and alignment)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr4MmahIURHAGdJD55icQ6F3kC7Y\",\n \"object\": \"chat.completion\",\n \"created\": 1747170194,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_1SbbgcxwCjYcDSkmnwHRY4Co\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Colored text\\\",\\\"styles\\\":{}}]}},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Aligned text\\\",\\\"styles\\\":{}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 986,\n \"completion_tokens\": 74,\n \"total_tokens\": 1060,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link and change text within mark_1_c94d4dbaf7e20ccafc3a87f8933afd6a.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link and change text within mark_1_c94d4dbaf7e20ccafc3a87f8933afd6a.json new file mode 100644 index 0000000000..f7c736bbd9 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link and change text within mark_1_c94d4dbaf7e20ccafc3a87f8933afd6a.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2RJh3LlCQuhvs3kVfyQsaTSmwN\",\n \"object\": \"chat.completion\",\n \"created\": 1747170075,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_yTcTmvMYV9Xruk1d1oGXBaoQ\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hi, world! Bold the text. Link.\\\"}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1176,\n \"completion_tokens\": 43,\n \"total_tokens\": 1219,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 1152,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_164602425b43f343ccbfb3c2f1509b58.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_164602425b43f343ccbfb3c2f1509b58.json new file mode 100644 index 0000000000..12a4ce09e0 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/drop mark and link_1_164602425b43f343ccbfb3c2f1509b58.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2QryET6quDGTuv0xwnUcbYG7jw\",\n \"object\": \"chat.completion\",\n \"created\": 1747170074,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_N5qiD9jZxvBto4LkdbudCKp4\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! Bold text. Link.\\\"}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1170,\n \"completion_tokens\": 42,\n \"total_tokens\": 1212,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_90122d973c\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify nested content_1_60470c62411dbe76f9d1ebb97160e62c.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify nested content_1_60470c62411dbe76f9d1ebb97160e62c.json new file mode 100644 index 0000000000..0668296878 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify nested content_1_60470c62411dbe76f9d1ebb97160e62c.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"I need to buy:\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Apples\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make apples uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2RQo4Y00eQ4fmXXShAEVkm8KxI\",\n \"object\": \"chat.completion\",\n \"created\": 1747170075,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_56hEOpWhFaN3uX5FNqybQSJb\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"APPLES\\\",\\\"styles\\\":{}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 984,\n \"completion_tokens\": 40,\n \"total_tokens\": 1024,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify parent content_1_603268f548d2c26969d79e4e170bd524.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify parent content_1_603268f548d2c26969d79e4e170bd524.json new file mode 100644 index 0000000000..7334986a99 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/modify parent content_1_603268f548d2c26969d79e4e170bd524.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"I need to buy:\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Apples\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr4MQcroWmT8iLM3CBoeRzrXcZSK\",\n \"object\": \"chat.completion\",\n \"created\": 1747170194,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_9cFf2xZszJe8vi7e8gQ9yfRP\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"I NEED TO BUY:\\\",\\\"styles\\\":{}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 986,\n \"completion_tokens\": 43,\n \"total_tokens\": 1029,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_dc3adc84764ea9dd8f20a906a4633334.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_dc3adc84764ea9dd8f20a906a4633334.json new file mode 100644 index 0000000000..60728a27b7 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/plain source block, add mention_1_dc3adc84764ea9dd8f20a906a4633334.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2NSgO7UjWQrb1bhFWE5gKhRnsP\",\n \"object\": \"chat.completion\",\n \"created\": 1747170071,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_VbObZWb4CRfcAVNle6UwFRtj\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"Jane Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"!\\\",\\\"styles\\\":{}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1168,\n \"completion_tokens\": 64,\n \"total_tokens\": 1232,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 1152,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_6330ddde52ebd48c1e8914a970ad7849.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_6330ddde52ebd48c1e8914a970ad7849.json new file mode 100644 index 0000000000..7452d1e80e --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/standard update_1_6330ddde52ebd48c1e8914a970ad7849.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the first paragraph to german\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2BjayY4K4V3jOPh94L0zgh9pl6\",\n \"object\": \"chat.completion\",\n \"created\": 1747170059,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_lk39ph3EG9RWvvkrBS7vS7sk\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hallo, Welt!\\\",\\\"styles\\\":{}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1159,\n \"completion_tokens\": 42,\n \"total_tokens\": 1201,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 1152,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_aa396a89a86700c7c1531127331c95b9.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_aa396a89a86700c7c1531127331c95b9.json new file mode 100644 index 0000000000..78386efe41 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mark_1_aa396a89a86700c7c1531127331c95b9.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the bold style from the second block\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2JEgifYZFs9ATBitUjN2CVwo8H\",\n \"object\": \"chat.completion\",\n \"created\": 1747170067,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_yOXhWOSYbfToDeMRmNYZ0tLk\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1161,\n \"completion_tokens\": 128,\n \"total_tokens\": 1289,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_90122d973c\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_e1de4a145c9a98804f8d1fd1ae811da4.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_e1de4a145c9a98804f8d1fd1ae811da4.json new file mode 100644 index 0000000000..cc37626dec --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, remove mention_1_e1de4a145c9a98804f8d1fd1ae811da4.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2KNaJiYp3aY7SSY5fXW8TDJCob\",\n \"object\": \"chat.completion\",\n \"created\": 1747170068,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_cTgZfbKHca9uT0NeNV1JfCDi\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1177,\n \"completion_tokens\": 89,\n \"total_tokens\": 1266,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 1152,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_ce587e62f1783dd0652ffea5d558fda6.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_ce587e62f1783dd0652ffea5d558fda6.json new file mode 100644 index 0000000000..eff17d5d03 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, replace content_1_ce587e62f1783dd0652ffea5d558fda6.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the content of the second block to 'Hello, updated content'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2HsxUKhnsevUSJROXsa404rwEO\",\n \"object\": \"chat.completion\",\n \"created\": 1747170065,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_FHhTnlrueDIB2caxRFJM32Bb\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, updated content\\\"}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1167,\n \"completion_tokens\": 38,\n \"total_tokens\": 1205,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_90122d973c\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update mention prop_1_c2fb024d9d7218c5051012323c39fa0d.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update mention prop_1_c2fb024d9d7218c5051012323c39fa0d.json new file mode 100644 index 0000000000..e5f0f9fbb3 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update mention prop_1_c2fb024d9d7218c5051012323c39fa0d.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the mention to Jane Doe\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2OgEMQ6IWh4wavNqgT9RVskgvU\",\n \"object\": \"chat.completion\",\n \"created\": 1747170072,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_U6ouZPjqz9o3oIlFViEUUMHC\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"Jane Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1159,\n \"completion_tokens\": 113,\n \"total_tokens\": 1272,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_e2f62ab4415528c63105a90c35e202f3.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_e2f62ab4415528c63105a90c35e202f3.json new file mode 100644 index 0000000000..97aef25a85 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in source block, update text_1_e2f62ab4415528c63105a90c35e202f3.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the second block to german (use dir instead of Ihnen)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2I5bB9X30kEO5gDlDZnQGamOwi\",\n \"object\": \"chat.completion\",\n \"created\": 1747170066,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_kPkxFKCq8PYIgrsi4mO4eSox\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hallo, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Wie geht es dir?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Dieser Text ist blau!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1166,\n \"completion_tokens\": 113,\n \"total_tokens\": 1279,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_fb966bb5f366d489cd267e48a7455c72.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_fb966bb5f366d489cd267e48a7455c72.json new file mode 100644 index 0000000000..8f5891ae2e --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (paragraph)_1_fb966bb5f366d489cd267e48a7455c72.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make first paragraph bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2Ngb4I3pKgDAvJai1Zkct8rqCK\",\n \"object\": \"chat.completion\",\n \"created\": 1747170071,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_zrGHo6812U38jvL7k4Sies15\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{\\\"bold\\\":true}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1157,\n \"completion_tokens\": 44,\n \"total_tokens\": 1201,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_10409eb8f8e256c2c07ee05c2558a2a9.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_10409eb8f8e256c2c07ee05c2558a2a9.json new file mode 100644 index 0000000000..c0fc0df459 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/styles + ic in target block, add mark (word)_1_10409eb8f8e256c2c07ee05c2558a2a9.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make 'world!' (in the first block) bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2MY8OO2Ne0HcgNV03C0IPlhDy5\",\n \"object\": \"chat.completion\",\n \"created\": 1747170070,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_jJHddSYtax9suFnK55VEjiHa\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"world!\\\",\\\"styles\\\":{\\\"bold\\\":true}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1164,\n \"completion_tokens\": 55,\n \"total_tokens\": 1219,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 1152,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/translate selection_1_e06a86826098274cfb35046f8f5f67a5.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/translate selection_1_e06a86826098274cfb35046f8f5f67a5.json new file mode 100644 index 0000000000..778fffed4c --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/translate selection_1_e06a86826098274cfb35046f8f5f67a5.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using JSON blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n This is the selection as an array of JSON blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello\\\",\\\"styles\\\":{}}],\\\"children\\\":[]}}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2CwuirEtsRMMwjE8OC4lSvmIj9\",\n \"object\": \"chat.completion\",\n \"created\": 1747170060,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_3WJRZVAIXQwTM3nROt6eK4Pq\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hallo\\\",\\\"styles\\\":{}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1054,\n \"completion_tokens\": 39,\n \"total_tokens\": 1093,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 1024,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_55d88aaf2f\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/turn paragraphs into list_1_c704dd8060467f285e008fcfa10bd3b9.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/turn paragraphs into list_1_c704dd8060467f285e008fcfa10bd3b9.json new file mode 100644 index 0000000000..25816cfd88 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/turn paragraphs into list_1_c704dd8060467f285e008fcfa10bd3b9.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using JSON blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n This is the selection as an array of JSON blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Apples\\\",\\\"styles\\\":{}}],\\\"children\\\":[]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bananas\\\",\\\"styles\\\":{}}],\\\"children\\\":[]}}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"I need to buy:\\\",\\\"styles\\\":{}}]}},{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Apples\\\",\\\"styles\\\":{}}]}},{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bananas\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"turn into list (update existing blocks)\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr4L5SLUilmEsFgMtHk7j0CEwL3R\",\n \"object\": \"chat.completion\",\n \"created\": 1747170193,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_faPrQZMNUUp6ik7KVEsEmL8C\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"type\\\":\\\"bulletListItem\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Apples\\\",\\\"styles\\\":{}}]}},{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"type\\\":\\\"bulletListItem\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bananas\\\",\\\"styles\\\":{}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 997,\n \"completion_tokens\": 78,\n \"total_tokens\": 1075,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_55d88aaf2f\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block prop and content_1_be4a66aa5ee43a3fd916166e56052ad0.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block prop and content_1_be4a66aa5ee43a3fd916166e56052ad0.json new file mode 100644 index 0000000000..fa56c57d2b --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block prop and content_1_be4a66aa5ee43a3fd916166e56052ad0.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph right aligned and update the content to 'What's up, world!'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2GbA8MY1aTukXEpGM6eoR2FJfO\",\n \"object\": \"chat.completion\",\n \"created\": 1747170064,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_gmu0lEA5zzVhekO8jM4QMbB9\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textAlignment\\\":\\\"right\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"What's up, world!\\\"}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1170,\n \"completion_tokens\": 46,\n \"total_tokens\": 1216,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 1152,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block prop_1_697c8f64d854e5a824cb735c81d9b7ea.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block prop_1_697c8f64d854e5a824cb735c81d9b7ea.json new file mode 100644 index 0000000000..a4b12ee069 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block prop_1_697c8f64d854e5a824cb735c81d9b7ea.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph right aligned\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2E0WvxqliRTS23U2A9Q3rIYQcT\",\n \"object\": \"chat.completion\",\n \"created\": 1747170062,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_kPnsZC5ifB5vd0gH9ktWwaYA\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"right\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1159,\n \"completion_tokens\": 60,\n \"total_tokens\": 1219,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_6b93af6e60c455fec9f8bde5b44e587d.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_6b93af6e60c455fec9f8bde5b44e587d.json new file mode 100644 index 0000000000..b25226e00c --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type and content_1_6b93af6e60c455fec9f8bde5b44e587d.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2F2e7S9PJz4QirHiSIluh9pUXD\",\n \"object\": \"chat.completion\",\n \"created\": 1747170063,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_NGDYHqgFZY2DnrusIl7RcevD\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"type\\\":\\\"heading\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"What's up, world!\\\"}],\\\"props\\\":{\\\"level\\\":1}}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1170,\n \"completion_tokens\": 45,\n \"total_tokens\": 1215,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_fd7ea265becc91c2e55258021a82a016.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_fd7ea265becc91c2e55258021a82a016.json new file mode 100644 index 0000000000..2a99e292c0 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (non-streaming)/update block type_1_fd7ea265becc91c2e55258021a82a016.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}]}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "{\n \"id\": \"chatcmpl-BWr2D4x64mp1RUCel6WJfyfEbyXKu\",\n \"object\": \"chat.completion\",\n \"created\": 1747170061,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_HSsmerEzlbVcZxh9eFH94ejx\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"json\",\n \"arguments\": \"{\\\"operations\\\":[{\\\"type\\\":\\\"update\\\",\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"type\\\":\\\"heading\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}],\\\"props\\\":{\\\"level\\\":1}}}]}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1159,\n \"completion_tokens\": 48,\n \"total_tokens\": 1207,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 1152,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_d8864f8b6b\"\n}\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/clear block formatting_1_e9409ed44af8d5b1f3ec7d3b7125386a.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/clear block formatting_1_e9409ed44af8d5b1f3ec7d3b7125386a.json new file mode 100644 index 0000000000..abe205f3e3 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/clear block formatting_1_e9409ed44af8d5b1f3ec7d3b7125386a.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"red\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Colored text\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"right\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Aligned text\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"clear the formatting (colors and alignment)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_IdmQkUYiftaUuMtOrrGpsV3R\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Colored\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Aligned\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr241857RaEoeWLZ8cPJxcZ2Zlq3\",\"object\":\"chat.completion.chunk\",\"created\":1747170052,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_35579261c0f297cf664524f0c5e08ff1.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_35579261c0f297cf664524f0c5e08ff1.json new file mode 100644 index 0000000000..b2905a613c --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link and change text within mark_1_35579261c0f297cf664524f0c5e08ff1.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_drti56WxXTZbyFFWV8dEQBj1\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"3\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hi\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Bold\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" the\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\".\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Link\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\".\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr20mHV7hBlkdyHRXhIcszeCc0yi\",\"object\":\"chat.completion.chunk\",\"created\":1747170048,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_d7303b2c5a80c7a016ba6caa2ae7be04.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_d7303b2c5a80c7a016ba6caa2ae7be04.json new file mode 100644 index 0000000000..d87e498b7b --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/drop mark and link_1_d7303b2c5a80c7a016ba6caa2ae7be04.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the formatting (turn into plain text without styles or urls) from the last paragraph\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_RCDZZuvhsUpThBuXDH9Rknjr\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"3\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Bold\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\".\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Link\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\".\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1zMH3MBYmVmZcRCsrLcowB1dD2\",\"object\":\"chat.completion.chunk\",\"created\":1747170047,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_55d150e200dccb9c1ac1b325aa8d5a43.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_55d150e200dccb9c1ac1b325aa8d5a43.json new file mode 100644 index 0000000000..1175c8b8fa --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify nested content_1_55d150e200dccb9c1ac1b325aa8d5a43.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"I need to buy:\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Apples\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make apples uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_cmKz9ixUz4VoINOkUaa97MrD\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"APP\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"LES\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr229nE9OomK57nqBbVjt1iohgAT\",\"object\":\"chat.completion.chunk\",\"created\":1747170050,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_34fba8f0eb2af6cd8d1af416390d9dc4.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_34fba8f0eb2af6cd8d1af416390d9dc4.json new file mode 100644 index 0000000000..dc64c8fc06 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/modify parent content_1_34fba8f0eb2af6cd8d1af416390d9dc4.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"I need to buy:\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Apples\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph uppercase\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_GvzDUxoJXCBP9llRqzP9YR4A\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"I\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" NEED\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" TO\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" BUY\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr23aumkXt8G3kOydyxHXX6aagDt\",\"object\":\"chat.completion.chunk\",\"created\":1747170051,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_ae41cefb5832864a8a9b2e67c04c65b4.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_ae41cefb5832864a8a9b2e67c04c65b4.json new file mode 100644 index 0000000000..d1f13d06ef --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/plain source block, add mention_1_ae41cefb5832864a8a9b2e67c04c65b4.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"Change the first paragraph to Hello, Jane Doe! (use a mention)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_nhuvx7T4Cp8mZhcbTh2381qy\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"mention\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"props\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"user\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Jane\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Doe\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1tzJ8hPMUiPhqJ05L4auwDazd2\",\"object\":\"chat.completion.chunk\",\"created\":1747170041,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_a7a20bf9510adbbafe889498aa22f0ce.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_a7a20bf9510adbbafe889498aa22f0ce.json new file mode 100644 index 0000000000..1cb4c1411b --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/standard update_1_a7a20bf9510adbbafe889498aa22f0ce.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the first paragraph to german\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_rOVU6tCc46CvpKIzVcmAfFc4\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hallo\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Welt\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1gATibTlH8BAYyUToBRGYMYfSP\",\"object\":\"chat.completion.chunk\",\"created\":1747170028,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_db2880a42dbde80ff9950f502ef1ab8f.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_db2880a42dbde80ff9950f502ef1ab8f.json new file mode 100644 index 0000000000..5623de114a --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mark_1_db2880a42dbde80ff9950f502ef1ab8f.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"remove the bold style from the second block\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_78nlx7HJ7G2yBSqYOyiA53wb\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"mention\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"props\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"user\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"John\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Doe\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"How\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" are\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" you\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" doing\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"?\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"This\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" is\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Color\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"],\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"props\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Color\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"default\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"background\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Color\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"default\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Alignment\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"left\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1oz45R2qP3OkequMNprEbQ0gOH\",\"object\":\"chat.completion.chunk\",\"created\":1747170036,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_48523af48bae8448f99a3d4108bb8a55.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_48523af48bae8448f99a3d4108bb8a55.json new file mode 100644 index 0000000000..43711a84d5 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, remove mention_1_48523af48bae8448f99a3d4108bb8a55.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_IfainOSSQ57DXPoTy37xGbVh\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"How\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" are\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" you\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" doing\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"?\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"bold\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"true\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}},\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"This\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" is\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Color\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1pJbamqlopP9HRtAF6oCLKXuDA\",\"object\":\"chat.completion.chunk\",\"created\":1747170037,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_024c55cd1b3177f362a2d606090ca19a.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_024c55cd1b3177f362a2d606090ca19a.json new file mode 100644 index 0000000000..a1a3a5365c --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, replace content_1_024c55cd1b3177f362a2d606090ca19a.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the content of the second block to 'Hello, updated content'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_CsAeebREelm6qyfvQuZNXduk\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" updated\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1mLwS7cmp0rBVmz9uZuiChbcaH\",\"object\":\"chat.completion.chunk\",\"created\":1747170034,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_549dd0fe54084e4a98588be963db9361.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_549dd0fe54084e4a98588be963db9361.json new file mode 100644 index 0000000000..b643a07868 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update mention prop_1_549dd0fe54084e4a98588be963db9361.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"update the mention to Jane Doe\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_9JOdQydbiGOHDNE59BB7bAWq\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"mention\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"props\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"user\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Jane\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Doe\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"How\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" are\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" you\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" doing\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"?\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"bold\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"true\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}},\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"This\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" is\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Color\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1uXKWU7hTwyq1qaUN7Vvl4jRue\",\"object\":\"chat.completion.chunk\",\"created\":1747170042,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_dbf2fb610e354e0daa60de0cbdd77aba.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_dbf2fb610e354e0daa60de0cbdd77aba.json new file mode 100644 index 0000000000..64f58c3a69 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in source block, update text_1_dbf2fb610e354e0daa60de0cbdd77aba.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate the second block to german (use dir instead of Ihnen)\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_xwZpuJRlj9aGUbdkEybGiCFz\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hallo\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"mention\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"props\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"user\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"John\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Doe\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Wie\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" geht\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" es\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" dir\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"?\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"bold\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"true\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}},\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Dieser\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" ist\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" blau\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Color\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"blue\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1n4UAFFYYdHxWMLqoLJBtqiHnx\",\"object\":\"chat.completion.chunk\",\"created\":1747170035,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_8369c3cd3da93d0e734ed7092c0acf40.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_8369c3cd3da93d0e734ed7092c0acf40.json new file mode 100644 index 0000000000..554e52d2c4 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (paragraph)_1_8369c3cd3da93d0e734ed7092c0acf40.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make first paragraph bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_o41zbRsl9ksfftYZUvYuM1HT\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"bold\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"true\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1sLJYMxn0euqs7mKZzgdVlkfWR\",\"object\":\"chat.completion.chunk\",\"created\":1747170040,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_7033d19147879fada8c8142ee2be4803.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_7033d19147879fada8c8142ee2be4803.json new file mode 100644 index 0000000000..eb57334ea2 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/styles + ic in target block, add mark (word)_1_7033d19147879fada8c8142ee2be4803.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make 'world!' (in the first block) bold\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_jWrmwvNMfxM1Gg87zYTlQtac\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"bold\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"true\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1rdxQxrg4cpdSKtk6pRpHpnb3j\",\"object\":\"chat.completion.chunk\",\"created\":1747170039,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/translate selection_1_3f8ef537734ef9b7d2142c49bde8cbdd.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/translate selection_1_3f8ef537734ef9b7d2142c49bde8cbdd.json new file mode 100644 index 0000000000..a4a63795d9 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/translate selection_1_3f8ef537734ef9b7d2142c49bde8cbdd.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using JSON blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n This is the selection as an array of JSON blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello\\\",\\\"styles\\\":{}}],\\\"children\\\":[]}}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"translate to German\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_l4sixuVM0IMdPWcrgQhfTpwQ\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hallo\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1hB6PXzeiMq8PggMQ1lyTtQwpV\",\"object\":\"chat.completion.chunk\",\"created\":1747170029,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_f8fd91cad88cfec6db2a906b564d39d3.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_f8fd91cad88cfec6db2a906b564d39d3.json new file mode 100644 index 0000000000..31c32ca8d2 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/turn paragraphs into list_1_f8fd91cad88cfec6db2a906b564d39d3.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a selected part of a text document using JSON blocks. \\n Make sure to follow the json schema provided and always include the trailing $ in ids. \\n This is the selection as an array of JSON blocks:\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Apples\\\",\\\"styles\\\":{}}],\\\"children\\\":[]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bananas\\\",\\\"styles\\\":{}}],\\\"children\\\":[]}}]\"},{\"role\":\"system\",\"content\":\"This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:\"},{\"role\":\"system\",\"content\":\"[{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"I need to buy:\\\",\\\"styles\\\":{}}]}},{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Apples\\\",\\\"styles\\\":{}}]}},{\\\"block\\\":{\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bananas\\\",\\\"styles\\\":{}}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"turn into list (update existing blocks)\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_rhwZMhwBsPGv6zO3MdOpg6zx\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"2\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"bullet\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"List\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Item\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Ap\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ples\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"},{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"3\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"bullet\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"List\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Item\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Ban\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"anas\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr21IOdPVM1xeOpxEg7fksEB2jTo\",\"object\":\"chat.completion.chunk\",\"created\":1747170049,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_55d88aaf2f\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_708c779a29da274a24e34cea53755e3b.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_708c779a29da274a24e34cea53755e3b.json new file mode 100644 index 0000000000..234e682cb8 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop and content_1_708c779a29da274a24e34cea53755e3b.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph right aligned and update the content to 'What's up, world!'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_ufuN825KOmCW9W4QGmzbrzcN\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"props\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Alignment\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"right\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"What's\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" up\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1lddXS5DYZtCNtuMGxWgJNx2uB\",\"object\":\"chat.completion.chunk\",\"created\":1747170033,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop_1_67d9ce65ebaaf76b1dde8492176299fc.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop_1_67d9ce65ebaaf76b1dde8492176299fc.json new file mode 100644 index 0000000000..1efcc446cb --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block prop_1_67d9ce65ebaaf76b1dde8492176299fc.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph right aligned\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_FBQol3RfRsGyFqeQulH8CHq1\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"paragraph\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"props\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Color\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"default\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"background\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Color\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"default\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Alignment\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"right\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1j6PrtSiuZXeDNG6O1WsylqO6I\",\"object\":\"chat.completion.chunk\",\"created\":1747170031,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_f9b7241b0cb9e9e098e13a58b47bfa62.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_f9b7241b0cb9e9e098e13a58b47bfa62.json new file mode 100644 index 0000000000..546ca62387 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type and content_1_f9b7241b0cb9e9e098e13a58b47bfa62.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading and update the content to 'What's up, world!'\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_61qIRsV49e6jjQ8iwyMlfSTW\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"heading\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"What's\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" up\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"],\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"props\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"level\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1kq8sSSH78R1APM1FaZCkM5cl3\",\"object\":\"chat.completion.chunk\",\"created\":1747170032,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_dbb1b2b807becf642bb03a71e34b8e21.json b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_dbb1b2b807becf642bb03a71e34b8e21.json new file mode 100644 index 0000000000..170bfcff12 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/__snapshots__/json.test.ts/Update/__msw_snapshots__/openai.chat/gpt-4o-2024-08-06 (streaming)/update block type_1_dbb1b2b807becf642bb03a71e34b8e21.json @@ -0,0 +1,15 @@ +{ + "request": { + "method": "POST", + "url": "https://localhost:3000/ai?provider=openai&url=https%3A%2F%2Fapi.openai.com%2Fv1%2Fchat%2Fcompletions", + "body": "{\"model\":\"gpt-4o-2024-08-06\",\"temperature\":0,\"messages\":[{\"role\":\"system\",\"content\":\"You're manipulating a text document using JSON blocks. \\n Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). \\n This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):\"},{\"role\":\"system\",\"content\":\"[{\\\"id\\\":\\\"ref1$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref1\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world!\\\",\\\"styles\\\":{}}]}},{\\\"cursor\\\":true},{\\\"id\\\":\\\"ref2$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref2\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"mention\\\",\\\"props\\\":{\\\"user\\\":\\\"John Doe\\\"}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"How are you doing?\\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\" \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"This text is blue!\\\",\\\"styles\\\":{\\\"textColor\\\":\\\"blue\\\"}}]}},{\\\"id\\\":\\\"ref3$\\\",\\\"block\\\":{\\\"id\\\":\\\"ref3\\\",\\\"type\\\":\\\"paragraph\\\",\\\"props\\\":{\\\"textColor\\\":\\\"default\\\",\\\"backgroundColor\\\":\\\"default\\\",\\\"textAlignment\\\":\\\"left\\\"},\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Hello, world! \\\",\\\"styles\\\":{}},{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Bold text. \\\",\\\"styles\\\":{\\\"bold\\\":true}},{\\\"type\\\":\\\"link\\\",\\\"href\\\":\\\"https://www.google.com\\\",\\\"content\\\":[{\\\"type\\\":\\\"text\\\",\\\"text\\\":\\\"Link.\\\",\\\"styles\\\":{}}]}]}}]\"},{\"role\":\"system\",\"content\":\"The user asks you to do the following:\"},{\"role\":\"user\",\"content\":\"make the first paragraph a heading\"},{\"role\":\"system\",\"content\":\"First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed.\\n EXAMPLE: if user says \\\"below\\\" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. \\n EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need `referenceId` to point to the block before the cursor with position `after` (or block below and `before`).\\n \\n Prefer updating blocks over adding or removing (but this also depends on the user's question).\"}],\"tool_choice\":{\"type\":\"function\",\"function\":{\"name\":\"json\"}},\"tools\":[{\"type\":\"function\",\"function\":{\"name\":\"json\",\"description\":\"Respond with a JSON object.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"operations\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"description\":\"Update a block, the new block will replace the existing block.\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to update\"},\"block\":{\"$ref\":\"#/$defs/block\"}},\"required\":[\"type\",\"id\",\"block\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Insert new blocks\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"add\"]},\"referenceId\":{\"type\":\"string\",\"description\":\"MUST be an id of a block in the document\"},\"position\":{\"type\":\"string\",\"enum\":[\"before\",\"after\"],\"description\":\"`after` to add blocks AFTER (below) the block with `referenceId`, `before` to add the block BEFORE (above)\"},\"blocks\":{\"items\":{\"$ref\":\"#/$defs/block\"},\"type\":\"array\"}},\"required\":[\"type\",\"referenceId\",\"position\",\"blocks\"],\"additionalProperties\":false},{\"type\":\"object\",\"description\":\"Delete a block\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"delete\"]},\"id\":{\"type\":\"string\",\"description\":\"id of block to delete\"}},\"required\":[\"type\",\"id\"],\"additionalProperties\":false}]}}},\"additionalProperties\":false,\"required\":[\"operations\"],\"$defs\":{\"styles\":{\"type\":\"object\",\"properties\":{\"bold\":{\"type\":\"boolean\"},\"italic\":{\"type\":\"boolean\"},\"underline\":{\"type\":\"boolean\"},\"strike\":{\"type\":\"boolean\"},\"code\":{\"type\":\"boolean\"},\"textColor\":{\"type\":\"string\"},\"backgroundColor\":{\"type\":\"string\"}},\"additionalProperties\":false},\"styledtext\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"text\"]},\"text\":{\"type\":\"string\"},\"styles\":{\"$ref\":\"#/$defs/styles\"}},\"additionalProperties\":false,\"required\":[\"type\",\"text\"]},\"inlinecontent\":{\"type\":\"array\",\"items\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mention\"]},\"props\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"$ref\":\"#/$defs/styledtext\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"link\"]},\"content\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/$defs/styledtext\"}},\"href\":{\"type\":\"string\"}},\"additionalProperties\":false,\"required\":[\"type\",\"href\",\"content\"]}]}},\"block\":{\"anyOf\":[{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"paragraph\",\"quote\",\"bulletListItem\",\"numberedListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"heading\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"level\":{\"type\":\"number\",\"enum\":[1,2,3]}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"codeBlock\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"language\":{\"type\":\"string\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"checkListItem\"]},\"content\":{\"$ref\":\"#/$defs/inlinecontent\"},\"props\":{\"type\":\"object\",\"properties\":{\"checked\":{\"type\":\"boolean\"}},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"table\"]},\"content\":{\"type\":\"object\",\"properties\":{}},\"props\":{\"type\":\"object\",\"properties\":{},\"additionalProperties\":false}},\"additionalProperties\":false,\"required\":[\"type\"]}]}}}}}],\"stream\":true}", + "headers": [], + "cookies": [] + }, + "response": { + "status": 200, + "statusText": "", + "body": "data: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_1RDlNuzYxSLsO4IkZ02NO65C\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"operations\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"update\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"id\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ref\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"$\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"block\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"heading\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"content\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":[\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"type\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"text\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Hello\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" world\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"!\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"styles\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"],\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"props\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"level\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"1\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"]}\"}}]},\"logprobs\":null,\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-BWr1iY6CLhgZ4w6MTsDEFS9RzVTbz\",\"object\":\"chat.completion.chunk\",\"created\":1747170030,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_d8864f8b6b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n", + "headers": [] + } +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/formats/json/defaultJSONPromptBuilder.ts b/packages/xl-ai/src/api/formats/json/defaultJSONPromptBuilder.ts new file mode 100644 index 0000000000..73b18cd464 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/defaultJSONPromptBuilder.ts @@ -0,0 +1,100 @@ +import { CoreMessage } from "ai"; +import { PromptBuilder } from "../PromptBuilder.js"; +import { + getDataForPromptNoSelection, + getDataForPromptWithSelection, +} from "./jsonPromptData.js"; + +function promptManipulateSelectionJSONBlocks(opts: { + userPrompt: string; + jsonSelectedBlocks: any[]; + jsonDocument: any[]; +}): Array { + return [ + { + role: "system", + content: `You're manipulating a selected part of a text document using JSON blocks. + Make sure to follow the json schema provided and always include the trailing $ in ids. + This is the selection as an array of JSON blocks:`, + }, + { + role: "system", + content: JSON.stringify(opts.jsonSelectedBlocks), + }, + + { + role: "system", + content: + "This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:", + }, + { + role: "system", + content: JSON.stringify(opts.jsonDocument), + }, + { + role: "system", + content: "The user asks you to do the following:", + }, + { + role: "user", + content: opts.userPrompt, + }, + ]; +} + +function promptManipulateDocumentUseJSONBlocks(opts: { + userPrompt: string; + jsonBlocks: Array< + | any + | { + cursor: true; + } + >; +}): Array { + return [ + { + role: "system", + content: `You're manipulating a text document using JSON blocks. + Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). + This is the document as an array of JSON blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):`, + }, + { + role: "system", + content: JSON.stringify(opts.jsonBlocks), + }, + { + role: "system", + content: "The user asks you to do the following:", + }, + { + role: "user", + content: opts.userPrompt, + }, + { + role: "system", + content: `First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed. + EXAMPLE: if user says "below" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. + EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need \`referenceId\` to point to the block before the cursor with position \`after\` (or block below and \`before\`). + + Prefer updating blocks over adding or removing (but this also depends on the user's question).`, + }, + ]; +} + +export const defaultJSONPromptBuilder: PromptBuilder = async (editor, opts) => { + if (opts.selectedBlocks) { + const data = await getDataForPromptWithSelection(editor, { + selectedBlocks: opts.selectedBlocks, + }); + return promptManipulateSelectionJSONBlocks({ + ...data, + userPrompt: opts.userPrompt, + }); + } else { + const data = await getDataForPromptNoSelection(editor, opts); + return promptManipulateDocumentUseJSONBlocks({ + ...data, + userPrompt: opts.userPrompt, + }); + } +}; diff --git a/packages/xl-ai/src/api/formats/json/errorHandling.test.ts b/packages/xl-ai/src/api/formats/json/errorHandling.test.ts new file mode 100644 index 0000000000..5edee6b452 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/errorHandling.test.ts @@ -0,0 +1,94 @@ +import { afterAll, afterEach, beforeAll, describe, expect, it } from "vitest"; + +import { createOpenAI } from "@ai-sdk/openai"; +import { BlockNoteEditor } from "@blocknote/core"; +import { HttpResponse, http } from "msw"; +import { setupServer } from "msw/node"; +import { createBlockNoteAIClient } from "../../../blocknoteAIClient/client.js"; +import { doLLMRequest } from "../../LLMRequest.js"; +import { jsonLLMFormat } from "./json.js"; + +// Create client and models outside of test suites so they can be shared +const client = createBlockNoteAIClient({ + baseURL: "https://localhost:3000/ai", + apiKey: "PLACEHOLDER", +}); + +const openai = createOpenAI({ + ...client.getProviderSettings("openai"), +})("gpt-4o-2024-08-06", {}); + +// Separate test suite for error handling with its own server +describe("Error handling", () => { + // Create a separate server for error tests with custom handlers + const errorServer = setupServer(); + + beforeAll(() => { + errorServer.listen(); + }); + + afterAll(() => { + errorServer.close(); + }); + + afterEach(() => { + errorServer.resetHandlers(); + }); + + it("handles 429 Too Many Requests error", async () => { + // Set up handler for this specific test + errorServer.use( + http.post("*", () => { + return new HttpResponse( + JSON.stringify({ + error: { + message: "Rate limit exceeded, please try again later", + type: "rate_limit_exceeded", + code: "rate_limit_exceeded", + }, + }), + { + status: 429, + headers: { + "Content-Type": "application/json", + }, + }, + ); + }), + ); + + const editor = BlockNoteEditor.create({ + initialContent: [ + { + type: "paragraph", + content: "Hello world", + }, + ], + }); + + // Use a flag to track if an error was thrown + let errorThrown = false; + let caughtError: any = null; + + try { + const result = await doLLMRequest(editor, { + stream: true, + userPrompt: "translate to Spanish", + model: openai, + maxRetries: 0, + dataFormat: jsonLLMFormat, + }); + await result.execute(); + } catch (error: any) { + errorThrown = true; + caughtError = error; + } + + // Assertions outside the try/catch + expect(errorThrown).toBe(true); + expect(caughtError).toBeDefined(); + expect(caughtError.message || caughtError.toString()).toContain( + "Rate limit exceeded, please try again later", + ); + }); +}); diff --git a/packages/xl-ai/src/api/formats/json/json.test.ts b/packages/xl-ai/src/api/formats/json/json.test.ts new file mode 100644 index 0000000000..540c56d0f1 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/json.test.ts @@ -0,0 +1,127 @@ +import { afterAll, afterEach, beforeAll, describe } from "vitest"; + +import { getCurrentTest } from "@vitest/runner"; +import { getSortedEntries, snapshot, toHashString } from "msw-snapshot"; +import { setupServer } from "msw/node"; +import path from "path"; +import { generateSharedTestCases } from "../tests/sharedTestCases.js"; + +import { testAIModels } from "../../../testUtil/testAIModels.js"; +import { doLLMRequest } from "../../LLMRequest.js"; +import { jsonLLMFormat } from "./json.js"; + +const BASE_FILE_PATH = path.resolve( + __dirname, + "__snapshots__", + path.basename(__filename), +); + +const fetchCountMap: Record = {}; + +async function createRequestHash(req: Request) { + const url = new URL(req.url); + return [ + // url.host, + // url.pathname, + toHashString([ + req.method, + url.origin, + url.pathname, + getSortedEntries(url.searchParams), + getSortedEntries(req.headers), + // getSortedEntries(req.cookies), + new TextDecoder("utf-8").decode(await req.arrayBuffer()), + ]), + ].join("/"); +} + +// Main test suite with snapshot middleware +describe("Models", () => { + // Define server with snapshot middleware for the main tests + const server = setupServer( + snapshot({ + updateSnapshots: "missing", + // updateSnapshots: "all", + // ignoreSnapshots: true, + async createSnapshotPath(info) { + // use a unique path for each model + const t = getCurrentTest()!; + const mswPath = path.join( + t.suite!.name, // same directory as the test snapshot + "__msw_snapshots__", + t.suite!.suite!.name, // model / streaming params + t.name, + ); + // in case there are multiple requests in a test, we need to use a separate snapshot for each request + fetchCountMap[mswPath] = (fetchCountMap[mswPath] || 0) + 1; + const hash = await createRequestHash(info.request); + return mswPath + `_${fetchCountMap[mswPath]}_${hash}.json`; + }, + basePath: BASE_FILE_PATH, + // onFetchFromSnapshot(info, snapshot) { + // console.log("onFetchFromSnapshot", info, snapshot); + // }, + // onFetchFromServer(info, snapshot) { + // console.log("onFetchFromServer", info, snapshot); + // }, + }), + ); + + beforeAll(() => { + server.listen(); + }); + + afterAll(() => { + server.close(); + }); + + afterEach(() => { + delete (window as Window & { __TEST_OPTIONS?: any }).__TEST_OPTIONS; + }); + + const testMatrix = [ + { + model: testAIModels.openai, + stream: true, + }, + { + model: testAIModels.openai, + stream: false, + }, + // this model doesn't work well with json format + // { + // model: testAIModels.groq, + // stream: true, + // }, + // { + // model: testAIModels.groq, + // stream: false, + // }, + // this model doesn't work well with json format + // { + // model: albert, + // stream: true, + // }, + // { + // model: albert, + // stream: false, + // }, + ]; + + for (const params of testMatrix) { + describe(`${params.model.provider}/${params.model.modelId} (${ + params.stream ? "streaming" : "non-streaming" + })`, () => { + generateSharedTestCases((editor, options) => + doLLMRequest(editor, { + ...options, + stream: params.stream, + model: params.model, + maxRetries: 0, + withDelays: false, + dataFormat: jsonLLMFormat, + }), + ); + }); + } +}); diff --git a/packages/xl-ai/src/api/formats/json/json.ts b/packages/xl-ai/src/api/formats/json/json.ts new file mode 100644 index 0000000000..cceba2d5c3 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/json.ts @@ -0,0 +1,71 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { StreamTool } from "../../../streamTool/streamTool.js"; +import { defaultJSONPromptBuilder } from "./defaultJSONPromptBuilder.js"; +import { + getDataForPromptNoSelection, + getDataForPromptWithSelection, +} from "./jsonPromptData.js"; +import { tools } from "./tools/index.js"; + +function getStreamTools( + editor: BlockNoteEditor, + withDelays: boolean, + defaultStreamTools?: { + /** Enable the add tool (default: true) */ + add?: boolean; + /** Enable the update tool (default: true) */ + update?: boolean; + /** Enable the delete tool (default: true) */ + delete?: boolean; + }, + selectionInfo?: { + from: number; + to: number; + }, +) { + const mergedStreamTools = { + add: true, + update: true, + delete: true, + ...defaultStreamTools, + }; + + const streamTools: StreamTool[] = [ + ...(mergedStreamTools.update + ? [ + tools.update(editor, { + idsSuffixed: true, + withDelays, + updateSelection: selectionInfo, + }), + ] + : []), + ...(mergedStreamTools.add + ? [tools.add(editor, { idsSuffixed: true, withDelays })] + : []), + ...(mergedStreamTools.delete + ? [tools.delete(editor, { idsSuffixed: true, withDelays })] + : []), + ]; + + return streamTools; +} + +export const jsonLLMFormat = { + /** + * Function to get the stream tools that can apply BlockNote JSON block updates to the editor + */ + getStreamTools, + /** + * The default PromptBuilder that determines how a userPrompt is converted to an array of + * LLM Messages (CoreMessage[]) + */ + defaultPromptBuilder: defaultJSONPromptBuilder, + /** + * Helper functions which can be used when implementing a custom PromptBuilder + */ + promptHelpers: { + getDataForPromptNoSelection, + getDataForPromptWithSelection, + }, +}; diff --git a/packages/xl-ai/src/api/formats/json/jsonPromptData.ts b/packages/xl-ai/src/api/formats/json/jsonPromptData.ts new file mode 100644 index 0000000000..72480f929f --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/jsonPromptData.ts @@ -0,0 +1,60 @@ +import { Block, BlockNoteEditor } from "@blocknote/core"; +import { addCursorPosition } from "../../promptHelpers/addCursorPosition.js"; +import { convertBlocks } from "../../promptHelpers/convertBlocks.js"; +import { flattenBlocks } from "../../promptHelpers/flattenBlocks.js"; +import { suffixIDs } from "../../promptHelpers/suffixIds.js"; +import { trimEmptyBlocks } from "../../promptHelpers/trimEmptyBlocks.js"; + +export async function getDataForPromptNoSelection( + editor: BlockNoteEditor, + opts: { + excludeBlockIds?: string[]; + }, +) { + const input = trimEmptyBlocks(editor.document); + const blockArray = await convertBlocks( + flattenBlocks(input), + async (block) => { + return { + ...block, + children: undefined, + }; + }, + ); + const withCursor = addCursorPosition(editor, blockArray); + const filtered = withCursor.filter( + (b) => "cursor" in b || !(opts.excludeBlockIds || []).includes(b.id), + ); + const suffixed = suffixIDs(filtered); + return { + jsonBlocks: suffixed, + }; +} + +export async function getDataForPromptWithSelection( + editor: BlockNoteEditor, + opts: { + selectedBlocks: Block[]; + }, +) { + const blockArray = await convertBlocks( + flattenBlocks(opts.selectedBlocks), + async (block) => { + return block; + }, + ); + const suffixed = suffixIDs(blockArray); + + return { + jsonSelectedBlocks: suffixed, + jsonDocument: ( + await convertBlocks(flattenBlocks(editor.document), async (block) => { + return { + ...block, + id: undefined, // don't pass id, because LLM should use `jsonSelectedBlocks` for this + children: undefined, + }; + }) + ).map(({ block }) => ({ block })), // strip ids so LLM can't accidentally issue updates to ids not in selection + }; +} diff --git a/packages/xl-ai/src/api/formats/json/tools/index.ts b/packages/xl-ai/src/api/formats/json/tools/index.ts new file mode 100644 index 0000000000..820e3e6aa4 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/tools/index.ts @@ -0,0 +1,62 @@ +import { defaultProps, type PartialBlock } from "@blocknote/core"; +import { + getApplySuggestionsTr, + rebaseTool, +} from "../../../../prosemirror/rebaseTool.js"; +import { blockNoteSchemaToJSONSchema } from "../../../schema/schemaToJSONSchema.js"; +import { createAddBlocksTool } from "../../base-tools/createAddBlocksTool.js"; +import { createUpdateBlockTool } from "../../base-tools/createUpdateBlockTool.js"; +import { deleteBlockTool } from "../../base-tools/delete.js"; +import { validateBlockFunction } from "./validate.js"; + +export const tools = { + add: createAddBlocksTool>({ + description: "Insert new blocks", + schema: (editor) => ({ + block: { + $ref: "#/$defs/block", + }, + ...(blockNoteSchemaToJSONSchema(editor.schema) as any), + }), + validateBlock: validateBlockFunction, + rebaseTool: async (_id, editor) => + rebaseTool(editor, getApplySuggestionsTr(editor)), + toJSONToolCall: async (_editor, chunk) => { + return chunk.operation; + }, + }), + update: createUpdateBlockTool>({ + description: + "Update a block, the new block will replace the existing block.", + schema: (editor) => ({ + block: { + $ref: "#/$defs/block", + }, + ...(blockNoteSchemaToJSONSchema(editor.schema) as any), + }), + validateBlock: validateBlockFunction, + rebaseTool: async (_id, editor) => + rebaseTool(editor, getApplySuggestionsTr(editor)), + toJSONToolCall: async (_editor, chunk) => { + const defaultPropsVals = Object.fromEntries( + Object.entries(defaultProps).map(([key, val]) => { + return [key, val.default]; + }), + ); + + return { + ...chunk.operation, + block: { + ...chunk.operation.block, + props: { + ...defaultPropsVals, + ...chunk.operation.block.props, + }, + }, + }; + }, + }), + delete: deleteBlockTool, +}; + +export type Tools = ReturnType<(typeof tools)[keyof typeof tools]>; diff --git a/packages/xl-ai/src/api/formats/json/tools/jsontools.test.ts b/packages/xl-ai/src/api/formats/json/tools/jsontools.test.ts new file mode 100644 index 0000000000..065a09b5ac --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/tools/jsontools.test.ts @@ -0,0 +1,122 @@ +/* eslint-disable jest/valid-title */ +import { BlockNoteEditor } from "@blocknote/core"; +import { describe, expect, it } from "vitest"; +import { addOperationTestCases } from "../../../../testUtil/cases/addOperationTestCases.js"; +import { combinedOperationsTestCases } from "../../../../testUtil/cases/combinedOperationsTestCases.js"; +import { deleteOperationTestCases } from "../../../../testUtil/cases/deleteOperationTestCases.js"; +import { DocumentOperationTestCase } from "../../../../testUtil/cases/index.js"; +import { updateOperationTestCases } from "../../../../testUtil/cases/updateOperationTestCases.js"; +import { createAsyncIterableStreamFromAsyncIterable } from "../../../../util/stream.js"; +import { LLMResponse } from "../../../LLMResponse.js"; +import { AddBlocksToolCall } from "../../base-tools/createAddBlocksTool.js"; +import { UpdateBlockToolCall } from "../../base-tools/createUpdateBlockTool.js"; +import { DeleteBlockToolCall } from "../../base-tools/delete.js"; +import { tools } from "./index.js"; + +// Helper function to create a mock stream from operations +import { getAIExtension } from "../../../../AIExtension.js"; +import { getExpectedEditor } from "../../../../testUtil/cases/index.js"; +import { validateRejectingResultsInOriginalDoc } from "../../../../testUtil/suggestChangesTestUtil.js"; +async function* createMockStream( + ...operations: { + operation: + | AddBlocksToolCall + | UpdateBlockToolCall + | DeleteBlockToolCall; + isUpdateToPreviousOperation?: boolean; + isPossiblyPartial?: boolean; + }[] +) { + for (const op of operations) { + yield { + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + ...op, + }; + } +} +// Helper function to process operations and return results +async function executeTestCase( + editor: BlockNoteEditor, + testCase: DocumentOperationTestCase, +) { + const originalDoc = editor.prosemirrorState.doc; + const streamTools = [ + tools.add(editor, { idsSuffixed: true, withDelays: false }), + tools.update(editor, { + idsSuffixed: true, + withDelays: false, + updateSelection: testCase.getTestSelection?.(editor), + }), + tools.delete(editor, { idsSuffixed: true, withDelays: false }), + ]; + + const stream = createMockStream( + ...testCase.baseToolCalls.map((u) => ({ operation: u })), + ); + + // bit hacky way to instantiate an LLMResponse just so we can call execute + const result = new LLMResponse( + undefined as any, + { + operationsSource: createAsyncIterableStreamFromAsyncIterable(stream), + streamObjectResult: undefined, + generateObjectResult: undefined, + getGeneratedOperations: undefined as any, + }, + streamTools, + ); + + await result.execute(); + + validateRejectingResultsInOriginalDoc(editor, originalDoc); + + getAIExtension(editor).acceptChanges(); + expect(editor.document).toEqual(getExpectedEditor(testCase).document); + + return result; +} + +describe("Add", () => { + for (const testCase of addOperationTestCases) { + it(testCase.description, async () => { + const editor = testCase.editor(); + + await executeTestCase(editor, testCase); + }); + } +}); + +describe("Update", () => { + for (const testCase of updateOperationTestCases) { + it(testCase.description, async () => { + const editor = testCase.editor(); + + await executeTestCase(editor, testCase); + }); + } +}); + +describe("Delete", () => { + for (const testCase of deleteOperationTestCases) { + it(testCase.description, async () => { + const editor = testCase.editor(); + const startDocLength = editor.document.length; + await executeTestCase(editor, testCase); + + expect(editor.document.length).toBe( + startDocLength - testCase.baseToolCalls.length, + ); + }); + } +}); + +describe("Combined", () => { + for (const testCase of combinedOperationsTestCases) { + it(testCase.description, async () => { + const editor = testCase.editor(); + + await executeTestCase(editor, testCase); + }); + } +}); diff --git a/packages/xl-ai/src/api/formats/json/tools/validate.ts b/packages/xl-ai/src/api/formats/json/tools/validate.ts new file mode 100644 index 0000000000..10d95d0599 --- /dev/null +++ b/packages/xl-ai/src/api/formats/json/tools/validate.ts @@ -0,0 +1,107 @@ +import { + BlockNoteEditor, + PartialBlock, + isLinkInlineContent, + isStyledTextInlineContent, +} from "@blocknote/core"; +import { Result } from "../../../../streamTool/streamTool.js"; + +function validateInlineContent(content: any, editor: any): boolean { + const inlineContentConfig = + editor.schema.inlineContentSchema[ + content.type as keyof typeof editor.schema.inlineContentSchema + ]; + + if (!inlineContentConfig) { + return false; + } + + if (isStyledTextInlineContent(content)) { + if (!("text" in content)) { + return false; + } + } + + if (isLinkInlineContent(content)) { + if (!("content" in content) || !("href" in content)) { + return false; + } + + return validateInlineContent(content.content, editor); + } + + // TODO: custom ic content + return true; +} + +export function validateBlockFunction( + block: any, + editor: BlockNoteEditor, + fallbackType?: string, +): Result> { + const type = block.type || fallbackType; + const blockConfig = + editor.schema.blockSchema[type as keyof typeof editor.schema.blockSchema]; + + if (!blockConfig) { + return { + ok: false, + error: "block type not found in editor", + }; + } + + if (block.children) { + // LLM tools are not supposed to edit children at this moment + // return false; TODO, bringing this back breaks markdown tests + } + + if (blockConfig.content === "none") { + if (block.content) { + // no content expected for this block + return { + ok: false, + error: "block content not expected for this block type", + }; + } + } else { + if (!block.content) { + // return false; + return { + ok: true, + value: block, + }; + } + + if (!Array.isArray(block.content)) { + // content expected for this block + return { + ok: false, + error: "block content must be an array", + }; + } + + if (blockConfig.content === "table") { + // no validation for table content (TODO) + return { + ok: true, + value: block, + }; + } + + if ( + !(block.content as []).every((content: any) => { + return validateInlineContent(content, editor); + }) + ) { + return { + ok: false, + error: "block content must be an array of inline content", + }; + } + } + // TODO: validate props + return { + ok: true, + value: block, + }; +} diff --git a/packages/xl-ai/src/api/formats/markdown-blocks/defaultMarkdownPromptBuilder.ts b/packages/xl-ai/src/api/formats/markdown-blocks/defaultMarkdownPromptBuilder.ts new file mode 100644 index 0000000000..5d76927ec1 --- /dev/null +++ b/packages/xl-ai/src/api/formats/markdown-blocks/defaultMarkdownPromptBuilder.ts @@ -0,0 +1,111 @@ +import { CoreMessage } from "ai"; +import { PromptBuilder } from "../PromptBuilder.js"; +import { + getDataForPromptNoSelection, + getDataForPromptWithSelection, +} from "./markdownPromptData.js"; + +function promptManipulateSelectionMarkdownBlocks(opts: { + userPrompt: string; + markdownSelectedBlocks: { + id: string; + block: string; + }[]; + markdownDocument: { + block: string; + }[]; +}): Array { + return [ + { + role: "system", + content: `You're manipulating a selected part of a text document using markdown blocks. + Make sure to follow the json schema provided and always include the trailing $ in ids. + This is the selection as an array of markdown blocks:`, + }, + { + role: "system", + content: JSON.stringify(opts.markdownSelectedBlocks), + }, + + { + role: "system", + content: + "This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:", + }, + { + role: "system", + content: JSON.stringify(opts.markdownDocument), + }, + { + role: "system", + content: "The user asks you to do the following:", + }, + { + role: "user", + content: opts.userPrompt, + }, + ]; +} + +function promptManipulateDocumentUseMarkdownBlocks(opts: { + userPrompt: string; + markdownBlocks: Array< + | { + id: string; + block: string; + } + | { + cursor: true; + } + >; +}): Array { + return [ + { + role: "system", + content: `You're manipulating a text document using markdown blocks. + Make sure to follow the json schema provided. When referencing ids they MUST be EXACTLY the same (including the trailing $). + This is the document as an array of markdown blocks (the cursor is BETWEEN two blocks as indicated by cursor: true):`, + }, + { + role: "system", + content: JSON.stringify(opts.markdownBlocks), + }, + { + role: "system", + content: "The user asks you to do the following:", + }, + { + role: "user", + content: opts.userPrompt, + }, + { + role: "system", + content: `First, determine what part of the document the user is talking about. You SHOULD probably take cursor info into account if needed. + EXAMPLE: if user says "below" (without pointing to a specific part of the document) he / she probably indicates the block(s) after the cursor. + EXAMPLE: If you want to insert content AT the cursor position (UNLESS indicated otherwise by the user), then you need \`referenceId\` to point to the block before the cursor with position \`after\` (or block below and \`before\`). + + Prefer updating blocks over adding or removing (but this also depends on the user's question).`, + }, + ]; +} + +export const defaultMarkdownPromptBuilder: PromptBuilder = async ( + editor, + opts, +) => { + if (opts.selectedBlocks) { + const data = await getDataForPromptWithSelection(editor, { + selectedBlocks: opts.selectedBlocks, + }); + return promptManipulateSelectionMarkdownBlocks({ + ...data, + userPrompt: opts.userPrompt, + }); + } else { + const data = await getDataForPromptNoSelection(editor, opts); + return promptManipulateDocumentUseMarkdownBlocks({ + ...data, + userPrompt: opts.userPrompt, + }); + } +}; diff --git a/packages/xl-ai/src/api/formats/markdown-blocks/markdownBlocks.test.ts b/packages/xl-ai/src/api/formats/markdown-blocks/markdownBlocks.test.ts new file mode 100644 index 0000000000..4bb89079f6 --- /dev/null +++ b/packages/xl-ai/src/api/formats/markdown-blocks/markdownBlocks.test.ts @@ -0,0 +1,138 @@ +import { afterAll, afterEach, beforeAll, describe } from "vitest"; + +import { getCurrentTest } from "@vitest/runner"; +import { getSortedEntries, snapshot, toHashString } from "msw-snapshot"; +import { setupServer } from "msw/node"; +import path from "path"; +import { testAIModels } from "../../../testUtil/testAIModels.js"; +import { doLLMRequest } from "../../LLMRequest.js"; +import { generateSharedTestCases } from "../tests/sharedTestCases.js"; +import { markdownBlocksLLMFormat } from "./markdownBlocks.js"; + +const BASE_FILE_PATH = path.resolve( + __dirname, + "__snapshots__", + path.basename(__filename), +); + +const fetchCountMap: Record = {}; + +async function createRequestHash(req: Request) { + const url = new URL(req.url); + return [ + // url.host, + // url.pathname, + toHashString([ + req.method, + url.origin, + url.pathname, + getSortedEntries(url.searchParams), + getSortedEntries(req.headers), + // getSortedEntries(req.cookies), + new TextDecoder("utf-8").decode(await req.arrayBuffer()), + ]), + ].join("/"); +} + +// Main test suite with snapshot middleware +describe("Models", () => { + // Define server with snapshot middleware for the main tests + const server = setupServer( + snapshot({ + updateSnapshots: "missing", + // onSnapshotUpdated: "all", + // ignoreSnapshots: true, + async createSnapshotPath(info) { + // use a unique path for each model + const t = getCurrentTest()!; + const mswPath = path.join( + t.suite!.name, // same directory as the test snapshot + "__msw_snapshots__", + t.suite!.suite!.name, // model / streaming params + t.name, + ); + // in case there are multiple requests in a test, we need to use a separate snapshot for each request + fetchCountMap[mswPath] = (fetchCountMap[mswPath] || 0) + 1; + const hash = await createRequestHash(info.request); + return mswPath + `_${fetchCountMap[mswPath]}_${hash}.json`; + }, + basePath: BASE_FILE_PATH, + // onFetchFromSnapshot(info, snapshot) { + // console.log("onFetchFromSnapshot", info, snapshot); + // }, + // onFetchFromServer(info, snapshot) { + // console.log("onFetchFromServer", info, snapshot); + // }, + }), + ); + + beforeAll(() => { + server.listen(); + }); + + afterAll(() => { + server.close(); + }); + + afterEach(() => { + delete (window as Window & { __TEST_OPTIONS?: any }).__TEST_OPTIONS; + }); + + const testMatrix = [ + { + model: testAIModels.openai, + stream: true, + }, + { + model: testAIModels.openai, + stream: false, + }, + { + model: testAIModels.groq, + stream: true, + }, + { + model: testAIModels.groq, + stream: false, + }, + { + model: testAIModels.albert, + stream: true, + }, + { + model: testAIModels.albert, + stream: false, + }, + ]; + + for (const params of testMatrix) { + // SKIP: prefer html blocks over markdown blocks for now + describe.skip(`${params.model.provider}/${params.model.modelId} (${ + params.stream ? "streaming" : "non-streaming" + })`, () => { + generateSharedTestCases( + (editor, options) => + doLLMRequest(editor, { + ...options, + model: params.model, + maxRetries: 0, + stream: params.stream, + withDelays: false, + dataFormat: markdownBlocksLLMFormat, + // _generateObjectOptions: { + // providerOptions: { + // "albert-etalab": { + // guided_decoding_backend: "outlines", + // }, + // }, + // }, + }), + // markdownblocks doesn't support these: + { + mentions: true, + textAlignment: true, + }, + ); + }); + } +}); diff --git a/packages/xl-ai/src/api/formats/markdown-blocks/markdownBlocks.ts b/packages/xl-ai/src/api/formats/markdown-blocks/markdownBlocks.ts new file mode 100644 index 0000000000..3b0af6c164 --- /dev/null +++ b/packages/xl-ai/src/api/formats/markdown-blocks/markdownBlocks.ts @@ -0,0 +1,71 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { StreamTool } from "../../../streamTool/streamTool.js"; +import { defaultMarkdownPromptBuilder } from "./defaultMarkdownPromptBuilder.js"; +import { + getDataForPromptNoSelection, + getDataForPromptWithSelection, +} from "./markdownPromptData.js"; +import { tools } from "./tools/index.js"; + +function getStreamTools( + editor: BlockNoteEditor, + withDelays: boolean, + defaultStreamTools?: { + /** Enable the add tool (default: true) */ + add?: boolean; + /** Enable the update tool (default: true) */ + update?: boolean; + /** Enable the delete tool (default: true) */ + delete?: boolean; + }, + selectionInfo?: { + from: number; + to: number; + }, +) { + const mergedStreamTools = { + add: true, + update: true, + delete: true, + ...defaultStreamTools, + }; + + const streamTools: StreamTool[] = [ + ...(mergedStreamTools.update + ? [ + tools.update(editor, { + idsSuffixed: true, + withDelays, + updateSelection: selectionInfo, + }), + ] + : []), + ...(mergedStreamTools.add + ? [tools.add(editor, { idsSuffixed: true, withDelays })] + : []), + ...(mergedStreamTools.delete + ? [tools.delete(editor, { idsSuffixed: true, withDelays })] + : []), + ]; + + return streamTools; +} + +export const markdownBlocksLLMFormat = { + /** + * Function to get the stream tools that can apply BlockNote Markdown block updates to the editor + */ + getStreamTools, + /** + * The default PromptBuilder that determines how a userPrompt is converted to an array of + * LLM Messages (CoreMessage[]) + */ + defaultPromptBuilder: defaultMarkdownPromptBuilder, + /** + * Helper functions which can be used when implementing a custom PromptBuilder + */ + promptHelpers: { + getDataForPromptNoSelection, + getDataForPromptWithSelection, + }, +}; diff --git a/packages/xl-ai/src/api/formats/markdown-blocks/markdownPromptData.ts b/packages/xl-ai/src/api/formats/markdown-blocks/markdownPromptData.ts new file mode 100644 index 0000000000..5b983dc7c1 --- /dev/null +++ b/packages/xl-ai/src/api/formats/markdown-blocks/markdownPromptData.ts @@ -0,0 +1,51 @@ +import { Block, BlockNoteEditor } from "@blocknote/core"; +import { addCursorPosition } from "../../promptHelpers/addCursorPosition.js"; +import { convertBlocks } from "../../promptHelpers/convertBlocks.js"; +import { flattenBlocks } from "../../promptHelpers/flattenBlocks.js"; +import { suffixIDs } from "../../promptHelpers/suffixIds.js"; +import { trimEmptyBlocks } from "../../promptHelpers/trimEmptyBlocks.js"; + +export async function getDataForPromptNoSelection( + editor: BlockNoteEditor, + opts: { + excludeBlockIds?: string[]; + }, +) { + const input = trimEmptyBlocks(editor.document); + const blockArray = await convertBlocks( + flattenBlocks(input), + async (block) => { + return editor.blocksToMarkdownLossy([block]); + }, + ); + const withCursor = addCursorPosition(editor, blockArray); + const filtered = withCursor.filter( + (b) => "cursor" in b || !(opts.excludeBlockIds || []).includes(b.id), + ); + const suffixed = suffixIDs(filtered); + return { + markdownBlocks: suffixed, + }; +} + +export async function getDataForPromptWithSelection( + editor: BlockNoteEditor, + opts: { selectedBlocks: Block[] }, +) { + const blockArray = await convertBlocks( + flattenBlocks(opts.selectedBlocks), + async (block) => { + return editor.blocksToMarkdownLossy([block]); + }, + ); + const suffixed = suffixIDs(blockArray); + + return { + markdownSelectedBlocks: suffixed, + markdownDocument: ( + await convertBlocks(flattenBlocks(editor.document), async (block) => { + return editor.blocksToMarkdownLossy([block]); + }) + ).map(({ block }) => ({ block })), // strip ids so LLM can't accidentally issue updates to ids not in selection + }; +} diff --git a/packages/xl-ai/src/api/formats/markdown-blocks/tools/index.ts b/packages/xl-ai/src/api/formats/markdown-blocks/tools/index.ts new file mode 100644 index 0000000000..65913fb7d0 --- /dev/null +++ b/packages/xl-ai/src/api/formats/markdown-blocks/tools/index.ts @@ -0,0 +1,82 @@ +import { PartialBlock } from "@blocknote/core"; +import { + AddBlocksToolCall, + createAddBlocksTool, +} from "../../base-tools/createAddBlocksTool.js"; +import { + createUpdateBlockTool, + UpdateBlockToolCall, +} from "../../base-tools/createUpdateBlockTool.js"; +import { deleteBlockTool } from "../../base-tools/delete.js"; +import { createMDRebaseTool } from "./rebaseTool.js"; +import { validateBlockFunction } from "./validate.js"; + +export const tools = { + add: createAddBlocksTool({ + description: "Insert new blocks", + schema: { + block: { + $ref: "#/$defs/block", + }, + $defs: { + block: { type: "string", description: "markdown of block" }, + }, + }, + validateBlock: validateBlockFunction, + rebaseTool: createMDRebaseTool, + toJSONToolCall: async (editor, chunk) => { + const blocks = await Promise.all( + chunk.operation.blocks.map(async (md) => { + const block = (await editor.tryParseMarkdownToBlocks(md.trim()))[0]; // TODO: trim + delete (block as any).id; + return block; + }), + ); + + // hacky + if ((window as any).__TEST_OPTIONS) { + (window as Window & { __TEST_OPTIONS?: any }).__TEST_OPTIONS.mockID = + undefined; + } + + return { + ...chunk.operation, + blocks, + } satisfies AddBlocksToolCall>; + }, + }), + update: createUpdateBlockTool({ + description: + "Update a block, the new block will replace the existing block.", + schema: { + block: { + $ref: "#/$defs/block", + }, + $defs: { + block: { type: "string", description: "markdown of block" }, + }, + }, + validateBlock: validateBlockFunction, + rebaseTool: createMDRebaseTool, + toJSONToolCall: async (editor, chunk) => { + const block = ( + await editor.tryParseMarkdownToBlocks(chunk.operation.block.trim()) + )[0]; + + delete (block as any).id; + // console.log("update", operation.block); + // console.log("md", block); + // hacky + if ((window as any).__TEST_OPTIONS) { + (window as Window & { __TEST_OPTIONS?: any }).__TEST_OPTIONS.mockID = + undefined; + } + + return { + ...chunk.operation, + block, + } satisfies UpdateBlockToolCall>; + }, + }), + delete: deleteBlockTool, +}; diff --git a/packages/xl-ai/src/api/formats/markdown-blocks/tools/rebaseTool.ts b/packages/xl-ai/src/api/formats/markdown-blocks/tools/rebaseTool.ts new file mode 100644 index 0000000000..49be094011 --- /dev/null +++ b/packages/xl-ai/src/api/formats/markdown-blocks/tools/rebaseTool.ts @@ -0,0 +1,35 @@ +import { BlockNoteEditor, getBlock } from "@blocknote/core"; +import { Mapping } from "prosemirror-transform"; +import { updateToReplaceSteps } from "../../../../prosemirror/changeset.js"; +import { + getApplySuggestionsTr, + rebaseTool, +} from "../../../../prosemirror/rebaseTool.js"; + +export async function createMDRebaseTool( + id: string, + editor: BlockNoteEditor, +) { + const tr = getApplySuggestionsTr(editor); + const md = await editor.blocksToMarkdownLossy([getBlock(tr.doc, id)!]); + const blocks = await editor.tryParseMarkdownToBlocks(md); + + const steps = updateToReplaceSteps( + { + id, + block: blocks[0], + }, + tr.doc, + ); + + const stepMapping = new Mapping(); + for (const step of steps) { + const mapped = step.map(stepMapping); + if (!mapped) { + throw new Error("Failed to map step"); + } + tr.step(mapped); + stepMapping.appendMap(mapped.getMap()); + } + return rebaseTool(editor, tr); +} diff --git a/packages/xl-ai/src/api/formats/markdown-blocks/tools/validate.ts b/packages/xl-ai/src/api/formats/markdown-blocks/tools/validate.ts new file mode 100644 index 0000000000..3468cdd80f --- /dev/null +++ b/packages/xl-ai/src/api/formats/markdown-blocks/tools/validate.ts @@ -0,0 +1,15 @@ +import { Result } from "../../../../streamTool/streamTool.js"; + +export function validateBlockFunction(block: any): Result { + if (typeof block !== "string") { + return { + ok: false, + error: "block must be a string", + }; + } + + return { + ok: true, + value: block, + }; +} diff --git a/packages/xl-ai/src/api/formats/tests/sharedTestCases.ts b/packages/xl-ai/src/api/formats/tests/sharedTestCases.ts new file mode 100644 index 0000000000..a2026ff442 --- /dev/null +++ b/packages/xl-ai/src/api/formats/tests/sharedTestCases.ts @@ -0,0 +1,151 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { getCurrentTest, TaskContext } from "@vitest/runner"; +import path from "path"; +import { TextSelection } from "prosemirror-state"; +import { describe, expect, it } from "vitest"; +import { getAIExtension } from "../../../AIExtension.js"; +import { addOperationTestCases } from "../../../testUtil/cases/addOperationTestCases.js"; +import { combinedOperationsTestCases } from "../../../testUtil/cases/combinedOperationsTestCases.js"; +import { deleteOperationTestCases } from "../../../testUtil/cases/deleteOperationTestCases.js"; +import { + DocumentOperationTestCase, + getExpectedEditor, +} from "../../../testUtil/cases/index.js"; +import { updateOperationTestCases } from "../../../testUtil/cases/updateOperationTestCases.js"; +import { validateRejectingResultsInOriginalDoc } from "../../../testUtil/suggestChangesTestUtil.js"; +import { LLMResponse } from "../../LLMResponse.js"; + +const BASE_FILE_PATH = path.resolve(__dirname, "__snapshots__"); + +// @ts-ignore +// eslint-disable-next-line @typescript-eslint/no-unused-vars +async function matchFileSnapshot(data: any, postFix = "") { + const t = getCurrentTest()!; + // this uses the same snapshot path, regardless of the model / streaming params + await expect(data).toMatchFileSnapshot( + path.resolve( + BASE_FILE_PATH, + t.suite!.name, + t.name + (postFix ? `_${postFix}` : "") + ".json", + ), + ); +} + +export function generateSharedTestCases( + callLLM: ( + editor: BlockNoteEditor, + params: { userPrompt: string; useSelection?: boolean }, + ) => Promise, + skipTestsRequiringCapabilities?: { + mentions?: boolean; + textAlignment?: boolean; + blockColor?: boolean; + }, +) { + function skipIfUnsupported( + test: DocumentOperationTestCase, + context: TaskContext, + ) { + if ( + skipTestsRequiringCapabilities && + Object.keys(test.requiredCapabilities || {}).some( + (c) => + skipTestsRequiringCapabilities[ + c as keyof typeof skipTestsRequiringCapabilities + ] === true, + ) + ) { + context.skip(); + } + } + + async function executeTestCase( + editor: BlockNoteEditor, + test: DocumentOperationTestCase, + ) { + const selection = test.getTestSelection?.(editor); + + if (selection) { + editor.transact((tr) => { + tr.setSelection( + TextSelection.create(tr.doc, selection.from, selection.to), + ); + }); + } + + const originalDoc = editor.prosemirrorState.doc; + + const result = await callLLM(editor, { + userPrompt: test.userPrompt, + useSelection: selection !== undefined, + }); + + // await result._logToolCalls(); + await result.execute(); + + // the prosemirrorState has all details with suggested changes + // This can be used for snapshots, but currently we've disabled this as there can + // be small differences between for example streaming and non-streaming results in the + // granularity of the suggested changes. Can be enabled for debugging: + + // await matchFileSnapshot(editor.prosemirrorState.doc.toJSON()); + + validateRejectingResultsInOriginalDoc(editor, originalDoc); + + // we first need to accept changes to get the correct result + getAIExtension(editor).acceptChanges(); + expect(editor.document).toEqual( + getExpectedEditor(test, { + deleteEmptyCursorBlock: true, + }).document, + ); + } + + describe("Add", () => { + for (const test of addOperationTestCases) { + it(test.description, async (c) => { + skipIfUnsupported(test, c); + + const editor = test.editor(); + + await executeTestCase(editor, test); + }); + } + }); + + describe("Update", () => { + for (const test of updateOperationTestCases) { + it(test.description, async (c) => { + skipIfUnsupported(test, c); + + const editor = test.editor(); + + await executeTestCase(editor, test); + }); + } + }); + + describe("Delete", () => { + for (const test of deleteOperationTestCases) { + it(test.description, async (c) => { + skipIfUnsupported(test, c); + + const editor = test.editor(); + + await executeTestCase(editor, test); + }); + } + }); + + describe("Combined", () => { + for (const test of combinedOperationsTestCases) { + it(test.description, async (c) => { + skipIfUnsupported(test, c); + + const editor = test.editor(); + + await executeTestCase(editor, test); + }); + } + }); +} diff --git a/packages/xl-ai/src/api/formats/tests/validateTestEnvironment.test.ts b/packages/xl-ai/src/api/formats/tests/validateTestEnvironment.test.ts new file mode 100644 index 0000000000..79960f3342 --- /dev/null +++ b/packages/xl-ai/src/api/formats/tests/validateTestEnvironment.test.ts @@ -0,0 +1,81 @@ +import * as glob from "glob"; +import path from "path"; +import { describe, expect, it } from "vitest"; + +/** + * We should only have one snapshot file per test, this test ensures that + * + * If this test fails, you probably changed something in the request to an LLM. + * This causes MSW to generate a new snapshot (with a different hash). + * If that's intended, make sure to delete the old snapshot files. + */ +describe("MSW Snapshots", () => { + it("should only have one snapshot file per test", async () => { + const snapshotFiles = glob.sync( + path.join(__dirname, "../**/__msw_snapshots__/**/*.json"), + ); + + // Group files by test name (excluding the sequence number and hash) + const testGroups: Record = {}; + + for (const file of snapshotFiles) { + // Extract the base name (removing the _1_, _2_ etc. and hash) + const match = file.match(/(.*)_\d+_[a-f0-9]+\.json$/); + if (match) { + const baseName = match[1]; + if (!testGroups[baseName]) { + testGroups[baseName] = []; + } + testGroups[baseName].push(file); + } else { + throw new Error(`Invalid snapshot file: ${file}`); + } + } + + // Filter and get tests with multiple snapshot files + const duplicates = Object.entries(testGroups) + .filter(([_, files]) => files.length > 1) + .map(([testName, files]) => ({ + testName: path.basename(testName), + count: files.length, + files: files.map((file) => path.basename(file)), + })); + + // Create error message if duplicates are found + const errorMessage = + duplicates.length > 0 + ? [ + `Found duplicate MSW snapshot files for the following (${duplicates.length}) tests:`, + ...duplicates.map( + ({ testName, count, files }) => + ` - ${testName}: ${count} files\n ${files.join("\n ")}`, + ), + "", + "Each test should have only one snapshot file.", + "Please clean up the duplicate snapshots by keeping only the most relevant one for each test.", + ].join("\n") + : ""; + + // Throw an error with the message if duplicates found + if (duplicates.length > 0) { + throw new Error(errorMessage); + } + }); +}); + +describe("Test environment", () => { + it("should have certs installed to connect to localhost", () => { + expect(process.env.NODE_EXTRA_CA_CERTS).toBeDefined(); + + /* if this test fails, maybe you're running tests via vscode extension? + + You'll need: + + "vitest.nodeEnv": { + "NODE_EXTRA_CA_CERTS": "/Users/USERNAME/Library/Application Support/mkcert/rootCA.pem" + } + + in your vscode settings (or other path to mkcert rootCA.pem) + */ + }); +}); diff --git a/packages/xl-ai/src/api/index.ts b/packages/xl-ai/src/api/index.ts new file mode 100644 index 0000000000..1f25d707bf --- /dev/null +++ b/packages/xl-ai/src/api/index.ts @@ -0,0 +1,40 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { StreamTool } from "../streamTool/streamTool.js"; +import { htmlBlockLLMFormat } from "./formats/html-blocks/htmlBlocks.js"; +import { jsonLLMFormat } from "./formats/json/json.js"; +import { markdownBlocksLLMFormat } from "./formats/markdown-blocks/markdownBlocks.js"; +import { PromptBuilder } from "./formats/PromptBuilder.js"; + +export type LLMFormat = { + /** + * Function to get the stream tools that can apply HTML block updates to the editor + */ + getStreamTools: ( + editor: BlockNoteEditor, + withDelays: boolean, + defaultStreamTools?: { + add?: boolean; + update?: boolean; + delete?: boolean; + }, + selectionInfo?: { + from: number; + to: number; + }, + onBlockUpdate?: (blockId: string) => void, + ) => StreamTool[]; + /** + * The default PromptBuilder that determines how a userPrompt is converted to an array of + * LLM Messages (CoreMessage[]) + */ + defaultPromptBuilder: PromptBuilder; +}; + +export const llmFormats = { + _experimental_json: jsonLLMFormat, + _experimental_markdown: markdownBlocksLLMFormat, + html: htmlBlockLLMFormat, +}; + +export { doLLMRequest as callLLM } from "./LLMRequest.js"; +export { promptHelpers } from "./promptHelpers/index.js"; diff --git a/packages/xl-ai/src/api/promptHelpers/addCursorPosition.ts b/packages/xl-ai/src/api/promptHelpers/addCursorPosition.ts new file mode 100644 index 0000000000..8d357dd620 --- /dev/null +++ b/packages/xl-ai/src/api/promptHelpers/addCursorPosition.ts @@ -0,0 +1,34 @@ +import { BlockNoteEditor } from "@blocknote/core"; + +type BlocksWithCursor = { + id: string; + block: T; +} | { + cursor: true; +} + +export function addCursorPosition(editor: BlockNoteEditor, source: Array<{ + id: string; + block: T; +}>): Array> +{ + const cursorPosition = editor.getTextCursorPosition(); + const ret: Array> = []; + + for (const block of source) { + const isBlockWithCursor = block.id === cursorPosition.block.id; + + ret.push({ + id: block.id, + block: block.block, + }); + + if (isBlockWithCursor) { + ret.push({ + cursor: true, + }); + } + } + + return ret; +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/promptHelpers/convertBlocks.ts b/packages/xl-ai/src/api/promptHelpers/convertBlocks.ts new file mode 100644 index 0000000000..a8ff6953fb --- /dev/null +++ b/packages/xl-ai/src/api/promptHelpers/convertBlocks.ts @@ -0,0 +1,13 @@ +import { Block } from "@blocknote/core"; + +export async function convertBlocks(source: Block[], mapFn: (block: Block) => Promise): Promise> { + return await Promise.all(source.map(async (block) => { + return { + id: block.id, + block: await mapFn(block), + }; + })); +} \ No newline at end of file diff --git a/packages/xl-ai/src/api/promptHelpers/flattenBlocks.ts b/packages/xl-ai/src/api/promptHelpers/flattenBlocks.ts new file mode 100644 index 0000000000..fda10be133 --- /dev/null +++ b/packages/xl-ai/src/api/promptHelpers/flattenBlocks.ts @@ -0,0 +1,13 @@ +import { Block } from "@blocknote/core"; + +export function flattenBlocks( + source: Block[], +): Array> { + return source.flatMap((block) => [ + { + ...block, + children: [], + }, + ...flattenBlocks(block.children), + ]); +} diff --git a/packages/xl-ai/src/api/promptHelpers/index.ts b/packages/xl-ai/src/api/promptHelpers/index.ts new file mode 100644 index 0000000000..d02ad75dfd --- /dev/null +++ b/packages/xl-ai/src/api/promptHelpers/index.ts @@ -0,0 +1,13 @@ +import { addCursorPosition } from "./addCursorPosition.js"; +import { convertBlocks } from "./convertBlocks.js"; +import { flattenBlocks } from "./flattenBlocks.js"; +import { suffixIDs } from "./suffixIds.js"; +import { trimEmptyBlocks } from "./trimEmptyBlocks.js"; + +export const promptHelpers = { + addCursorPosition, + flattenBlocks, + suffixIDs, + trimEmptyBlocks, + convertBlocks, +}; diff --git a/packages/xl-ai/src/api/promptHelpers/suffixIds.ts b/packages/xl-ai/src/api/promptHelpers/suffixIds.ts new file mode 100644 index 0000000000..632c1ffb62 --- /dev/null +++ b/packages/xl-ai/src/api/promptHelpers/suffixIds.ts @@ -0,0 +1,11 @@ +export function suffixIDs(source: Array): Array { + return source.map((el) => { + if (typeof el === "object" && el && "id" in el) { + return { + ...el, + id: `${el.id}$`, + }; + } + return el; + }); +} diff --git a/packages/xl-ai/src/api/promptHelpers/trimEmptyBlocks.ts b/packages/xl-ai/src/api/promptHelpers/trimEmptyBlocks.ts new file mode 100644 index 0000000000..b992912baa --- /dev/null +++ b/packages/xl-ai/src/api/promptHelpers/trimEmptyBlocks.ts @@ -0,0 +1,25 @@ +import { Block } from "@blocknote/core"; +import { isEmptyParagraph } from "../../util/emptyBlock.js"; +import { trimArray } from "../../util/trimArray.js"; + +export function trimEmptyBlocks( + source: Block[], + opts?: { + trimStart?: boolean; + trimEnd?: boolean; + }, +) { + // trim empty trailing blocks that don't have the cursor + // if we don't do this, commands like "add some paragraphs" + // would add paragraphs after the trailing blocks + const trimmedSource = trimArray( + source, + (block) => { + return isEmptyParagraph(block); + }, + opts?.trimStart ?? false, + opts?.trimEnd ?? true, + ); + + return trimmedSource; +} diff --git a/packages/xl-ai/src/api/schema/JSONSchema.ts b/packages/xl-ai/src/api/schema/JSONSchema.ts new file mode 100644 index 0000000000..f0061aedca --- /dev/null +++ b/packages/xl-ai/src/api/schema/JSONSchema.ts @@ -0,0 +1,8 @@ +export type SimpleJSONObjectSchema = { + type: "object"; + properties: { + [key: string]: any; + }; + required?: string[]; + additionalProperties?: boolean; +}; diff --git a/packages/xl-ai/src/api/schema/__snapshots__/schemaToJSONSchema.test.ts.snap b/packages/xl-ai/src/api/schema/__snapshots__/schemaToJSONSchema.test.ts.snap new file mode 100644 index 0000000000..818662b135 --- /dev/null +++ b/packages/xl-ai/src/api/schema/__snapshots__/schemaToJSONSchema.test.ts.snap @@ -0,0 +1,235 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`creates json schema 1`] = ` +{ + "$defs": { + "block": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "content": { + "$ref": "#/$defs/inlinecontent", + }, + "props": { + "additionalProperties": false, + "properties": {}, + "type": "object", + }, + "type": { + "enum": [ + "paragraph", + "quote", + "bulletListItem", + "numberedListItem", + ], + "type": "string", + }, + }, + "required": [ + "type", + ], + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "content": { + "$ref": "#/$defs/inlinecontent", + }, + "props": { + "additionalProperties": false, + "properties": { + "level": { + "enum": [ + 1, + 2, + 3, + ], + "type": "number", + }, + }, + "type": "object", + }, + "type": { + "enum": [ + "heading", + ], + "type": "string", + }, + }, + "required": [ + "type", + ], + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "content": { + "$ref": "#/$defs/inlinecontent", + }, + "props": { + "additionalProperties": false, + "properties": { + "language": { + "enum": undefined, + "type": "string", + }, + }, + "type": "object", + }, + "type": { + "enum": [ + "codeBlock", + ], + "type": "string", + }, + }, + "required": [ + "type", + ], + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "content": { + "$ref": "#/$defs/inlinecontent", + }, + "props": { + "additionalProperties": false, + "properties": { + "checked": { + "enum": undefined, + "type": "boolean", + }, + }, + "type": "object", + }, + "type": { + "enum": [ + "checkListItem", + ], + "type": "string", + }, + }, + "required": [ + "type", + ], + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "content": { + "properties": {}, + "type": "object", + }, + "props": { + "additionalProperties": false, + "properties": {}, + "type": "object", + }, + "type": { + "enum": [ + "table", + ], + "type": "string", + }, + }, + "required": [ + "type", + ], + "type": "object", + }, + ], + }, + "inlinecontent": { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/styledtext", + }, + { + "additionalProperties": false, + "properties": { + "content": { + "items": { + "$ref": "#/$defs/styledtext", + }, + "type": "array", + }, + "href": { + "type": "string", + }, + "type": { + "enum": [ + "link", + ], + "type": "string", + }, + }, + "required": [ + "type", + "href", + "content", + ], + "type": "object", + }, + ], + }, + "type": "array", + }, + "styledtext": { + "additionalProperties": false, + "properties": { + "styles": { + "$ref": "#/$defs/styles", + }, + "text": { + "type": "string", + }, + "type": { + "enum": [ + "text", + ], + "type": "string", + }, + }, + "required": [ + "type", + "text", + ], + "type": "object", + }, + "styles": { + "additionalProperties": false, + "properties": { + "backgroundColor": { + "type": "string", + }, + "bold": { + "type": "boolean", + }, + "code": { + "type": "boolean", + }, + "italic": { + "type": "boolean", + }, + "strike": { + "type": "boolean", + }, + "textColor": { + "type": "string", + }, + "underline": { + "type": "boolean", + }, + }, + "type": "object", + }, + }, +} +`; diff --git a/packages/xl-ai/src/api/schema/mergeSchema.ts b/packages/xl-ai/src/api/schema/mergeSchema.ts new file mode 100644 index 0000000000..d402eefcd2 --- /dev/null +++ b/packages/xl-ai/src/api/schema/mergeSchema.ts @@ -0,0 +1,121 @@ +import type { SimpleJSONObjectSchema } from "./JSONSchema.js"; + +/** + * Merges schemas that only differ by the "type" field. + * @param schemas The array of schema objects to be processed. + * @returns A new array with merged schema objects where applicable. + */ +export function mergeSchemas( + schemas: SimpleJSONObjectSchema[], +): SimpleJSONObjectSchema[] { + const groupedSchemas: { [signature: string]: string[] } = {}; + const signatureToSchema: { [signature: string]: SimpleJSONObjectSchema } = {}; + + schemas.forEach((schemaObj) => { + // Extract the schema properties except for the "type" field + const { type, ...rest } = schemaObj.properties; + const schemaSignature = JSON.stringify(rest); // Generate a signature for comparison + + // If the signature already exists, add the "type" to the enum + if (groupedSchemas[schemaSignature]) { + groupedSchemas[schemaSignature].push(type.enum[0]); + } else { + // Create a new group if it doesn't exist + groupedSchemas[schemaSignature] = [type.enum[0]]; + signatureToSchema[schemaSignature] = schemaObj; + } + }); + + // Create the new merged schema array + const mergedSchemas: SimpleJSONObjectSchema[] = Object.keys( + groupedSchemas, + ).map((signature) => { + const baseSchema = signatureToSchema[signature]; + return { + ...baseSchema, + properties: { + ...baseSchema.properties, + type: { + type: "string", + enum: groupedSchemas[signature], + }, + }, + }; + }); + + return mergedSchemas; +} + +// // Example usage: +// const exampleSchemas: Schema[] = [ +// { +// type: "object", +// properties: { +// type: { type: "string", enum: ["paragraph"] }, +// content: { $ref: "#/$defs/inlinecontent" }, +// props: { +// type: "object", +// properties: { +// backgroundColor: { type: "string" }, +// textColor: { type: "string" }, +// textAlignment: { +// type: "string", +// enum: ["left", "center", "right", "justify"], +// }, +// }, +// additionalProperties: false, +// }, +// }, +// additionalProperties: false, +// required: ["type"], +// }, +// { +// type: "object", +// properties: { +// type: { type: "string", enum: ["bulletListItem"] }, +// content: { $ref: "#/$defs/inlinecontent" }, +// props: { +// type: "object", +// properties: { +// backgroundColor: { type: "string" }, +// textColor: { type: "string" }, +// textAlignment: { +// type: "string", +// enum: ["left", "center", "right", "justify"], +// }, +// }, +// additionalProperties: false, +// }, +// }, +// additionalProperties: false, +// required: ["type"], +// }, +// { +// type: "object", +// properties: { +// type: { type: "string", enum: ["heading"] }, +// content: { $ref: "#/$defs/inlinecontent" }, +// props: { +// type: "object", +// properties: { +// backgroundColor: { type: "string" }, +// textColor: { type: "string" }, +// textAlignment: { +// type: "string", +// enum: ["left", "center", "right", "justify"], +// }, +// level: { +// type: "number", +// enum: [1, 2, 3], +// }, +// }, +// additionalProperties: false, +// }, +// }, +// additionalProperties: false, +// required: ["type"], +// }, +// ]; + +// const mergedSchemas = mergeSchemas(exampleSchemas); +// console.log(JSON.stringify(mergedSchemas, null, 2)); diff --git a/packages/xl-ai/src/api/schema/schemaToJSONSchema.test.ts b/packages/xl-ai/src/api/schema/schemaToJSONSchema.test.ts new file mode 100644 index 0000000000..f66c1090d4 --- /dev/null +++ b/packages/xl-ai/src/api/schema/schemaToJSONSchema.test.ts @@ -0,0 +1,12 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { expect, it } from "vitest"; +import { blockNoteSchemaToJSONSchema } from "./schemaToJSONSchema.js"; + +it("creates json schema", async () => { + // eslint-disable-next-line no-console + const editor = BlockNoteEditor.create(); + + const jsonSchema = blockNoteSchemaToJSONSchema(editor.schema); + await expect(jsonSchema).toMatchSnapshot(); + // console.log(JSON.stringify(blockNoteSchemaToJSONSchema(editor.schema), undefined, 2)); +}); diff --git a/packages/xl-ai/src/api/schema/schemaToJSONSchema.ts b/packages/xl-ai/src/api/schema/schemaToJSONSchema.ts new file mode 100644 index 0000000000..615a71268c --- /dev/null +++ b/packages/xl-ai/src/api/schema/schemaToJSONSchema.ts @@ -0,0 +1,306 @@ +import { + BlockNoteSchema, + BlockSchema, + InlineContentSchema, + PropSchema, + StyleSchema, + defaultProps, +} from "@blocknote/core"; +import { SimpleJSONObjectSchema } from "./JSONSchema.js"; +import { mergeSchemas } from "./mergeSchema.js"; +/* +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": ["paragraph", "heading"] + }, + "props": { + "type": "object", + "properties": { + "textColor": { + "type": "string", + "enum": ["default"] + }, + "backgroundColor": { + "type": "string", + "enum": ["default"] + }, + "textAlignment": { + "type": "string", + "enum": ["left"] + }, + "level": { + "type": "integer", + "minimum": 1, + "maximum": 6 + } + }, + "required": ["textColor", "backgroundColor", "textAlignment"], + "additionalProperties": false + }, + "content": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["text"] + }, + "text": { + "type": "string" + }, + "styles": { + "type": "object", + "properties": { + "bold": { + "type": "boolean" + }, + "italic": { + "type": "boolean" + } + }, + "additionalProperties": false + } + }, + "required": ["type", "text"], + "additionalProperties": false + } + } + }, + "required": ["id", "type", "props", "content"], + "additionalProperties": false + } + }*/ + +function styleSchemaToJSONSchema(schema: StyleSchema): SimpleJSONObjectSchema { + return { + type: "object", + properties: Object.fromEntries( + Object.entries(schema).map(([key, val]) => { + return [ + key, + { + type: val.propSchema, + }, + ]; + }), + ), + additionalProperties: false, + }; +} + +function styledTextToJSONSchema() { + return { + type: "object", + properties: { + type: { + type: "string", + enum: ["text"], + }, + text: { + type: "string", + }, + styles: { + $ref: "#/$defs/styles", + }, + }, + additionalProperties: false, + required: ["type", "text"], + }; +} + +export function propSchemaToJSONSchema( + propSchema: PropSchema, +): SimpleJSONObjectSchema { + return { + type: "object", + properties: Object.fromEntries( + Object.entries(propSchema) + .filter(([_key, val]) => { + // for now skip optional props + return val.default !== undefined; + //&& key !== "language"; + }) + .map(([key, val]) => { + return [ + key, + { + type: typeof val.default, + enum: val.values, + }, + ]; + }), + ), + additionalProperties: false, + }; +} + +function inlineContentSchemaToJSONSchema(schema: InlineContentSchema) { + return { + type: "array", + items: { + anyOf: Object.entries(schema).map(([_key, val]) => { + if (val === "text") { + return { + $ref: "#/$defs/styledtext", + }; + } + if (val === "link") { + return { + type: "object", + properties: { + type: { + type: "string", + enum: ["link"], + }, + content: { + type: "array", + items: { + $ref: "#/$defs/styledtext", + }, + }, + href: { + type: "string", + }, + }, + additionalProperties: false, + required: ["type", "href", "content"], + }; + } + return { + type: "object", + properties: { + type: { + type: "string", + enum: [val.type], + }, + content: + val.content === "styled" + ? { + type: "array", + items: { + $ref: "#/$defs/styledtext", + }, + } + : undefined, + props: propSchemaToJSONSchema(val.propSchema), + }, + additionalProperties: false, + required: ["type", ...(val.content === "styled" ? ["content"] : [])], + }; + }), + }, + }; +} + +function blockSchemaToJSONSchema(schema: BlockSchema) { + return { + anyOf: mergeSchemas( + Object.entries(schema).map(([_key, val]) => { + return { + type: "object", + properties: { + type: { + type: "string", + enum: [val.type], + }, + content: + val.content === "inline" + ? { $ref: "#/$defs/inlinecontent" } + : val.content === "table" + ? { type: "object", properties: {} } // TODO + : undefined, + // filter out default props (TODO: make option) + props: propSchemaToJSONSchema(val.propSchema), + // Object.fromEntries( + // Object.entries(val.propSchema).filter( + // (key) => typeof (defaultProps as any)[key[0]] === "undefined" + // ) + // ) + // ), + }, + additionalProperties: false, + required: ["type"], //, ...(val.content === "inline" ? ["content"] : [])], + }; + }), + ), + }; +} + +type Writeable = { -readonly [P in keyof T]: T[P] }; + +function schemaOps( + schema: Pick< + BlockNoteSchema, + "blockSchema" | "inlineContentSchema" | "styleSchema" + >, +) { + const clone: Writeable = JSON.parse( + JSON.stringify({ + blockSchema: schema.blockSchema, + inlineContentSchema: schema.inlineContentSchema, + styleSchema: schema.styleSchema, + }), + ); + return { + removeFileBlocks() { + clone.blockSchema = Object.fromEntries( + Object.entries(clone.blockSchema).filter( + ([_key, val]) => !val.isFileBlock, + ), + ); + return this; + }, + removeDefaultProps() { + clone.blockSchema = Object.fromEntries( + Object.entries(clone.blockSchema).map(([key, val]) => { + return [ + key, + { + ...val, + propSchema: Object.fromEntries( + Object.entries(val.propSchema).filter( + (key) => typeof (defaultProps as any)[key[0]] === "undefined", + ), + ) as any, + }, + ]; + }), + ); + return this; + }, + + get() { + return clone; + }, + }; +} + +export function blockNoteSchemaToJSONSchema( + schema: Pick< + BlockNoteSchema, + "blockSchema" | "inlineContentSchema" | "styleSchema" + >, +) { + schema = schemaOps(schema).removeFileBlocks().removeDefaultProps().get(); + return { + $defs: { + styles: styleSchemaToJSONSchema(schema.styleSchema), + styledtext: styledTextToJSONSchema(), + inlinecontent: inlineContentSchemaToJSONSchema( + schema.inlineContentSchema, + ), + block: blockSchemaToJSONSchema(schema.blockSchema), + }, + }; +} diff --git a/packages/xl-ai/src/blocknoteAIClient/client.ts b/packages/xl-ai/src/blocknoteAIClient/client.ts new file mode 100644 index 0000000000..c64137972e --- /dev/null +++ b/packages/xl-ai/src/blocknoteAIClient/client.ts @@ -0,0 +1,75 @@ +/** + * Fetch function to proxy requests to the @blocknote/xl-ai-server AI server. + */ +const fetchViaBlockNoteAIServer = + (baseURL: string, provider: string) => + async (input: string | URL | Request, init?: RequestInit) => { + const request = new Request(input, init); + + // console.log("fetchViaBlockNoteAIServer", baseURL, provider, request); + const newRequest = new Request( + `${baseURL}?provider=${encodeURIComponent( + provider, + )}&url=${encodeURIComponent(request.url)}`, + { + headers: request.headers, + // if we just pass request.body, it's a readablestream which is not visible in chrome inspector, + // so use init?.body instead if it's available to make debugging easier + body: init?.body || request.body, + method: request.method, + duplex: "half", + } as any, + ); + try { + const resp = await fetch(newRequest); + return resp; + } catch (e) { + // Temp fix for https://github.com/vercel/ai/issues/6370 + throw new TypeError("fetch failed", { + cause: e, + }); + } + }; + +/** + * Create a client to connect to the @blocknote/xl-ai-server AI server. + * The BlockNote AI server is a proxy for AI model providers. It allows you to connect to + * AI SDKs without exposing your model provider's API keys on the client. + * + * @param config - settings to connect to the @blocknote/xl-ai-server AI server + * @returns a client to connect to the @blocknote/xl-ai-server AI server. + * Use the `getProviderSettings` method to get the provider settings for the AI SDKs, + * this will configure the AI SDK model to connect via the @blocknote/xl-ai-server AI server. + */ +export function createBlockNoteAIClient(config: { + /** + * baseURL of the @blocknote/xl-ai-server AI server + */ + baseURL: string; + /** + * API key for the @blocknote/xl-ai-server AI server + */ + apiKey: string; +}) { + return { + /** + * Get settings for AI SDK providers. Pass the returned objects when creating the AI SDK provider, e.g.: + * + * createOpenAI({ + * ...client.getProviderSettings("openai"), + * })("gpt-4o-2024-08-06", {}); + * + * Explanation: we override the `fetch` and `apiKey` parameters of the AI SDK provider to instead + * use the BlockNote AI server to proxy requests to the provider. + * + * Note: the `apiKey` is the API key for the @blocknote/xl-ai-server AI server, not the model provider. + * The correct API key for the model provider will be added by the BlockNote AI server. + */ + getProviderSettings: (provider: "openai" | "groq" | string) => { + return { + apiKey: config.apiKey, + fetch: fetchViaBlockNoteAIServer(config.baseURL, provider), + }; + }, + }; +} diff --git a/packages/xl-ai/src/components/AIMenu/AIMenu.tsx b/packages/xl-ai/src/components/AIMenu/AIMenu.tsx new file mode 100644 index 0000000000..d092852273 --- /dev/null +++ b/packages/xl-ai/src/components/AIMenu/AIMenu.tsx @@ -0,0 +1,142 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { useBlockNoteEditor, useComponentsContext } from "@blocknote/react"; +import { useCallback, useEffect, useMemo, useState } from "react"; +import { RiSparkling2Fill } from "react-icons/ri"; +import { useStore } from "zustand"; + +import { getAIExtension } from "../../AIExtension.js"; +import { useAIDictionary } from "../../i18n/useAIDictionary.js"; +import { PromptSuggestionMenu } from "./PromptSuggestionMenu.js"; +import { + AIMenuSuggestionItem, + getDefaultAIMenuItems, +} from "./getDefaultAIMenuItems.js"; + +export type AIMenuProps = { + items?: ( + editor: BlockNoteEditor, + aiResponseStatus: + | "user-input" + | "thinking" + | "ai-writing" + | "error" + | "user-reviewing" + | "closed", + ) => AIMenuSuggestionItem[]; + onManualPromptSubmit?: (userPrompt: string) => void; +}; + +export const AIMenu = (props: AIMenuProps) => { + const editor = useBlockNoteEditor(); + const [prompt, setPrompt] = useState(""); + const dict = useAIDictionary(); + + const Components = useComponentsContext()!; + + const ai = getAIExtension(editor); + + const aiResponseStatus = useStore(ai.store, (state) => + state.aiMenuState !== "closed" ? state.aiMenuState.status : "closed", + ); + + const { items: externalItems } = props; + // note, technically there might be a bug with this useMemo when quickly changing the selection and opening the menu + // would not call getDefaultAIMenuItems with the correct selection, because the component is reused and the memo not retriggered + // practically this should not happen (you can test it by using a high transition duration in useUIElementPositioning) + const items = useMemo(() => { + let items: AIMenuSuggestionItem[] = []; + if (externalItems) { + items = externalItems(editor, aiResponseStatus); + } else { + items = getDefaultAIMenuItems(editor, aiResponseStatus); + } + + // map from AI items to React Items required by PromptSuggestionMenu + return items.map((item) => { + return { + ...item, + onItemClick: () => { + item.onItemClick(setPrompt); + }, + }; + }); + }, [externalItems, aiResponseStatus, editor]); + + const onManualPromptSubmitDefault = useCallback( + async (userPrompt: string) => { + await ai.callLLM({ + userPrompt, + useSelection: editor.getSelection() !== undefined, + }); + }, + [ai, editor], + ); + + useEffect(() => { + // TODO: this is a bit hacky to run a useeffect to reset the prompt when the AI response is done + if (aiResponseStatus === "user-reviewing" || aiResponseStatus === "error") { + setPrompt(""); + } + }, [aiResponseStatus]); + + const placeholder = useMemo(() => { + if (aiResponseStatus === "thinking") { + return dict.ai_menu.status.thinking; + } else if (aiResponseStatus === "ai-writing") { + return dict.ai_menu.status.editing; + } else if (aiResponseStatus === "error") { + return dict.ai_menu.status.error; + } + + return dict.ai_menu.input_placeholder; + }, [aiResponseStatus, dict]); + + const rightSection = useMemo(() => { + if (aiResponseStatus === "thinking" || aiResponseStatus === "ai-writing") { + return ( + + ); + } else if (aiResponseStatus === "error") { + return ( +
      + {/* Taken from Google Material Icons */} + {/* https://fonts.google.com/icons?selected=Material+Symbols+Rounded:error:FILL@0;wght@400;GRAD@0;opsz@24&icon.query=error&icon.size=24&icon.color=%23e8eaed&icon.set=Material+Symbols&icon.style=Rounded&icon.platform=web */} + + + +
      + ); + } + + return undefined; + }, [Components, aiResponseStatus]); + + return ( + + +
      + } + rightSection={rightSection} + /> + ); +}; diff --git a/packages/xl-ai/src/components/AIMenu/AIMenuController.tsx b/packages/xl-ai/src/components/AIMenu/AIMenuController.tsx new file mode 100644 index 0000000000..b6dc5eb6c7 --- /dev/null +++ b/packages/xl-ai/src/components/AIMenu/AIMenuController.tsx @@ -0,0 +1,39 @@ +import { useBlockNoteEditor } from "@blocknote/react"; +import { FC } from "react"; +import { useStore } from "zustand"; + +import { getAIExtension } from "../../AIExtension.js"; +import { AIMenu, AIMenuProps } from "./AIMenu.js"; +import { BlockPositioner } from "./BlockPositioner.js"; + +export const AIMenuController = (props: { aiMenu?: FC }) => { + const editor = useBlockNoteEditor(); + const ai = getAIExtension(editor); + + const aiMenuState = useStore(ai.store, (state) => state.aiMenuState); + + const blockId = aiMenuState === "closed" ? undefined : aiMenuState.blockId; + + const Component = props.aiMenu || AIMenu; + + return ( + { + if (open || aiMenuState === "closed") { + return; + } + if (aiMenuState.status === "user-input") { + ai.closeAIMenu(); + } else if ( + aiMenuState.status === "user-reviewing" || + aiMenuState.status === "error" + ) { + ai.rejectChanges(); + } + }} + > + + + ); +}; diff --git a/packages/xl-ai/src/components/AIMenu/BlockPositioner.tsx b/packages/xl-ai/src/components/AIMenu/BlockPositioner.tsx new file mode 100644 index 0000000000..68cdc55033 --- /dev/null +++ b/packages/xl-ai/src/components/AIMenu/BlockPositioner.tsx @@ -0,0 +1,83 @@ +import { useUIElementPositioning } from "@blocknote/react"; +import { OpenChangeReason, autoUpdate, offset, size } from "@floating-ui/react"; +import { useMemo } from "react"; +// The block positioner automattically positions it's children below the block with `blockID` +export const BlockPositioner = (props: { + blockID?: string; + children: React.ReactNode; + onOpenChange?: ( + open: boolean, + event: Event, + reason: OpenChangeReason, + ) => void; +}) => { + const element = props.blockID + ? document.querySelector(`[data-id="${props.blockID}"]`) + : undefined; + + // Note that we can't pass element directly, because the useDismiss then doesn't work when clicking on the element + // (for that to work, we'd need to implement getReferenceProps(), but it's probably unsafe to attach those listeners to a prosemirror managed element) + const reference = useMemo(() => { + return element + ? { + getBoundingClientRect: () => { + // console.log( + // "getBoundingClientRect", + // element.getBoundingClientRect() + // ); + return element.getBoundingClientRect(); + }, + contextElement: element, + } + : null; + }, [element]); + + const { isMounted, ref, style, getFloatingProps } = useUIElementPositioning( + element ? true : false, + reference, + 3000, + { + canDismiss: { + enabled: true, + escapeKey: true, + outsidePress: false, + }, + // canDismiss: false, + placement: "bottom", + middleware: [ + offset(10), + // flip(), + size({ + apply({ rects, elements }) { + Object.assign(elements.floating.style, { + width: `${rects.reference.width}px`, + }); + }, + }), + ], + onOpenChange: props.onOpenChange, + whileElementsMounted: (referenceEl, floatingEl, update) => { + const cleanup = autoUpdate(referenceEl, floatingEl, update, { + animationFrame: true, + }); + return cleanup; + }, + }, + ); + + if (!isMounted) { + return null; + } + + return ( +
      + {props.children} +
      + ); +}; diff --git a/packages/xl-ai/src/components/AIMenu/PromptSuggestionMenu.tsx b/packages/xl-ai/src/components/AIMenu/PromptSuggestionMenu.tsx new file mode 100644 index 0000000000..b18e423a8a --- /dev/null +++ b/packages/xl-ai/src/components/AIMenu/PromptSuggestionMenu.tsx @@ -0,0 +1,131 @@ +import { filterSuggestionItems, mergeCSSClasses } from "@blocknote/core"; +import { + DefaultReactSuggestionItem, + useComponentsContext, + useSuggestionMenuKeyboardHandler, +} from "@blocknote/react"; +import { + ChangeEvent, + KeyboardEvent, + ReactNode, + useCallback, + useEffect, + useMemo, + useState, +} from "react"; + +export type PromptSuggestionMenuProps = { + items: DefaultReactSuggestionItem[]; + onManualPromptSubmit: (userPrompt: string) => void; + promptText?: string; + onPromptTextChange?: (userPrompt: string) => void; + icon?: ReactNode; + rightSection?: ReactNode; + placeholder?: string; + disabled?: boolean; +}; + +export const PromptSuggestionMenu = (props: PromptSuggestionMenuProps) => { + // const dict = useAIDictionary(); + const Components = useComponentsContext()!; + + const { onManualPromptSubmit, promptText, onPromptTextChange } = props; + + // Only used internal state when `props.prompText` is undefined (i.e., uncontrolled mode) + const [internalPromptText, setInternalPromptText] = useState(""); + const promptTextToUse = promptText || internalPromptText; + + const handleEnter = useCallback( + async (event: KeyboardEvent) => { + if (event.key === "Enter") { + // console.log("ENTER", currentEditingPrompt); + onManualPromptSubmit(promptTextToUse); + } + }, + [promptTextToUse, onManualPromptSubmit], + ); + + const handleChange = useCallback( + (event: ChangeEvent) => { + const newValue = event.currentTarget.value; + if (onPromptTextChange) { + onPromptTextChange(newValue); + } + + // Only update internal state if it's uncontrolled + if (promptText === undefined) { + setInternalPromptText(newValue); + } + }, + [onPromptTextChange, setInternalPromptText, promptText], + ); + + const items: DefaultReactSuggestionItem[] = useMemo(() => { + return filterSuggestionItems(props.items, promptTextToUse); + }, [promptTextToUse, props.items]); + + const { selectedIndex, setSelectedIndex, handler } = + useSuggestionMenuKeyboardHandler(items, (item) => item.onItemClick()); + + const handleKeyDown = useCallback( + (event: KeyboardEvent) => { + // TODO: handle backspace to close + if (event.key === "Enter") { + if (items.length > 0) { + handler(event); + } else { + // TODO: check focus? + handleEnter(event); + } + } else { + handler(event); + } + }, + [handleEnter, handler, items.length], + ); + + // Resets index when items change + useEffect(() => { + setSelectedIndex(0); + }, [promptTextToUse, setSelectedIndex]); + + return ( +
      + + + + + {items.map((item, i) => ( + + ))} + +
      + ); +}; diff --git a/packages/xl-ai/src/components/AIMenu/getDefaultAIMenuItems.tsx b/packages/xl-ai/src/components/AIMenu/getDefaultAIMenuItems.tsx new file mode 100644 index 0000000000..f8d3c31a89 --- /dev/null +++ b/packages/xl-ai/src/components/AIMenu/getDefaultAIMenuItems.tsx @@ -0,0 +1,288 @@ +import { + BlockNoteEditor, + BlockSchema, + InlineContentSchema, + StyleSchema, +} from "@blocknote/core"; +import { DefaultReactSuggestionItem } from "@blocknote/react"; +import { + RiArrowGoBackFill, + RiBallPenLine, + RiCheckFill, + RiCheckLine, + RiEarthLine, + RiListCheck3, + RiLoopLeftFill, + RiMagicLine, + RiText, + RiTextWrap, +} from "react-icons/ri"; + +import { getAIExtension } from "../../AIExtension.js"; +import { getAIDictionary } from "../../i18n/dictionary.js"; + +export type AIMenuSuggestionItem = Omit< + DefaultReactSuggestionItem, + "onItemClick" +> & { + onItemClick: (setPrompt: (userPrompt: string) => void) => void; + key: string; +}; + +/** + * Default items we show in the AI Menu when there is no selection active. + * For example, when the AI menu is triggered via the slash menu + */ +function getDefaultAIMenuItemsWithoutSelection< + BSchema extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>(editor: BlockNoteEditor): AIMenuSuggestionItem[] { + const dict = getAIDictionary(editor); + const ai = getAIExtension(editor); + return [ + { + key: "continue_writing", + title: dict.ai_default_commands.continue_writing.title, + aliases: dict.ai_default_commands.continue_writing.aliases, + icon: , + onItemClick: async () => { + await ai.callLLM({ + userPrompt: + "Continue writing: write more text at the current cursor position related to the previous text", + // By default, LLM will be able to add / update / delete blocks. For "continue writing", we only want to allow adding new blocks. + defaultStreamTools: { + add: true, + delete: false, + update: false, + }, + }); + }, + size: "small", + }, + + { + key: "summarize", + title: dict.ai_default_commands.summarize.title, + aliases: dict.ai_default_commands.summarize.aliases, + icon: , + onItemClick: async () => { + await ai.callLLM({ + userPrompt: "Summarize", + // By default, LLM will be able to add / update / delete blocks. For "summarize", we only want to allow adding new blocks. + defaultStreamTools: { + add: true, + delete: false, + update: false, + }, + }); + }, + size: "small", + }, + { + key: "action_items", + title: dict.ai_default_commands.add_action_items.title, + aliases: dict.ai_default_commands.add_action_items.aliases, + icon: , + onItemClick: async () => { + await ai.callLLM({ + userPrompt: "Add action items", + // By default, LLM will be able to add / update / delete blocks. For "summarize", we only want to allow adding new blocks. + defaultStreamTools: { + add: true, + delete: false, + update: false, + }, + }); + }, + size: "small", + }, + { + key: "write_anything", + title: dict.ai_default_commands.write_anything.title, + aliases: dict.ai_default_commands.write_anything.aliases, + icon: , + onItemClick: (setPrompt) => { + setPrompt(dict.ai_default_commands.write_anything.prompt_placeholder); + }, + size: "small", + }, + ]; +} + +/** + * Default items we show in the AI Menu when there is a selection active. + * For example, when the AI menu is triggered via formatting toolbar (AIToolbarButton) + */ +function getDefaultAIMenuItemsWithSelection< + BSchema extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>(editor: BlockNoteEditor): AIMenuSuggestionItem[] { + const dict = getAIDictionary(editor); + + const ai = getAIExtension(editor); + + return [ + { + key: "improve_writing", + title: dict.ai_default_commands.improve_writing.title, + aliases: dict.ai_default_commands.improve_writing.aliases, + icon: , + onItemClick: async () => { + await ai.callLLM({ + useSelection: true, + userPrompt: "Improve writing", + // By default, LLM will be able to add / update / delete blocks. For "summarize", we only want to allow adding new blocks. + defaultStreamTools: { + add: false, + delete: false, + update: true, + }, + }); + }, + size: "small", + }, + { + key: "fix_spelling", + title: dict.ai_default_commands.fix_spelling.title, + aliases: dict.ai_default_commands.fix_spelling.aliases, + icon: , + onItemClick: async () => { + await ai.callLLM({ + useSelection: true, + userPrompt: "Fix spelling", + // By default, LLM will be able to add / update / delete blocks. For "summarize", we only want to allow adding new blocks. + defaultStreamTools: { + add: false, + delete: false, + update: true, + }, + }); + }, + size: "small", + }, + { + key: "translate", + title: dict.ai_default_commands.translate.title, + aliases: dict.ai_default_commands.translate.aliases, + icon: , + onItemClick: (setPrompt) => { + setPrompt(dict.ai_default_commands.translate.prompt_placeholder); + }, + size: "small", + }, + { + key: "simplify", + title: dict.ai_default_commands.simplify.title, + aliases: dict.ai_default_commands.simplify.aliases, + icon: , + onItemClick: async () => { + await ai.callLLM({ + useSelection: true, + userPrompt: "Simplify", + // By default, LLM will be able to add / update / delete blocks. For "summarize", we only want to allow adding new blocks. + defaultStreamTools: { + add: false, + delete: false, + update: true, + }, + }); + }, + size: "small", + }, + ]; +} + +/** + * Default items we show in the AI Menu when the AI response is done. + */ +function getDefaultAIMenuItemsForReview< + BSchema extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>(editor: BlockNoteEditor): AIMenuSuggestionItem[] { + const dict = getAIDictionary(editor); + const ai = getAIExtension(editor); + + return [ + { + key: "accept", + title: dict.ai_menu.actions.accept.title, + aliases: dict.ai_menu.actions.accept.aliases, + icon: , + onItemClick: () => { + ai.acceptChanges(); + }, + size: "small", + }, + { + key: "revert", + title: dict.ai_menu.actions.revert.title, + aliases: dict.ai_menu.actions.revert.aliases, + icon: , + onItemClick: () => { + ai.rejectChanges(); + }, + size: "small", + }, + ]; +} + +/** + * Default items we show in the AI Menu when the AI response is done. + */ +function getDefaultAIMenuItemsForError< + BSchema extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>(editor: BlockNoteEditor): AIMenuSuggestionItem[] { + const dict = getAIDictionary(editor); + const ai = getAIExtension(editor); + + return [ + { + key: "retry", + title: dict.ai_menu.actions.retry.title, + aliases: dict.ai_menu.actions.retry.aliases, + icon: , + onItemClick: async () => { + await ai.retry(); + }, + size: "small", + }, + { + key: "cancel", + title: dict.ai_menu.actions.cancel.title, + aliases: dict.ai_menu.actions.cancel.aliases, + icon: , + onItemClick: () => { + ai.rejectChanges(); + }, + size: "small", + }, + ]; +} + +export function getDefaultAIMenuItems( + editor: BlockNoteEditor, + aiResponseStatus: + | "user-input" + | "thinking" + | "ai-writing" + | "error" + | "user-reviewing" + | "closed", +): AIMenuSuggestionItem[] { + if (aiResponseStatus === "user-input") { + return editor.getSelection() + ? getDefaultAIMenuItemsWithSelection(editor) + : getDefaultAIMenuItemsWithoutSelection(editor); + } else if (aiResponseStatus === "user-reviewing") { + return getDefaultAIMenuItemsForReview(editor); + } else if (aiResponseStatus === "error") { + return getDefaultAIMenuItemsForError(editor); + } else { + return []; + } +} diff --git a/packages/xl-ai/src/components/FormattingToolbar/AIToolbarButton.tsx b/packages/xl-ai/src/components/FormattingToolbar/AIToolbarButton.tsx new file mode 100644 index 0000000000..1f958fe5c7 --- /dev/null +++ b/packages/xl-ai/src/components/FormattingToolbar/AIToolbarButton.tsx @@ -0,0 +1,45 @@ +import { BlockSchema, InlineContentSchema, StyleSchema } from "@blocknote/core"; +import { useComponentsContext } from "@blocknote/react"; +import { RiSparkling2Fill } from "react-icons/ri"; + +import { useBlockNoteEditor } from "@blocknote/react"; + +import { getAIExtension } from "../../AIExtension.js"; +import { useAIDictionary } from "../../i18n/useAIDictionary.js"; + +export const AIToolbarButton = () => { + const dict = useAIDictionary(); + const Components = useComponentsContext()!; + + const editor = useBlockNoteEditor< + BlockSchema, + InlineContentSchema, + StyleSchema + >(); + + const ai = getAIExtension(editor); + + const onClick = () => { + editor.formattingToolbar.closeMenu(); + const selection = editor.getSelection(); + if (!selection) { + throw new Error("No selection"); + } + const position = selection.blocks[selection.blocks.length - 1].id; + ai.openAIMenuAtBlock(position); + }; + + if (!editor.isEditable) { + return null; + } + + return ( + } + onClick={onClick} + /> + ); +}; diff --git a/packages/xl-ai/src/components/SuggestionMenu/getAISlashMenuItems.tsx b/packages/xl-ai/src/components/SuggestionMenu/getAISlashMenuItems.tsx new file mode 100644 index 0000000000..5599d8a296 --- /dev/null +++ b/packages/xl-ai/src/components/SuggestionMenu/getAISlashMenuItems.tsx @@ -0,0 +1,47 @@ +import { + BlockNoteEditor, + BlockSchema, + InlineContentSchema, + StyleSchema, +} from "@blocknote/core"; +import { DefaultReactSuggestionItem } from "@blocknote/react"; +import { RiSparkling2Fill } from "react-icons/ri"; + +import { getAIExtension } from "../../AIExtension.js"; +import { getAIDictionary } from "../../i18n/dictionary.js"; +const Icons = { + AI: RiSparkling2Fill, +}; + +/** + * Returns AI related items that can be added to the slash menu + */ +export function getAISlashMenuItems< + BSchema extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>(editor: BlockNoteEditor): DefaultReactSuggestionItem[] { + const ai = getAIExtension(editor); + const items = [ + { + key: "ai", + onItemClick: () => { + const cursor = editor.getTextCursorPosition(); + if ( + cursor.block.content && + Array.isArray(cursor.block.content) && // isarray check not ideal + cursor.block.content.length === 0 && + cursor.prevBlock + ) { + ai.openAIMenuAtBlock(cursor.prevBlock.id); + } else { + ai.openAIMenuAtBlock(cursor.block.id); + } + }, + ...getAIDictionary(editor).slash_menu.ai, + icon: , + }, + ]; + + return items; +} diff --git a/packages/xl-ai/src/i18n/dictionary.ts b/packages/xl-ai/src/i18n/dictionary.ts new file mode 100644 index 0000000000..2a5e145006 --- /dev/null +++ b/packages/xl-ai/src/i18n/dictionary.ts @@ -0,0 +1,11 @@ +import type { BlockNoteEditor } from "@blocknote/core"; +import type { en } from "./locales"; + +export function getAIDictionary(editor: BlockNoteEditor) { + if (!(editor.dictionary as any).ai) { + throw new Error("AI dictionary not found"); + } + return (editor.dictionary as any).ai as AIDictionary; +} + +export type AIDictionary = typeof en; diff --git a/packages/xl-ai/src/i18n/locales/ar.ts b/packages/xl-ai/src/i18n/locales/ar.ts new file mode 100644 index 0000000000..80232f0c1a --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/ar.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const ar: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "تحرير بالذكاء الاصطناعي", + }, + }, + slash_menu: { + ai: { + title: "اسأل الذكاء الاصطناعي", + subtext: "الكتابة بالذكاء الاصطناعي", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "الذكاء الاصطناعي", + }, + }, + ai_default_commands: { + continue_writing: { + title: "متابعة الكتابة", + aliases: undefined, + }, + summarize: { + title: "تلخيص", + aliases: undefined, + }, + add_action_items: { + title: "إضافة عناصر إجرائية", + aliases: undefined, + }, + write_anything: { + title: "اكتب أي شيء…", + aliases: undefined, + prompt_placeholder: "اكتب عن ", + }, + simplify: { + title: "تبسيط", + aliases: undefined, + }, + translate: { + title: "ترجمة…", + aliases: undefined, + prompt_placeholder: "ترجم إلى ", + }, + fix_spelling: { + title: "تصحيح الإملاء", + aliases: undefined, + }, + improve_writing: { + title: "تحسين الكتابة", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "اسأل الذكاء الاصطناعي أي شيء…", + status: { + thinking: "جاري التفكير…", + editing: "جاري التحرير…", + error: "عذراً! حدث خطأ ما", + }, + actions: { + accept: { title: "قبول", aliases: undefined }, + retry: { title: "إعادة المحاولة", aliases: undefined }, + cancel: { title: "إلغاء", aliases: undefined }, + revert: { title: "استعادة", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/de.ts b/packages/xl-ai/src/i18n/locales/de.ts new file mode 100644 index 0000000000..88cc947a44 --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/de.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const de: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Mit KI bearbeiten", + }, + }, + slash_menu: { + ai: { + title: "KI fragen", + subtext: "Mit KI schreiben", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "KI", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Weiterschreiben", + aliases: undefined, + }, + summarize: { + title: "Zusammenfassen", + aliases: undefined, + }, + add_action_items: { + title: "Aktionspunkte hinzufügen", + aliases: undefined, + }, + write_anything: { + title: "Beliebigen Text schreiben…", + aliases: undefined, + prompt_placeholder: "Schreiben über ", + }, + simplify: { + title: "Vereinfachen", + aliases: undefined, + }, + translate: { + title: "Übersetzen…", + aliases: undefined, + prompt_placeholder: "Übersetzen in ", + }, + fix_spelling: { + title: "Rechtschreibung korrigieren", + aliases: undefined, + }, + improve_writing: { + title: "Schreibstil verbessern", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Frage die KI was auch immer…", + status: { + thinking: "Denke nach…", + editing: "Bearbeite…", + error: "Ups! Etwas ist schiefgelaufen", + }, + actions: { + accept: { title: "Akzeptieren", aliases: undefined }, + retry: { title: "Wiederholen", aliases: undefined }, + cancel: { title: "Abbrechen", aliases: undefined }, + revert: { title: "Zurücksetzen", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/en.ts b/packages/xl-ai/src/i18n/locales/en.ts new file mode 100644 index 0000000000..87e2458671 --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/en.ts @@ -0,0 +1,71 @@ +export const en = { + formatting_toolbar: { + ai: { + tooltip: "Edit with AI", + }, + }, + slash_menu: { + ai: { + title: "Ask AI", + subtext: "Write with AI", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "AI", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Continue Writing", + aliases: undefined, + }, + summarize: { + title: "Summarize", + aliases: undefined, + }, + add_action_items: { + title: "Add Action Items", + aliases: undefined, + }, + write_anything: { + title: "Write Anything…", + aliases: undefined, + prompt_placeholder: "Write about ", + }, + simplify: { + title: "Simplify", + aliases: undefined, + }, + translate: { + title: "Translate…", + aliases: undefined, + prompt_placeholder: "Translate into ", + }, + fix_spelling: { + title: "Fix Spelling", + aliases: undefined, + }, + improve_writing: { + title: "Improve Writing", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Ask AI anything…", + status: { + thinking: "Thinking…", + editing: "Editing…", + error: "Oops! Something went wrong", + }, + actions: { + accept: { title: "Accept", aliases: undefined }, + retry: { title: "Retry", aliases: undefined }, + cancel: { title: "Cancel", aliases: undefined }, + revert: { title: "Revert", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/es.ts b/packages/xl-ai/src/i18n/locales/es.ts new file mode 100644 index 0000000000..04e6c637d9 --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/es.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const es: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Editar con IA", + }, + }, + slash_menu: { + ai: { + title: "Preguntar a la IA", + subtext: "Escribir con IA", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "IA", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Continuar escribiendo", + aliases: undefined, + }, + summarize: { + title: "Resumir", + aliases: undefined, + }, + add_action_items: { + title: "Añadir elementos de acción", + aliases: undefined, + }, + write_anything: { + title: "Escribir cualquier cosa…", + aliases: undefined, + prompt_placeholder: "Escribir sobre ", + }, + simplify: { + title: "Simplificar", + aliases: undefined, + }, + translate: { + title: "Traducir…", + aliases: undefined, + prompt_placeholder: "Traducir a ", + }, + fix_spelling: { + title: "Corregir ortografía", + aliases: undefined, + }, + improve_writing: { + title: "Mejorar la escritura", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Pregunta cualquier cosa a la IA…", + status: { + thinking: "Pensando…", + editing: "Editando…", + error: "¡Ups! Algo salió mal", + }, + actions: { + accept: { title: "Aceptar", aliases: undefined }, + retry: { title: "Reintentar", aliases: undefined }, + cancel: { title: "Cancelar", aliases: undefined }, + revert: { title: "Revertir", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/fr.ts b/packages/xl-ai/src/i18n/locales/fr.ts new file mode 100644 index 0000000000..6347f4df35 --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/fr.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const fr: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Éditer avec l'IA", + }, + }, + slash_menu: { + ai: { + title: "Demander à l'IA", + subtext: "Écrire avec l'IA", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "IA", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Continuer à écrire", + aliases: undefined, + }, + summarize: { + title: "Résumer", + aliases: undefined, + }, + add_action_items: { + title: "Ajouter des éléments d'action", + aliases: undefined, + }, + write_anything: { + title: "Écrire n'importe quoi…", + aliases: undefined, + prompt_placeholder: "Écrire à propos de ", + }, + simplify: { + title: "Simplifier", + aliases: undefined, + }, + translate: { + title: "Traduire…", + aliases: undefined, + prompt_placeholder: "Traduire en ", + }, + fix_spelling: { + title: "Corriger l'orthographe", + aliases: undefined, + }, + improve_writing: { + title: "Améliorer l'écriture", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Demandez n'importe quoi à l'IA…", + status: { + thinking: "Réflexion…", + editing: "Édition…", + error: "Oups ! Une erreur s'est produite", + }, + actions: { + accept: { title: "Accepter", aliases: undefined }, + retry: { title: "Réessayer", aliases: undefined }, + cancel: { title: "Annuler", aliases: undefined }, + revert: { title: "Annuler", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/hr.ts b/packages/xl-ai/src/i18n/locales/hr.ts new file mode 100644 index 0000000000..0e333e2b0b --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/hr.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const hr: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Uredi s AI", + }, + }, + slash_menu: { + ai: { + title: "Pitaj AI", + subtext: "Piši s AI", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "AI", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Nastavi pisati", + aliases: undefined, + }, + summarize: { + title: "Sažmi", + aliases: undefined, + }, + add_action_items: { + title: "Dodaj stavke akcije", + aliases: undefined, + }, + write_anything: { + title: "Napiši bilo što…", + aliases: undefined, + prompt_placeholder: "Piši o ", + }, + simplify: { + title: "Pojednostavi", + aliases: undefined, + }, + translate: { + title: "Prevedi…", + aliases: undefined, + prompt_placeholder: "Prevedi na ", + }, + fix_spelling: { + title: "Ispravi pravopis", + aliases: undefined, + }, + improve_writing: { + title: "Poboljšaj pisanje", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Pitaj AI bilo što…", + status: { + thinking: "Razmišljam…", + editing: "Uređujem…", + error: "Ups! Nešto je pošlo po zlu", + }, + actions: { + accept: { title: "Prihvati", aliases: undefined }, + retry: { title: "Pokušaj ponovno", aliases: undefined }, + cancel: { title: "Odustani", aliases: undefined }, + revert: { title: "Vrati", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/index.ts b/packages/xl-ai/src/i18n/locales/index.ts new file mode 100644 index 0000000000..ea8366b709 --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/index.ts @@ -0,0 +1,20 @@ +export * from "./ar.js"; +export * from "./de.js"; +export * from "./en.js"; +export * from "./es.js"; +export * from "./fr.js"; +export * from "./hr.js"; +export * from "./is.js"; +export * from "./it.js"; +export * from "./ja.js"; +export * from "./ko.js"; +export * from "./nl.js"; +export * from "./no.js"; +export * from "./pl.js"; +export * from "./pt.js"; +export * from "./ru.js"; +export * from "./sk.js"; +export * from "./uk.js"; +export * from "./vi.js"; +export * from "./zh-tw.js"; +export * from "./zh.js"; diff --git a/packages/xl-ai/src/i18n/locales/is.ts b/packages/xl-ai/src/i18n/locales/is.ts new file mode 100644 index 0000000000..6ed787d443 --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/is.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const is: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Breyta með gervigreind", + }, + }, + slash_menu: { + ai: { + title: "Spyrja gervigreind", + subtext: "Skrifa með gervigreind", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "Gervigreind", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Halda áfram að skrifa", + aliases: undefined, + }, + summarize: { + title: "Draga saman", + aliases: undefined, + }, + add_action_items: { + title: "Bæta við aðgerðaatriðum", + aliases: undefined, + }, + write_anything: { + title: "Skrifa hvað sem er…", + aliases: undefined, + prompt_placeholder: "Skrifa um ", + }, + simplify: { + title: "Einfalda", + aliases: undefined, + }, + translate: { + title: "Þýða…", + aliases: undefined, + prompt_placeholder: "Þýða yfir á ", + }, + fix_spelling: { + title: "Laga stafsetningu", + aliases: undefined, + }, + improve_writing: { + title: "Bæta ritun", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Spyrðu gervigreind um hvað sem er…", + status: { + thinking: "Hugsa…", + editing: "Breyta…", + error: "Ups! Eitthvað fór úrskeiðis", + }, + actions: { + accept: { title: "Samþykkja", aliases: undefined }, + retry: { title: "Reyna aftur", aliases: undefined }, + cancel: { title: "Hætta við", aliases: undefined }, + revert: { title: "Afturkalla", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/it.ts b/packages/xl-ai/src/i18n/locales/it.ts new file mode 100644 index 0000000000..1f536c1bfb --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/it.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const it: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Modifica con IA", + }, + }, + slash_menu: { + ai: { + title: "Chiedi all'IA", + subtext: "Scrivi con IA", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "IA", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Continua a scrivere", + aliases: undefined, + }, + summarize: { + title: "Riassumi", + aliases: undefined, + }, + add_action_items: { + title: "Aggiungi elementi d'azione", + aliases: undefined, + }, + write_anything: { + title: "Scrivi qualsiasi cosa…", + aliases: undefined, + prompt_placeholder: "Scrivi su ", + }, + simplify: { + title: "Semplifica", + aliases: undefined, + }, + translate: { + title: "Traduci…", + aliases: undefined, + prompt_placeholder: "Traduci in ", + }, + fix_spelling: { + title: "Correggi ortografia", + aliases: undefined, + }, + improve_writing: { + title: "Migliora la scrittura", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Chiedi qualsiasi cosa all'IA…", + status: { + thinking: "Sto pensando…", + editing: "Sto modificando…", + error: "Ops! Qualcosa è andato storto", + }, + actions: { + accept: { title: "Accetta", aliases: undefined }, + retry: { title: "Riprova", aliases: undefined }, + cancel: { title: "Annulla", aliases: undefined }, + revert: { title: "Ripristina", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/ja.ts b/packages/xl-ai/src/i18n/locales/ja.ts new file mode 100644 index 0000000000..ea9a754848 --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/ja.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const ja: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "AIで編集", + }, + }, + slash_menu: { + ai: { + title: "AIに質問", + subtext: "AIで執筆", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "AI", + }, + }, + ai_default_commands: { + continue_writing: { + title: "続けて書く", + aliases: undefined, + }, + summarize: { + title: "要約する", + aliases: undefined, + }, + add_action_items: { + title: "アクション項目を追加", + aliases: undefined, + }, + write_anything: { + title: "何でも書く…", + aliases: undefined, + prompt_placeholder: "次のことについて書く ", + }, + simplify: { + title: "簡略化する", + aliases: undefined, + }, + translate: { + title: "翻訳する…", + aliases: undefined, + prompt_placeholder: "次の言語に翻訳 ", + }, + fix_spelling: { + title: "スペルを修正", + aliases: undefined, + }, + improve_writing: { + title: "文章を改善", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "AIに何でも質問…", + status: { + thinking: "考え中…", + editing: "編集中…", + error: "申し訳ありません!エラーが発生しました", + }, + actions: { + accept: { title: "承認", aliases: undefined }, + retry: { title: "再試行", aliases: undefined }, + cancel: { title: "キャンセル", aliases: undefined }, + revert: { title: "元に戻す", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/ko.ts b/packages/xl-ai/src/i18n/locales/ko.ts new file mode 100644 index 0000000000..882176bded --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/ko.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const ko: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "AI로 편집하기", + }, + }, + slash_menu: { + ai: { + title: "AI에게 질문하기", + subtext: "AI로 작성하기", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "AI", + }, + }, + ai_default_commands: { + continue_writing: { + title: "계속 작성하기", + aliases: undefined, + }, + summarize: { + title: "요약하기", + aliases: undefined, + }, + add_action_items: { + title: "작업 항목 추가", + aliases: undefined, + }, + write_anything: { + title: "무엇이든 작성하기…", + aliases: undefined, + prompt_placeholder: "다음에 대해 작성: ", + }, + simplify: { + title: "단순화하기", + aliases: undefined, + }, + translate: { + title: "번역하기…", + aliases: undefined, + prompt_placeholder: "다음으로 번역: ", + }, + fix_spelling: { + title: "맞춤법 수정", + aliases: undefined, + }, + improve_writing: { + title: "글쓰기 개선", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "AI에게 무엇이든 물어보세요…", + status: { + thinking: "생각 중…", + editing: "편집 중…", + error: "죄송합니다! 오류가 발생했습니다", + }, + actions: { + accept: { title: "수락", aliases: undefined }, + retry: { title: "다시 시도", aliases: undefined }, + cancel: { title: "취소", aliases: undefined }, + revert: { title: "되돌리기", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/nl.ts b/packages/xl-ai/src/i18n/locales/nl.ts new file mode 100644 index 0000000000..a3676479ad --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/nl.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const nl: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Bewerken met AI", + }, + }, + slash_menu: { + ai: { + title: "Vraag AI", + subtext: "Schrijf met AI", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "AI", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Schrijven Voortzetten", + aliases: undefined, + }, + summarize: { + title: "Samenvatten", + aliases: undefined, + }, + add_action_items: { + title: "Actiepunten Toevoegen", + aliases: undefined, + }, + write_anything: { + title: "Schrijf Iets…", + aliases: undefined, + prompt_placeholder: "Schrijf over ", + }, + simplify: { + title: "Vereenvoudigen", + aliases: undefined, + }, + translate: { + title: "Vertalen…", + aliases: undefined, + prompt_placeholder: "Vertaal naar ", + }, + fix_spelling: { + title: "Spelling Corrigeren", + aliases: undefined, + }, + improve_writing: { + title: "Schrijven Verbeteren", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Vraag AI iets…", + status: { + thinking: "Denken…", + editing: "Bewerken…", + error: "Oeps! Er is iets misgegaan", + }, + actions: { + accept: { title: "Accepteren", aliases: undefined }, + retry: { title: "Opnieuw Proberen", aliases: undefined }, + cancel: { title: "Annuleren", aliases: undefined }, + revert: { title: "Terugdraaien", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/no.ts b/packages/xl-ai/src/i18n/locales/no.ts new file mode 100644 index 0000000000..92b83b809f --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/no.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const no: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Rediger med AI", + }, + }, + slash_menu: { + ai: { + title: "Spør AI", + subtext: "Skriv med AI", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "AI", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Fortsett å skrive", + aliases: undefined, + }, + summarize: { + title: "Oppsummer", + aliases: undefined, + }, + add_action_items: { + title: "Legg til handlingspunkter", + aliases: undefined, + }, + write_anything: { + title: "Skriv hva som helst…", + aliases: undefined, + prompt_placeholder: "Skriv om ", + }, + simplify: { + title: "Forenkle", + aliases: undefined, + }, + translate: { + title: "Oversett…", + aliases: undefined, + prompt_placeholder: "Oversett til ", + }, + fix_spelling: { + title: "Rett stavefeil", + aliases: undefined, + }, + improve_writing: { + title: "Forbedre skriving", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Spør AI om hva som helst…", + status: { + thinking: "Tenker…", + editing: "Redigerer…", + error: "Ups! Noe gikk galt", + }, + actions: { + accept: { title: "Godta", aliases: undefined }, + retry: { title: "Prøv igjen", aliases: undefined }, + cancel: { title: "Avbryt", aliases: undefined }, + revert: { title: "Tilbakestill", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/pl.ts b/packages/xl-ai/src/i18n/locales/pl.ts new file mode 100644 index 0000000000..e8ac01f84e --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/pl.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const pl: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Edytuj z AI", + }, + }, + slash_menu: { + ai: { + title: "Zapytaj AI", + subtext: "Pisz z AI", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "AI", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Kontynuuj Pisanie", + aliases: undefined, + }, + summarize: { + title: "Podsumuj", + aliases: undefined, + }, + add_action_items: { + title: "Dodaj Elementy Działań", + aliases: undefined, + }, + write_anything: { + title: "Napisz Cokolwiek…", + aliases: undefined, + prompt_placeholder: "Napisz o ", + }, + simplify: { + title: "Uprość", + aliases: undefined, + }, + translate: { + title: "Przetłumacz…", + aliases: undefined, + prompt_placeholder: "Przetłumacz na ", + }, + fix_spelling: { + title: "Popraw Pisownię", + aliases: undefined, + }, + improve_writing: { + title: "Popraw Styl Pisania", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Zapytaj AI o cokolwiek…", + status: { + thinking: "Myślę…", + editing: "Edytuję…", + error: "Ups! Coś poszło nie tak", + }, + actions: { + accept: { title: "Akceptuj", aliases: undefined }, + retry: { title: "Spróbuj Ponownie", aliases: undefined }, + cancel: { title: "Anuluj", aliases: undefined }, + revert: { title: "Przywróć", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/pt.ts b/packages/xl-ai/src/i18n/locales/pt.ts new file mode 100644 index 0000000000..bcb2a816fb --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/pt.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const pt: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Editar com IA", + }, + }, + slash_menu: { + ai: { + title: "Perguntar à IA", + subtext: "Escrever com IA", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "IA", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Continuar Escrevendo", + aliases: undefined, + }, + summarize: { + title: "Resumir", + aliases: undefined, + }, + add_action_items: { + title: "Adicionar Itens de Ação", + aliases: undefined, + }, + write_anything: { + title: "Escrever Qualquer Coisa…", + aliases: undefined, + prompt_placeholder: "Escrever sobre ", + }, + simplify: { + title: "Simplificar", + aliases: undefined, + }, + translate: { + title: "Traduzir…", + aliases: undefined, + prompt_placeholder: "Traduzir para ", + }, + fix_spelling: { + title: "Corrigir Ortografia", + aliases: undefined, + }, + improve_writing: { + title: "Melhorar Escrita", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Pergunte qualquer coisa à IA…", + status: { + thinking: "Pensando…", + editing: "Editando…", + error: "Ops! Algo deu errado", + }, + actions: { + accept: { title: "Aceitar", aliases: undefined }, + retry: { title: "Tentar Novamente", aliases: undefined }, + cancel: { title: "Cancelar", aliases: undefined }, + revert: { title: "Reverter", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/ru.ts b/packages/xl-ai/src/i18n/locales/ru.ts new file mode 100644 index 0000000000..2382743e47 --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/ru.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const ru: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Редактировать с помощью ИИ", + }, + }, + slash_menu: { + ai: { + title: "Спросить ИИ", + subtext: "Писать с помощью ИИ", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "ИИ", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Продолжить написание", + aliases: undefined, + }, + summarize: { + title: "Резюмировать", + aliases: undefined, + }, + add_action_items: { + title: "Добавить пункты действий", + aliases: undefined, + }, + write_anything: { + title: "Написать что угодно…", + aliases: undefined, + prompt_placeholder: "Написать о ", + }, + simplify: { + title: "Упростить", + aliases: undefined, + }, + translate: { + title: "Перевести…", + aliases: undefined, + prompt_placeholder: "Перевести на ", + }, + fix_spelling: { + title: "Исправить орфографию", + aliases: undefined, + }, + improve_writing: { + title: "Улучшить текст", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Спросите ИИ о чем угодно…", + status: { + thinking: "Думаю…", + editing: "Редактирую…", + error: "Упс! Что-то пошло не так", + }, + actions: { + accept: { title: "Принять", aliases: undefined }, + retry: { title: "Повторить", aliases: undefined }, + cancel: { title: "Отменить", aliases: undefined }, + revert: { title: "Отменить", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/sk.ts b/packages/xl-ai/src/i18n/locales/sk.ts new file mode 100644 index 0000000000..b85ee5bc22 --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/sk.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const sk: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Upraviť s AI", + }, + }, + slash_menu: { + ai: { + title: "Opýtať sa AI", + subtext: "Písať s AI", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "AI", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Pokračovať v písaní", + aliases: undefined, + }, + summarize: { + title: "Zhrnúť", + aliases: undefined, + }, + add_action_items: { + title: "Pridať akčné položky", + aliases: undefined, + }, + write_anything: { + title: "Napísať čokoľvek…", + aliases: undefined, + prompt_placeholder: "Písať o ", + }, + simplify: { + title: "Zjednodušiť", + aliases: undefined, + }, + translate: { + title: "Preložiť…", + aliases: undefined, + prompt_placeholder: "Preložiť do ", + }, + fix_spelling: { + title: "Opraviť pravopis", + aliases: undefined, + }, + improve_writing: { + title: "Vylepšiť písanie", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Opýtajte sa AI čokoľvek…", + status: { + thinking: "Premýšľam…", + editing: "Upravujem…", + error: "Ups! Niečo sa pokazilo", + }, + actions: { + accept: { title: "Prijať", aliases: undefined }, + retry: { title: "Skúsiť znova", aliases: undefined }, + cancel: { title: "Zrušiť", aliases: undefined }, + revert: { title: "Vrátiť späť", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/uk.ts b/packages/xl-ai/src/i18n/locales/uk.ts new file mode 100644 index 0000000000..8794eb9e97 --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/uk.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const uk: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Редагувати за допомогою ШІ", + }, + }, + slash_menu: { + ai: { + title: "Запитати ШІ", + subtext: "Писати за допомогою ШІ", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "ШІ", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Продовжити написання", + aliases: undefined, + }, + summarize: { + title: "Підсумувати", + aliases: undefined, + }, + add_action_items: { + title: "Додати пункти дій", + aliases: undefined, + }, + write_anything: { + title: "Написати що завгодно…", + aliases: undefined, + prompt_placeholder: "Написати про ", + }, + simplify: { + title: "Спростити", + aliases: undefined, + }, + translate: { + title: "Перекласти…", + aliases: undefined, + prompt_placeholder: "Перекласти на ", + }, + fix_spelling: { + title: "Виправити орфографію", + aliases: undefined, + }, + improve_writing: { + title: "Покращити текст", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Запитайте ШІ про що завгодно…", + status: { + thinking: "Думаю…", + editing: "Редагую…", + error: "На жаль! Щось пішло не так", + }, + actions: { + accept: { title: "Прийняти", aliases: undefined }, + retry: { title: "Повторити", aliases: undefined }, + cancel: { title: "Скасувати", aliases: undefined }, + revert: { title: "Повернути", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/vi.ts b/packages/xl-ai/src/i18n/locales/vi.ts new file mode 100644 index 0000000000..ad4472b697 --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/vi.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const vi: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "Chỉnh sửa với AI", + }, + }, + slash_menu: { + ai: { + title: "Hỏi AI", + subtext: "Viết với AI", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "AI", + }, + }, + ai_default_commands: { + continue_writing: { + title: "Tiếp tục Viết", + aliases: undefined, + }, + summarize: { + title: "Tóm tắt", + aliases: undefined, + }, + add_action_items: { + title: "Thêm mục hành động", + aliases: undefined, + }, + write_anything: { + title: "Viết bất kỳ điều gì…", + aliases: undefined, + prompt_placeholder: "Viết về ", + }, + simplify: { + title: "Đơn giản hóa", + aliases: undefined, + }, + translate: { + title: "Dịch…", + aliases: undefined, + prompt_placeholder: "Dịch sang ", + }, + fix_spelling: { + title: "Sửa lỗi chính tả", + aliases: undefined, + }, + improve_writing: { + title: "Cải thiện bài viết", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "Hỏi AI bất cứ điều gì…", + status: { + thinking: "Đang suy nghĩ…", + editing: "Đang chỉnh sửa…", + error: "Rất tiếc! Đã xảy ra lỗi", + }, + actions: { + accept: { title: "Chấp nhận", aliases: undefined }, + retry: { title: "Thử lại", aliases: undefined }, + cancel: { title: "Hủy bỏ", aliases: undefined }, + revert: { title: "Hoàn tác", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/zh-tw.ts b/packages/xl-ai/src/i18n/locales/zh-tw.ts new file mode 100644 index 0000000000..d30ef43ed2 --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/zh-tw.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const zhTw: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "使用人工智慧編輯", + }, + }, + slash_menu: { + ai: { + title: "詢問人工智慧", + subtext: "使用人工智慧寫作", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "人工智慧", + }, + }, + ai_default_commands: { + continue_writing: { + title: "繼續寫作", + aliases: undefined, + }, + summarize: { + title: "摘要", + aliases: undefined, + }, + add_action_items: { + title: "添加行動項目", + aliases: undefined, + }, + write_anything: { + title: "寫任何內容…", + aliases: undefined, + prompt_placeholder: "寫關於 ", + }, + simplify: { + title: "簡化", + aliases: undefined, + }, + translate: { + title: "翻譯…", + aliases: undefined, + prompt_placeholder: "翻譯成 ", + }, + fix_spelling: { + title: "修正拼寫", + aliases: undefined, + }, + improve_writing: { + title: "改進寫作", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "向人工智慧提問任何問題…", + status: { + thinking: "思考中…", + editing: "編輯中…", + error: "哎呀!發生了一些錯誤", + }, + actions: { + accept: { title: "接受", aliases: undefined }, + retry: { title: "重試", aliases: undefined }, + cancel: { title: "取消", aliases: undefined }, + revert: { title: "恢復", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/locales/zh.ts b/packages/xl-ai/src/i18n/locales/zh.ts new file mode 100644 index 0000000000..9ba366b300 --- /dev/null +++ b/packages/xl-ai/src/i18n/locales/zh.ts @@ -0,0 +1,73 @@ +import type { AIDictionary } from "../dictionary"; + +export const zh: AIDictionary = { + formatting_toolbar: { + ai: { + tooltip: "使用人工智能编辑", + }, + }, + slash_menu: { + ai: { + title: "询问人工智能", + subtext: "使用人工智能写作", + aliases: [ + "ai", + "artificial intelligence", + "llm", + "assistant", + "generate", + ], + group: "人工智能", + }, + }, + ai_default_commands: { + continue_writing: { + title: "继续写作", + aliases: undefined, + }, + summarize: { + title: "总结", + aliases: undefined, + }, + add_action_items: { + title: "添加行动项", + aliases: undefined, + }, + write_anything: { + title: "写任何内容…", + aliases: undefined, + prompt_placeholder: "写关于 ", + }, + simplify: { + title: "简化", + aliases: undefined, + }, + translate: { + title: "翻译…", + aliases: undefined, + prompt_placeholder: "翻译成 ", + }, + fix_spelling: { + title: "修正拼写", + aliases: undefined, + }, + improve_writing: { + title: "改进写作", + aliases: undefined, + }, + }, + ai_menu: { + input_placeholder: "向人工智能提问任何问题…", + status: { + thinking: "思考中…", + editing: "编辑中…", + error: "哎呀!出了点问题", + }, + actions: { + accept: { title: "接受", aliases: undefined }, + retry: { title: "重试", aliases: undefined }, + cancel: { title: "取消", aliases: undefined }, + revert: { title: "恢复", aliases: undefined }, + }, + }, +}; diff --git a/packages/xl-ai/src/i18n/useAIDictionary.ts b/packages/xl-ai/src/i18n/useAIDictionary.ts new file mode 100644 index 0000000000..ed63fdcb01 --- /dev/null +++ b/packages/xl-ai/src/i18n/useAIDictionary.ts @@ -0,0 +1,8 @@ +import { useBlockNoteContext } from "@blocknote/react"; + +import { getAIDictionary } from "./dictionary.js"; + +export function useAIDictionary() { + const ctx = useBlockNoteContext(); + return getAIDictionary(ctx!.editor!); +} diff --git a/packages/xl-ai/src/index.ts b/packages/xl-ai/src/index.ts new file mode 100644 index 0000000000..2957484d72 --- /dev/null +++ b/packages/xl-ai/src/index.ts @@ -0,0 +1,16 @@ +import "./style.css"; + +export * from "./AIExtension.js"; +export * from "./blocknoteAIClient/client.js"; +export * from "./components/AIMenu/AIMenu.js"; +export * from "./components/AIMenu/AIMenuController.js"; +export * from "./components/AIMenu/BlockPositioner.js"; +export * from "./components/AIMenu/getDefaultAIMenuItems.js"; +export * from "./components/AIMenu/PromptSuggestionMenu.js"; +export * from "./components/FormattingToolbar/AIToolbarButton.js"; +export * from "./components/SuggestionMenu/getAISlashMenuItems.js"; + +export * from "./i18n/dictionary.js"; +export * as locales from "./i18n/locales/index.js"; + +export * from "./api/index.js"; diff --git a/packages/xl-ai/src/plugins/AgentCursorPlugin.ts b/packages/xl-ai/src/plugins/AgentCursorPlugin.ts new file mode 100644 index 0000000000..f2492e1a08 --- /dev/null +++ b/packages/xl-ai/src/plugins/AgentCursorPlugin.ts @@ -0,0 +1,101 @@ +import { Plugin, PluginKey } from "prosemirror-state"; +import { Decoration, DecorationSet } from "prosemirror-view"; +import { defaultSelectionBuilder } from "y-prosemirror"; + +type AgentCursorState = { + selection: { anchor: number; head: number } | undefined; +}; +const PLUGIN_KEY = new PluginKey(`blocknote-agent-cursor`); + +/** + * Plugin that renders an "AI" cursor + */ +export function createAgentCursorPlugin(agentCursor: { + name: string; + color: string; +}) { + return new Plugin({ + key: PLUGIN_KEY, + view: (_view) => { + return {}; + }, + state: { + init: () => { + return { + selection: undefined, + }; + }, + apply: (tr, _oldState) => { + const meta = tr.getMeta("aiAgent"); + + if (!meta) { + return { + selection: undefined, + }; + } + + return { + selection: meta.selection, + }; + }, + }, + props: { + decorations: (state) => { + const { doc } = state; + + const { selection } = PLUGIN_KEY.getState(state)!; + + const decs = []; + + if (!selection) { + return DecorationSet.create(doc, []); + } + + decs.push( + Decoration.widget(selection.head, () => renderCursor(agentCursor), { + key: "agent-cursor", + side: 10, + }), + ); + + const from = Math.min(selection.anchor, selection.head); + const to = Math.max(selection.anchor, selection.head); + + decs.push( + Decoration.inline(from, to, defaultSelectionBuilder(agentCursor), { + inclusiveEnd: true, + inclusiveStart: false, + }), + ); + + return DecorationSet.create(doc, decs); + }, + }, + }); +} + +const renderCursor = (user: { name: string; color: string }) => { + const cursorElement = document.createElement("span"); + + cursorElement.classList.add("bn-collaboration-cursor__base"); + cursorElement.setAttribute("data-active", "true"); + + const caretElement = document.createElement("span"); + caretElement.setAttribute("contentedEditable", "false"); + caretElement.classList.add("bn-collaboration-cursor__caret"); + caretElement.setAttribute("style", `background-color: ${user.color}`); + + const labelElement = document.createElement("span"); + + labelElement.classList.add("bn-collaboration-cursor__label"); + labelElement.setAttribute("style", `background-color: ${user.color}`); + labelElement.insertBefore(document.createTextNode(user.name), null); + + caretElement.insertBefore(labelElement, null); + + cursorElement.insertBefore(document.createTextNode("\u2060"), null); // Non-breaking space + cursorElement.insertBefore(caretElement, null); + cursorElement.insertBefore(document.createTextNode("\u2060"), null); // Non-breaking space + + return cursorElement; +}; diff --git a/packages/xl-ai/src/prosemirror/__snapshots__/agent.test.ts.snap b/packages/xl-ai/src/prosemirror/__snapshots__/agent.test.ts.snap new file mode 100644 index 0000000000..25dd9c3495 --- /dev/null +++ b/packages/xl-ai/src/prosemirror/__snapshots__/agent.test.ts.snap @@ -0,0 +1,702 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`agentStepToTr > Update > clear block formatting 1`] = ` +[ + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Colored text"}]}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"backgroundColor","previousValue":"red","newValue":"default"}}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"right"},"content":[{"type":"text","text":"Aligned text"}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Colored text"}]}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"backgroundColor","previousValue":"red","newValue":"default"}}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Aligned text"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"right","newValue":"left"}}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > drop mark and link 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}},{"type":"deletion","attrs":{"id":null}}],"text":"Link."},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > drop mark and link and change text within mark 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"H"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold"},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold "},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold t"},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold th"},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold the"},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold the"},{"type":"text","marks":[{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold the"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold the"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Hi"},{"type":"text","text":", world! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"Bold"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Bold the"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":" text. "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}},{"type":"deletion","attrs":{"id":null}}],"text":"Link."},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > modify nested content 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Apples"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"A"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Apples"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"AP"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Apples"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"APP"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Apples"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"APPL"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Apples"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"APPLE"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Apples"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"APPLES"}]}]}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > modify parent content 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"N"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NE"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEE"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED "},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED T"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED TO"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED TO "},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED TO B"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED TO BU"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"need to buy"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"NEED TO BUY"},{"type":"text","text":":"}]},{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}]}]}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > plain source block, add mention 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"world"},{"type":"mention","attrs":{"user":"Jane Doe"},"marks":[{"type":"insertion","attrs":{"id":null}}]},{"type":"text","text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > standard update 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"world"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"W"},{"type":"text","text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"world"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"We"},{"type":"text","text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"world"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Wel"},{"type":"text","text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"world"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Welt"},{"type":"text","text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > styles + ic in source block, remove mark 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > styles + ic in source block, remove mention 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":", "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > styles + ic in source block, replace content 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"u"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"up"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"upd"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"upda"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updat"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"update"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated "}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated c"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated co"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated con"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated cont"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated conte"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated conten"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"updated content"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > styles + ic in source block, update mention prop 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"},"marks":[{"type":"deletion","attrs":{"id":null}}]},{"type":"mention","attrs":{"user":"Jane Doe"},"marks":[{"type":"insertion","attrs":{"id":null}}]},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > styles + ic in source block, update text 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"W"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wi"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie g"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie ge"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geh"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht e"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es d"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es di"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"D"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Di"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Die"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dies"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Diese"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser T"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser Te"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser Tex"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"is blue"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"i"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"is blue"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"is"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"is blue"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"ist"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"is blue"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"ist "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"is blue"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"ist b"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"is blue"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"ist bl"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"is blue"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"ist bla"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"bold"}],"text":"How are you doing?"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Wie geht es dir?"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":" "},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"Dieser Text"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":" "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"is blue"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"ist blau"},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > styles + ic in target block, add mark (paragraph) 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello, world!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > styles + ic in target block, add mark (word) 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"world!"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}},{"type":"bold"}],"text":"world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > translate selection 1`] = ` +[ + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world!"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"H"},{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"e"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"a"},{"type":"text","text":"llo, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > turn paragraphs into list 1`] = ` +[ + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"bulletListItem","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"bulletListItem"}}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Bananas"}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"I need to buy:"}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"bulletListItem","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Apples"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"bulletListItem"}}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"bulletListItem","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Bananas"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"bulletListItem"}}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > update block prop 1`] = ` +[ + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"right"},"content":[{"type":"text","text":"Hello, world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > update block prop and content 1`] = ` +[ + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"right"},"content":[{"type":"text","text":"Hello, world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"right"},"content":[{"type":"text","text":"Hello, world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"W"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Wh"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Wha"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What'"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's "},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's u"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"right"},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's up"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"textAlignment","previousValue":"left","newValue":"right"}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > update block type 1`] = ` +[ + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"heading","attrs":{"textAlignment":"left","level":1},"content":[{"type":"text","text":"Hello, world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`agentStepToTr > Update > update block type and content 1`] = ` +[ + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"heading","attrs":{"textAlignment":"left","level":1},"content":[{"type":"text","text":"Hello, world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "S {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"heading","attrs":{"textAlignment":"left","level":1},"content":[{"type":"text","text":"Hello, world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "R {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"heading","attrs":{"textAlignment":"left","level":1},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"W"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"heading","attrs":{"textAlignment":"left","level":1},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Wh"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"heading","attrs":{"textAlignment":"left","level":1},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"Wha"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"heading","attrs":{"textAlignment":"left","level":1},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"heading","attrs":{"textAlignment":"left","level":1},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What'"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"heading","attrs":{"textAlignment":"left","level":1},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"heading","attrs":{"textAlignment":"left","level":1},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's "},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"heading","attrs":{"textAlignment":"left","level":1},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's u"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", + "I {"type":"doc","content":[{"type":"blockGroup","content":[{"type":"blockContainer","attrs":{"id":"ref1","textColor":"default","backgroundColor":"default"},"content":[{"type":"heading","attrs":{"textAlignment":"left","level":1},"content":[{"type":"text","marks":[{"type":"deletion","attrs":{"id":null}}],"text":"Hello"},{"type":"text","marks":[{"type":"insertion","attrs":{"id":null}}],"text":"What's up"},{"type":"text","text":", world!"}],"marks":[{"type":"modification","attrs":{"id":null,"type":"nodeType","attrName":null,"previousValue":"paragraph","newValue":"heading"}},{"type":"modification","attrs":{"id":null,"type":"attr","attrName":"level","previousValue":null,"newValue":1}}]}]},{"type":"blockContainer","attrs":{"id":"ref2","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, "},{"type":"mention","attrs":{"user":"John Doe"}},{"type":"text","text":"! "},{"type":"text","marks":[{"type":"bold"}],"text":"How are you doing?"},{"type":"text","text":" "},{"type":"text","marks":[{"type":"textColor","attrs":{"stringValue":"blue"}}],"text":"This text is blue!"}]}]},{"type":"blockContainer","attrs":{"id":"ref3","textColor":"default","backgroundColor":"default"},"content":[{"type":"paragraph","attrs":{"textAlignment":"left"},"content":[{"type":"text","text":"Hello, world! "},{"type":"text","marks":[{"type":"bold"}],"text":"Bold text. "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.google.com","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"Link."}]}]}]}]}", +] +`; + +exports[`getStepsAsAgent > multiple steps 1`] = ` +[ + { + "prosemirrorSteps": [], + "selection": { + "anchor": 3, + "head": 8, + }, + "type": "select", + }, + { + "prosemirrorSteps": [ + { + "from": 3, + "mark": { + "attrs": { + "id": null, + }, + "type": "deletion", + }, + "stepType": "addMark", + "to": 8, + }, + { + "from": 8, + "slice": { + "content": [ + { + "text": "H", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 8, + }, + { + "from": 8, + "mark": { + "attrs": { + "id": null, + }, + "type": "insertion", + }, + "stepType": "addMark", + "to": 9, + }, + ], + "selection": { + "anchor": 9, + "head": 9, + }, + "type": "replace", + }, + { + "prosemirrorSteps": [ + { + "from": 8, + "slice": { + "content": [ + { + "text": "Hi", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 9, + }, + { + "from": 8, + "mark": { + "attrs": { + "id": null, + }, + "type": "insertion", + }, + "stepType": "addMark", + "to": 10, + }, + ], + "selection": { + "anchor": 10, + "head": 10, + }, + "type": "insert", + }, + { + "prosemirrorSteps": [], + "selection": { + "anchor": 12, + "head": 17, + }, + "type": "select", + }, + { + "prosemirrorSteps": [ + { + "from": 12, + "mark": { + "attrs": { + "id": null, + }, + "type": "deletion", + }, + "stepType": "addMark", + "to": 17, + }, + { + "from": 17, + "slice": { + "content": [ + { + "text": "t", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 17, + }, + { + "from": 17, + "mark": { + "attrs": { + "id": null, + }, + "type": "insertion", + }, + "stepType": "addMark", + "to": 18, + }, + ], + "selection": { + "anchor": 18, + "head": 18, + }, + "type": "replace", + }, + { + "prosemirrorSteps": [ + { + "from": 17, + "slice": { + "content": [ + { + "text": "th", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 18, + }, + { + "from": 17, + "mark": { + "attrs": { + "id": null, + }, + "type": "insertion", + }, + "stepType": "addMark", + "to": 19, + }, + ], + "selection": { + "anchor": 19, + "head": 19, + }, + "type": "insert", + }, + { + "prosemirrorSteps": [ + { + "from": 17, + "slice": { + "content": [ + { + "text": "the", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 19, + }, + { + "from": 17, + "mark": { + "attrs": { + "id": null, + }, + "type": "insertion", + }, + "stepType": "addMark", + "to": 20, + }, + ], + "selection": { + "anchor": 20, + "head": 20, + }, + "type": "insert", + }, + { + "prosemirrorSteps": [ + { + "from": 17, + "slice": { + "content": [ + { + "text": "ther", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 20, + }, + { + "from": 17, + "mark": { + "attrs": { + "id": null, + }, + "type": "insertion", + }, + "stepType": "addMark", + "to": 21, + }, + ], + "selection": { + "anchor": 21, + "head": 21, + }, + "type": "insert", + }, + { + "prosemirrorSteps": [ + { + "from": 17, + "slice": { + "content": [ + { + "text": "there", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 21, + }, + { + "from": 17, + "mark": { + "attrs": { + "id": null, + }, + "type": "insertion", + }, + "stepType": "addMark", + "to": 22, + }, + ], + "selection": { + "anchor": 22, + "head": 22, + }, + "type": "insert", + }, +] +`; + +exports[`getStepsAsAgent > node attr change 1`] = ` +[ + { + "prosemirrorSteps": [ + { + "from": 2, + "gapFrom": 3, + "gapTo": 16, + "insert": 1, + "slice": { + "content": [ + { + "attrs": { + "textAlignment": "right", + }, + "marks": [ + { + "attrs": { + "attrName": "textAlignment", + "id": null, + "newValue": "right", + "previousValue": "left", + "type": "attr", + }, + "type": "modification", + }, + ], + "type": "paragraph", + }, + ], + }, + "stepType": "replaceAround", + "structure": true, + "to": 17, + }, + ], + "selection": undefined, + "type": "replace", + }, +] +`; + +exports[`getStepsAsAgent > node type change 1`] = ` +[ + { + "prosemirrorSteps": [ + { + "from": 2, + "gapFrom": 3, + "gapTo": 16, + "insert": 1, + "slice": { + "content": [ + { + "attrs": { + "level": 1, + "textAlignment": "left", + }, + "marks": [ + { + "attrs": { + "attrName": null, + "id": null, + "newValue": "heading", + "previousValue": "paragraph", + "type": "nodeType", + }, + "type": "modification", + }, + { + "attrs": { + "attrName": "level", + "id": null, + "newValue": 1, + "previousValue": null, + "type": "attr", + }, + "type": "modification", + }, + ], + "type": "heading", + }, + ], + }, + "stepType": "replaceAround", + "structure": true, + "to": 17, + }, + ], + "selection": undefined, + "type": "replace", + }, +] +`; + +exports[`getStepsAsAgent > simple replace step 1`] = ` +[ + { + "prosemirrorSteps": [], + "selection": { + "anchor": 3, + "head": 8, + }, + "type": "select", + }, + { + "prosemirrorSteps": [ + { + "from": 3, + "mark": { + "attrs": { + "id": null, + }, + "type": "deletion", + }, + "stepType": "addMark", + "to": 8, + }, + { + "from": 8, + "slice": { + "content": [ + { + "text": "H", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 8, + }, + { + "from": 8, + "mark": { + "attrs": { + "id": null, + }, + "type": "insertion", + }, + "stepType": "addMark", + "to": 9, + }, + ], + "selection": { + "anchor": 9, + "head": 9, + }, + "type": "replace", + }, + { + "prosemirrorSteps": [ + { + "from": 8, + "slice": { + "content": [ + { + "text": "Hi", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 9, + }, + { + "from": 8, + "mark": { + "attrs": { + "id": null, + }, + "type": "insertion", + }, + "stepType": "addMark", + "to": 10, + }, + ], + "selection": { + "anchor": 10, + "head": 10, + }, + "type": "insert", + }, +] +`; diff --git a/packages/xl-ai/src/prosemirror/__snapshots__/changeset.test.ts.snap b/packages/xl-ai/src/prosemirror/__snapshots__/changeset.test.ts.snap new file mode 100644 index 0000000000..bfa1c99dc9 --- /dev/null +++ b/packages/xl-ai/src/prosemirror/__snapshots__/changeset.test.ts.snap @@ -0,0 +1,1047 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`clear block formatting 1`] = ` +[ + { + "replaced": { + "content": [ + { + "attrs": { + "backgroundColor": "red", + "id": "ref1", + "textColor": "default", + }, + "type": "blockContainer", + }, + ], + "openEnd": 1, + }, + "step": { + "from": 1, + "slice": { + "content": [ + { + "attrs": { + "backgroundColor": "default", + "id": "ref1", + "textColor": "default", + }, + "type": "blockContainer", + }, + ], + "openEnd": 1, + }, + "stepType": "replace", + "structure": true, + "to": 2, + }, + }, +] +`; + +exports[`clear block formatting 2`] = ` +[ + { + "replaced": { + "content": [ + { + "attrs": { + "textAlignment": "right", + }, + "type": "paragraph", + }, + ], + "openEnd": 1, + }, + "step": { + "from": 18, + "slice": { + "content": [ + { + "attrs": { + "textAlignment": "left", + }, + "type": "paragraph", + }, + ], + "openEnd": 1, + }, + "stepType": "replace", + "structure": true, + "to": 19, + }, + }, +] +`; + +exports[`drop mark and link 1`] = ` +[ + { + "replaced": { + "content": [ + { + "marks": [ + { + "type": "bold", + }, + ], + "text": "Bold text. ", + "type": "text", + }, + ], + }, + "step": { + "from": 85, + "slice": { + "content": [ + { + "text": "Bold text. ", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 96, + }, + }, + { + "replaced": { + "content": [ + { + "marks": [ + { + "attrs": { + "class": null, + "href": "https://www.google.com", + "rel": "noopener noreferrer nofollow", + "target": "_blank", + }, + "type": "link", + }, + ], + "text": "Link.", + "type": "text", + }, + ], + }, + "step": { + "from": 96, + "slice": { + "content": [ + { + "text": "Link.", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 101, + }, + }, +] +`; + +exports[`drop mark and link and change text within mark 1`] = ` +[ + { + "replaced": { + "content": [ + { + "text": "Hello", + "type": "text", + }, + ], + }, + "step": { + "from": 71, + "slice": { + "content": [ + { + "text": "Hi", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 76, + }, + }, + { + "replaced": { + "content": [ + { + "marks": [ + { + "type": "bold", + }, + ], + "text": "Bold", + "type": "text", + }, + ], + }, + "step": { + "from": 85, + "slice": { + "content": [ + { + "text": "Bold", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 89, + }, + }, + { + "replaced": null, + "step": { + "from": 89, + "slice": { + "content": [ + { + "text": " the", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 89, + }, + }, + { + "replaced": { + "content": [ + { + "marks": [ + { + "type": "bold", + }, + ], + "text": " text. ", + "type": "text", + }, + ], + }, + "step": { + "from": 89, + "slice": { + "content": [ + { + "text": " text. ", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 96, + }, + }, + { + "replaced": { + "content": [ + { + "marks": [ + { + "attrs": { + "class": null, + "href": "https://www.google.com", + "rel": "noopener noreferrer nofollow", + "target": "_blank", + }, + "type": "link", + }, + ], + "text": "Link.", + "type": "text", + }, + ], + }, + "step": { + "from": 96, + "slice": { + "content": [ + { + "text": "Link.", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 101, + }, + }, +] +`; + +exports[`modify nested content 1`] = ` +[ + { + "replaced": { + "content": [ + { + "text": "Apples", + "type": "text", + }, + ], + }, + "step": { + "from": 21, + "slice": { + "content": [ + { + "text": "APPLES", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 27, + }, + }, +] +`; + +exports[`modify parent content 1`] = ` +[ + { + "replaced": { + "content": [ + { + "text": "need to buy", + "type": "text", + }, + ], + }, + "step": { + "from": 5, + "slice": { + "content": [ + { + "text": "NEED TO BUY", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 16, + }, + }, +] +`; + +exports[`plain source block, add mention 1`] = ` +[ + { + "replaced": { + "content": [ + { + "text": "world", + "type": "text", + }, + ], + }, + "step": { + "from": 10, + "slice": { + "content": [ + { + "attrs": { + "user": "Jane Doe", + }, + "type": "mention", + }, + ], + }, + "stepType": "replace", + "to": 15, + }, + }, +] +`; + +exports[`standard update 1`] = ` +[ + { + "replaced": { + "content": [ + { + "text": "e", + "type": "text", + }, + ], + }, + "step": { + "from": 4, + "slice": { + "content": [ + { + "text": "a", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 5, + }, + }, + { + "replaced": { + "content": [ + { + "text": "world", + "type": "text", + }, + ], + }, + "step": { + "from": 10, + "slice": { + "content": [ + { + "text": "Welt", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 15, + }, + }, +] +`; + +exports[`styles + ic in source block, remove mark 1`] = ` +[ + { + "replaced": { + "content": [ + { + "marks": [ + { + "type": "bold", + }, + ], + "text": "How are you doing?", + "type": "text", + }, + ], + }, + "step": { + "from": 30, + "slice": { + "content": [ + { + "text": "How are you doing?", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 48, + }, + }, +] +`; + +exports[`styles + ic in source block, remove mention 1`] = ` +[ + { + "replaced": { + "content": [ + { + "text": ", ", + "type": "text", + }, + { + "attrs": { + "user": "John Doe", + }, + "type": "mention", + }, + ], + }, + "step": { + "from": 25, + "stepType": "replace", + "to": 28, + }, + }, +] +`; + +exports[`styles + ic in source block, replace content 1`] = ` +[ + { + "replaced": { + "content": [ + { + "attrs": { + "user": "John Doe", + }, + "type": "mention", + }, + { + "text": "! ", + "type": "text", + }, + { + "marks": [ + { + "type": "bold", + }, + ], + "text": "How are you doing?", + "type": "text", + }, + { + "text": " ", + "type": "text", + }, + { + "marks": [ + { + "attrs": { + "stringValue": "blue", + }, + "type": "textColor", + }, + ], + "text": "This text is blue!", + "type": "text", + }, + ], + }, + "step": { + "from": 27, + "slice": { + "content": [ + { + "text": "updated content", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 67, + }, + }, +] +`; + +exports[`styles + ic in source block, update mention prop 1`] = ` +[ + { + "replaced": { + "content": [ + { + "attrs": { + "user": "John Doe", + }, + "type": "mention", + }, + ], + }, + "step": { + "from": 27, + "slice": { + "content": [ + { + "attrs": { + "user": "Jane Doe", + }, + "type": "mention", + }, + ], + }, + "stepType": "replace", + "to": 28, + }, + }, +] +`; + +exports[`styles + ic in source block, update text 1`] = ` +[ + { + "replaced": { + "content": [ + { + "text": "e", + "type": "text", + }, + ], + }, + "step": { + "from": 21, + "slice": { + "content": [ + { + "text": "a", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 22, + }, + }, + { + "replaced": { + "content": [ + { + "marks": [ + { + "type": "bold", + }, + ], + "text": "How are you doing?", + "type": "text", + }, + { + "text": " ", + "type": "text", + }, + { + "marks": [ + { + "attrs": { + "stringValue": "blue", + }, + "type": "textColor", + }, + ], + "text": "This text", + "type": "text", + }, + ], + }, + "step": { + "from": 30, + "slice": { + "content": [ + { + "marks": [ + { + "type": "bold", + }, + ], + "text": "Wie geht es dir?", + "type": "text", + }, + { + "text": " ", + "type": "text", + }, + { + "marks": [ + { + "attrs": { + "stringValue": "blue", + }, + "type": "textColor", + }, + ], + "text": "Dieser Text", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 58, + }, + }, + { + "replaced": { + "content": [ + { + "marks": [ + { + "attrs": { + "stringValue": "blue", + }, + "type": "textColor", + }, + ], + "text": "is blue", + "type": "text", + }, + ], + }, + "step": { + "from": 59, + "slice": { + "content": [ + { + "marks": [ + { + "attrs": { + "stringValue": "blue", + }, + "type": "textColor", + }, + ], + "text": "ist blau", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 66, + }, + }, +] +`; + +exports[`styles + ic in target block, add mark (paragraph) 1`] = ` +[ + { + "replaced": { + "content": [ + { + "text": "Hello, world!", + "type": "text", + }, + ], + }, + "step": { + "from": 3, + "slice": { + "content": [ + { + "marks": [ + { + "type": "bold", + }, + ], + "text": "Hello, world!", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 16, + }, + }, +] +`; + +exports[`styles + ic in target block, add mark (word) 1`] = ` +[ + { + "replaced": { + "content": [ + { + "text": "world!", + "type": "text", + }, + ], + }, + "step": { + "from": 10, + "slice": { + "content": [ + { + "marks": [ + { + "type": "bold", + }, + ], + "text": "world!", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 16, + }, + }, +] +`; + +exports[`translate selection 1`] = ` +[ + { + "replaced": { + "content": [ + { + "text": "e", + "type": "text", + }, + ], + }, + "step": { + "from": 21, + "slice": { + "content": [ + { + "text": "a", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 22, + }, + }, +] +`; + +exports[`turn paragraphs into list 1`] = ` +[ + { + "replaced": { + "content": [ + { + "attrs": { + "textAlignment": "left", + }, + "type": "paragraph", + }, + ], + "openEnd": 1, + }, + "step": { + "from": 20, + "slice": { + "content": [ + { + "attrs": { + "textAlignment": "left", + }, + "type": "bulletListItem", + }, + ], + "openEnd": 1, + }, + "stepType": "replace", + "structure": true, + "to": 21, + }, + }, +] +`; + +exports[`turn paragraphs into list 2`] = ` +[ + { + "replaced": { + "content": [ + { + "attrs": { + "textAlignment": "left", + }, + "type": "paragraph", + }, + ], + "openEnd": 1, + }, + "step": { + "from": 30, + "slice": { + "content": [ + { + "attrs": { + "textAlignment": "left", + }, + "type": "bulletListItem", + }, + ], + "openEnd": 1, + }, + "stepType": "replace", + "structure": true, + "to": 31, + }, + }, +] +`; + +exports[`update block prop 1`] = ` +[ + { + "replaced": { + "content": [ + { + "attrs": { + "textAlignment": "left", + }, + "type": "paragraph", + }, + ], + "openEnd": 1, + }, + "step": { + "from": 2, + "slice": { + "content": [ + { + "attrs": { + "textAlignment": "right", + }, + "type": "paragraph", + }, + ], + "openEnd": 1, + }, + "stepType": "replace", + "structure": true, + "to": 3, + }, + }, +] +`; + +exports[`update block prop and content 1`] = ` +[ + { + "replaced": { + "content": [ + { + "attrs": { + "textAlignment": "left", + }, + "type": "paragraph", + }, + ], + "openEnd": 1, + }, + "step": { + "from": 2, + "slice": { + "content": [ + { + "attrs": { + "textAlignment": "right", + }, + "type": "paragraph", + }, + ], + "openEnd": 1, + }, + "stepType": "replace", + "structure": true, + "to": 3, + }, + }, + { + "replaced": { + "content": [ + { + "text": "Hello", + "type": "text", + }, + ], + }, + "step": { + "from": 3, + "slice": { + "content": [ + { + "text": "What's up", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 8, + }, + }, +] +`; + +exports[`update block type 1`] = ` +[ + { + "replaced": { + "content": [ + { + "attrs": { + "textAlignment": "left", + }, + "type": "paragraph", + }, + ], + "openEnd": 1, + }, + "step": { + "from": 2, + "slice": { + "content": [ + { + "attrs": { + "level": 1, + "textAlignment": "left", + }, + "type": "heading", + }, + ], + "openEnd": 1, + }, + "stepType": "replace", + "structure": true, + "to": 3, + }, + }, +] +`; + +exports[`update block type and content 1`] = ` +[ + { + "replaced": { + "content": [ + { + "attrs": { + "textAlignment": "left", + }, + "type": "paragraph", + }, + ], + "openEnd": 1, + }, + "step": { + "from": 2, + "slice": { + "content": [ + { + "attrs": { + "level": 1, + "textAlignment": "left", + }, + "type": "heading", + }, + ], + "openEnd": 1, + }, + "stepType": "replace", + "structure": true, + "to": 3, + }, + }, + { + "replaced": { + "content": [ + { + "text": "Hello", + "type": "text", + }, + ], + }, + "step": { + "from": 3, + "slice": { + "content": [ + { + "text": "What's up", + "type": "text", + }, + ], + }, + "stepType": "replace", + "to": 8, + }, + }, +] +`; diff --git a/packages/xl-ai/src/prosemirror/__snapshots__/rebaseTool.test.ts.snap b/packages/xl-ai/src/prosemirror/__snapshots__/rebaseTool.test.ts.snap new file mode 100644 index 0000000000..fd58fef1ce --- /dev/null +++ b/packages/xl-ai/src/prosemirror/__snapshots__/rebaseTool.test.ts.snap @@ -0,0 +1,154 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`should be able to apply changes to a clean doc (use invertMap) 1`] = ` +{ + "content": [ + { + "content": [ + { + "attrs": { + "backgroundColor": "default", + "id": "1", + "textColor": "default", + }, + "content": [ + { + "attrs": { + "textAlignment": "left", + }, + "content": [ + { + "marks": [ + { + "attrs": { + "id": null, + }, + "type": "deletion", + }, + ], + "text": "Hello", + "type": "text", + }, + { + "text": "What's up, world!", + "type": "text", + }, + ], + "type": "paragraph", + }, + ], + "type": "blockContainer", + }, + ], + "type": "blockGroup", + }, + ], + "type": "doc", +} +`; + +exports[`should be able to apply changes to a clean doc (use rebaseTr) 1`] = ` +{ + "content": [ + { + "content": [ + { + "attrs": { + "backgroundColor": "default", + "id": "1", + "textColor": "default", + }, + "content": [ + { + "attrs": { + "textAlignment": "left", + }, + "content": [ + { + "marks": [ + { + "attrs": { + "id": null, + }, + "type": "deletion", + }, + ], + "text": "Hello", + "type": "text", + }, + { + "text": "What's up, world!", + "type": "text", + }, + ], + "type": "paragraph", + }, + ], + "type": "blockContainer", + }, + ], + "type": "blockGroup", + }, + ], + "type": "doc", +} +`; + +exports[`should create some example suggestions 1`] = ` +{ + "content": [ + { + "content": [ + { + "attrs": { + "backgroundColor": "default", + "id": "1", + "textColor": "default", + }, + "content": [ + { + "attrs": { + "textAlignment": "left", + }, + "content": [ + { + "marks": [ + { + "attrs": { + "id": null, + }, + "type": "deletion", + }, + ], + "text": "Hello", + "type": "text", + }, + { + "marks": [ + { + "attrs": { + "id": null, + }, + "type": "insertion", + }, + ], + "text": "Hi", + "type": "text", + }, + { + "text": ", world!", + "type": "text", + }, + ], + "type": "paragraph", + }, + ], + "type": "blockContainer", + }, + ], + "type": "blockGroup", + }, + ], + "type": "doc", +} +`; diff --git a/packages/xl-ai/src/prosemirror/agent.test.ts b/packages/xl-ai/src/prosemirror/agent.test.ts new file mode 100644 index 0000000000..a3eb716367 --- /dev/null +++ b/packages/xl-ai/src/prosemirror/agent.test.ts @@ -0,0 +1,259 @@ +import { BlockNoteEditor, getBlockInfo, getNodeById } from "@blocknote/core"; +import { Fragment, Slice } from "prosemirror-model"; +import { ReplaceStep } from "prosemirror-transform"; +import { describe, expect, it } from "vitest"; +import { getAIExtension } from "../AIExtension.js"; +import { + DocumentOperationTestCase, + getExpectedEditor, +} from "../testUtil/cases/index.js"; +import { updateOperationTestCases } from "../testUtil/cases/updateOperationTestCases.js"; +import { validateRejectingResultsInOriginalDoc } from "../testUtil/suggestChangesTestUtil.js"; +import { agentStepToTr, getStepsAsAgent } from "./agent.js"; +import { updateToReplaceSteps } from "./changeset.js"; + +describe("getStepsAsAgent", () => { + // some basic tests to check `getStepsAsAgent` is working as expected + + // Helper function to create a test editor with a simple paragraph + function createTestEditor() { + return BlockNoteEditor.create({ + initialContent: [ + { + id: "1", + type: "paragraph", + content: "Hello, world!", + }, + ], + }); + } + + it("simple replace step", async () => { + const editor = createTestEditor(); + const doc = editor.prosemirrorState.doc; + // Get the position of the content in the paragraph + const blockPos = getNodeById("1", doc)!; + const block = getBlockInfo(blockPos); + if (!block.isBlockContainer) { + throw new Error("Block is not a container"); + } + + const contentStart = block.blockContent.beforePos; + + // Create a ReplaceStep that replaces "Hello" with "Hi" + const from = contentStart + 1; // +1 to skip the initial position + const to = contentStart + 6; // "Hello" is 5 characters + + // Create a slice using the editor's schema + const fragment = Fragment.from(editor.pmSchema.text("Hi")); + + // const slice = fragment.slice(0, fragment.content.size); + + const step = new ReplaceStep(from, to, new Slice(fragment, 0, 0)); + + // Apply the step + const steps = getStepsAsAgent(doc, editor.pmSchema, [step]); + + // Verify dispatch was called with the correct transactions + expect(steps).toHaveLength(3); // select, replace, insert + + expect(steps).toMatchSnapshot(); + }); + + it("node type change", async () => { + const editor = createTestEditor(); + const doc = editor.prosemirrorState.doc; + // Get the position of the content in the paragraph + const blockPos = getNodeById("1", doc)!; + const block = getBlockInfo(blockPos); + if (!block.isBlockContainer) { + throw new Error("Block is not a container"); + } + + const tr = editor.prosemirrorState.tr.setNodeMarkup( + block.blockContent.beforePos, + editor.pmSchema.nodes.heading, + ); + + expect(tr.steps.length).toBe(1); + + // Apply the step + const steps = getStepsAsAgent(doc, editor.pmSchema, tr.steps); + + // Verify dispatch was called with the correct transactions + expect(steps).toHaveLength(1); // select, replace, insert + + expect(steps).toMatchSnapshot(); + }); + + it("node attr change", async () => { + const editor = createTestEditor(); + const doc = editor.prosemirrorState.doc; + // Get the position of the content in the paragraph + const blockPos = getNodeById("1", doc)!; + const block = getBlockInfo(blockPos); + if (!block.isBlockContainer) { + throw new Error("Block is not a container"); + } + + const tr = editor.prosemirrorState.tr.setNodeMarkup( + block.blockContent.beforePos, + undefined, + { + textAlignment: "right", + }, + ); + + expect(tr.steps.length).toBe(1); + + // Apply the step + const steps = getStepsAsAgent(doc, editor.pmSchema, tr.steps); + + // Verify dispatch was called with the correct transactions + expect(steps).toHaveLength(1); // select, replace, insert + + expect(steps).toMatchSnapshot(); + }); + + it("node type and content change", async () => { + const editor = createTestEditor(); + + const doc = editor.prosemirrorState.doc; + // Get the position of the content in the paragraph + const blockPos = getNodeById("1", doc)!; + const block = getBlockInfo(blockPos); + if (!block.isBlockContainer) { + throw new Error("Block is not a container"); + } + + const step = new ReplaceStep( + block.blockContent.beforePos, + block.blockContent.beforePos + 3, + // for simplicity, we're not actually changing the node type and content, but we just use the existing document + // as replacement content + doc.slice(block.blockContent.beforePos, block.blockContent.beforePos + 3), + ); + + await expect(() => getStepsAsAgent(doc, editor.pmSchema, [step])).toThrow( + "Slice has openStart or openEnd > 0, but structure=false", + ); + }); + + it("multiple steps", async () => { + const editor = createTestEditor(); + const doc = editor.prosemirrorState.doc; + + // Get the position of the content in the paragraph + const blockPos = getNodeById("1", doc)!; + const block = getBlockInfo(blockPos); + if (!block.isBlockContainer) { + throw new Error("Block is not a container"); + } + + const contentStart = block.blockContent.beforePos; + + // Create two ReplaceSteps + // 1. Replace "Hello" with "Hi" + const fragment1 = Fragment.from(editor.pmSchema.text("Hi")); + const step1 = new ReplaceStep( + contentStart + 1, + contentStart + 6, + new Slice(fragment1, 0, 0), + ); + + // 2. Replace "world" with "there" + const fragment2 = Fragment.from(editor.pmSchema.text("there")); + const step2 = new ReplaceStep( + contentStart + 8, + contentStart + 13, + new Slice(fragment2, 0, 0), + ); + + // Apply the steps + const steps = getStepsAsAgent(doc, editor.pmSchema, [step1, step2]); + + // Verify dispatch was called for each step + // For each step: select, replace, and potentially multiple inserts + expect(steps).toHaveLength(9); + + expect(steps).toMatchSnapshot(); + }); + + it("throw error for non-ReplaceSteps", async () => { + const editor = createTestEditor(); + const doc = editor.prosemirrorState.doc; + // Create a non-ReplaceStep (we'll just mock it) + const nonReplaceStep = { from: 0, to: 5 } as any; + + // Expect the function to throw an error + await expect(() => + getStepsAsAgent(doc, editor.pmSchema, [nonReplaceStep]), + ).toThrow("Step is not a ReplaceStep"); + }); +}); + +async function executeTestCase( + editor: BlockNoteEditor, + test: DocumentOperationTestCase, +) { + const results = []; + const doc = editor.prosemirrorState.doc; + for (const updateOp of test.baseToolCalls) { + if (updateOp.type !== "update") { + throw new Error("Only update operations are supported"); + } + const blockId = updateOp.id; + const update = updateOp.block; + + const selection = test.getTestSelection?.(editor); + + const steps = updateToReplaceSteps( + { + id: blockId, + block: update, + }, + doc, + undefined, + selection?.from, + selection?.to, + ); + + const agentSteps = getStepsAsAgent(doc, editor.pmSchema, steps); + + for (const step of agentSteps) { + editor.transact((tr) => { + agentStepToTr(tr, step); + }); + results.push( + step.type.slice(0, 1).toUpperCase() + + " " + + JSON.stringify(editor.prosemirrorState.doc.toJSON()), + ); + } + } + + validateRejectingResultsInOriginalDoc(editor, doc); + expect(results).toMatchSnapshot(); + + getAIExtension(editor).acceptChanges(); + expect(editor.document).toEqual(getExpectedEditor(test).document); + + return results; +} + +describe("agentStepToTr", () => { + // larger test to see if applying the steps work as expected + + // REC: we might also want to test Insert / combined / delete test cases here, + // but this is a little more complex because currently `executeTestCase` expects + // relies directly on `updateToReplaceSteps` which is designed for the update op. + describe("Update", () => { + for (const test of updateOperationTestCases) { + it(`${test.description}`, async () => { + const editor = test.editor(); + + await executeTestCase(editor, test); + }); + } + }); +}); diff --git a/packages/xl-ai/src/prosemirror/agent.ts b/packages/xl-ai/src/prosemirror/agent.ts new file mode 100644 index 0000000000..56b8430e06 --- /dev/null +++ b/packages/xl-ai/src/prosemirror/agent.ts @@ -0,0 +1,301 @@ +import { UnreachableCaseError } from "@blocknote/core"; +import { Node, Schema, Slice } from "prosemirror-model"; +import { TextSelection, Transaction } from "prosemirror-state"; +import { + ReplaceAroundStep, + ReplaceStep, + Step, + Transform, +} from "prosemirror-transform"; +import { getFirstChar } from "./fragmentUtil.js"; + +export type AgentStep = { + prosemirrorSteps: Step[]; + selection: + | { + anchor: number; + head: number; + } + | undefined; + type: "select" | "replace" | "insert"; +}; + +/** + * Takes an array of ReplaceSteps and applies them as a human-like agent. + * Every step is split into 3 phases: + * - select the text to be replaced (1 transaction per ReplaceStep) + * - replace the text with the first character of the replacement (if any) (1 transaction per ReplaceStep) + * - insert the replacement character by character (strlen-1 transactions per ReplaceStep) + */ +export function getStepsAsAgent(doc: Node, pmSchema: Schema, steps: Step[]) { + const { modification } = pmSchema.marks; + + const agentSteps: AgentStep[] = []; + + const tr = new Transform(doc); + + for (const step of steps) { + if ((step as any).structure) { + // Note: for structure changes (e.g.: node type or attr changes) we currently + // don't trigger any selection + + if (step instanceof ReplaceStep) { + if ( + step.to !== step.from + 1 || + step.slice.openStart !== 0 || + step.slice.openEnd !== 1 || + step.slice.content.size !== 2 + ) { + throw new Error( + "Structure change is not in expected format (ReplaceStep)", + ); + } + } else if (step instanceof ReplaceAroundStep) { + // we only support ReplaceAroundSteps generated by SetNodeMarkup + if ( + step.insert !== 1 || + step.slice.size !== 2 || + step.gapTo !== step.to - 1 || + step.gapFrom !== step.from + 1 + ) { + throw new Error( + "Structure change is not in expected format (ReplaceAroundStep)", + ); + } + } else { + throw new Error("Step is not a ReplaceStep or ReplaceAroundStep"); + } + const newNode = step.slice.content.firstChild!; + const oldNode = tr.doc.resolve(tr.mapping.map(step.from)).nodeAfter!; + + let marks = newNode.marks || []; + + if (newNode.type !== oldNode.type) { + marks = modification + .create({ + type: "nodeType", + previousValue: oldNode.type.name, + newValue: newNode.type.name, + }) + .addToSet(marks); + } + + const attrNames = new Set([ + ...Object.keys(newNode.attrs), + ...Object.keys(oldNode.attrs), + ]); + for (const attr of attrNames) { + if (newNode.attrs[attr] !== oldNode.attrs[attr]) { + marks = modification + .create({ + type: "attr", + attrName: attr, + previousValue: oldNode.attrs[attr], + newValue: newNode.attrs[attr], + }) + .addToSet(marks); + } + } + + const stepIndex = tr.steps.length; + tr.setNodeMarkup( + tr.mapping.map(step.from), + newNode.type, + newNode.attrs, + marks, + ); + + agentSteps.push({ + prosemirrorSteps: tr.steps.slice(stepIndex), + selection: undefined, + type: "replace", + }); + + continue; + } + + if (!(step instanceof ReplaceStep)) { + throw new Error("Step is not a ReplaceStep"); + } + + if (step.slice.openStart > 0 || step.slice.openEnd > 0) { + // these kind of changes should not be generated by changeset.ts + throw new Error( + "Slice has openStart or openEnd > 0, but structure=false", + ); + } + + // 1. Select text to be removed/replaced + agentSteps.push({ + prosemirrorSteps: [], + selection: { + anchor: tr.mapping.map(step.from), + head: tr.mapping.map(step.to), + }, + type: "select", + }); + + // Replace the content + const sliceTextContent = step.slice.content.textBetween(0, step.slice.size); + + const alreadyHasSameText = + sliceTextContent === + tr.doc.textBetween(tr.mapping.map(step.from), tr.mapping.map(step.to)); + + let sliceTo: number; + + if (alreadyHasSameText) { + sliceTo = step.slice.content.size; // replace all at once, it's probably a mark update + } else if (sliceTextContent.length === 0) { + sliceTo = step.slice.content.size; // there's no replacement text, so use entire slice as replacement + } else { + // replace with the first character (similar to how a user would do it when selecting text and starting to type) + const firstCharIndex = getFirstChar(step.slice.content); + if (firstCharIndex === undefined) { + // should have been caught by previous if statement + throw new Error("unexpected: no first character found"); + } + sliceTo = firstCharIndex + 1; + } + + let replaceEnd = tr.mapping.map(step.to); + const replaceFrom = tr.mapping.map(step.to); + let first = true; + + // Note that below, we don't actually delete content, but we mark it as deleted + // with a deletion mark. Similarly, we mark inserted content with an insertion mark. + // It might be cleaner to; + // a) make this optional + // b) actually delete / insert the content and let prosemirror-suggest-changes handle the marks + for (let i = sliceTo; i <= step.slice.content.size; i++) { + // in the first agent step (first character replacement) we mark existing content (if any) as deleted + // (step.from !== step.to is used to check for replacements vs inserts) + const isReplacing = first && step.from !== step.to; + + const stepIndex = tr.steps.length; + if (isReplacing) { + const $pos = tr.doc.resolve(tr.mapping.map(step.from)); + if ($pos.nodeAfter?.isBlock) { + // mark the entire node as deleted. This can be needed for inline nodes or table cells + tr.addNodeMark($pos.pos, pmSchema.mark("deletion", {})); + } + tr.addMark($pos.pos, replaceEnd, pmSchema.mark("deletion", {})); + replaceEnd = tr.mapping.map(step.to); + } + + // note, instead of inserting one charachter at a time at the end (a, b, c) + // we're replacing the entire part every time (a, ab, abc) + // would be cleaner to do just insertions, but didn't get this to work with the add operation + // (and this kept code relatively simple) + const replacement = new Slice(step.slice.content.cut(0, i), 0, 0); + + tr.replace(replaceFrom, replaceEnd, replacement).addMark( + replaceFrom, + replaceFrom + replacement.content.size, + pmSchema.mark("insertion", {}), + ); + + tr.doc.nodesBetween( + replaceFrom, + replaceFrom + replacement.content.size, + (node, pos) => { + if ( + pos < replaceFrom || + pos > replaceFrom + replacement.content.size + ) { + return true; + } + if (node.isBlock) { + tr.addNodeMark(pos, pmSchema.mark("insertion", {})); + } + return false; + }, + ); + + replaceEnd = tr.mapping.slice(stepIndex).map(replaceEnd); + + const sel = TextSelection.near( + tr.doc.resolve(replaceFrom + replacement.content.size), + -1, + ); + + agentSteps.push({ + prosemirrorSteps: tr.steps.slice(stepIndex), + selection: { + anchor: sel.from, + head: sel.from, + }, + type: isReplacing + ? "replace" // 2. Replace the text with the first character (if any) of the replacement + : "insert", // 3. Insert the replacement character by character + }); + first = false; + } + } + + return agentSteps; +} + +export async function delayAgentStep(step: AgentStep) { + const jitter = Math.random() * 0.3 + 0.85; // Random between 0.85 and 1.15 + if (step.type === "select") { + await new Promise((resolve) => setTimeout(resolve, 100 * jitter)); + } else if (step.type === "insert") { + await new Promise((resolve) => setTimeout(resolve, 10 * jitter)); + } else if (step.type === "replace") { + await new Promise((resolve) => setTimeout(resolve, 200 * jitter)); + } else { + throw new UnreachableCaseError(step.type); + } +} + +export function agentStepToTr(tr: Transaction, step: AgentStep) { + tr.setMeta("addToHistory", false); + + if (step.selection) { + tr.setMeta("aiAgent", { + selection: { + anchor: step.selection.anchor, + head: step.selection.head, + }, + }); + } + for (const pmStep of step.prosemirrorSteps) { + const result = tr.maybeStep(pmStep); + if (result.failed) { + // this would fail for tables, but has since been fixed using filterTransaction (in AIExtension) + // other cases have not been encountered so we throw an error here + + throw new Error("failed to apply step"); + } + } + + /* + In getStepsAsAgent, we manually insert the insertion / modification / deletion marks. + Another approach could be to only issue the change operations, and let prosemirror-suggest-changes + handle adding the marks. This could be done with changing the getStepsAsAgent, and using + `withSuggestChanges` like below. + + For now, manual approach seems to work well - keeping below as reference. + + function fakeDispatch(suggestTr: Transaction) { + tr = suggestTr; + } + + enableSuggestChanges(editor.prosemirrorState, editor.dispatch); + if (!isSuggestChangesEnabled(editor.prosemirrorState)) { + throw new Error( + "suggest changes could not be enabled, is the AI / suggestion plugin enabled?" + ); + } + withSuggestChanges(fakeDispatch).bind({ + get state() { + return editor.prosemirrorState; + }, + })(tr); + disableSuggestChanges(editor.prosemirrorState, editor.dispatch); + */ + + // TODO: errors thrown here are not shown in UI / console + return tr; +} diff --git a/packages/xl-ai/src/prosemirror/changeset.test.ts b/packages/xl-ai/src/prosemirror/changeset.test.ts new file mode 100644 index 0000000000..8f653e3403 --- /dev/null +++ b/packages/xl-ai/src/prosemirror/changeset.test.ts @@ -0,0 +1,95 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { describe, expect, it } from "vitest"; +import { getEditorWithFormattingAndMentions } from "../testUtil/cases/editors/formattingAndMentions.js"; +import { + DocumentOperationTestCase, + getExpectedEditor, +} from "../testUtil/cases/index.js"; +import { updateOperationTestCases } from "../testUtil/cases/updateOperationTestCases.js"; +import { updateToReplaceSteps } from "./changeset.js"; + +function executeTestCase( + editor: BlockNoteEditor, + test: DocumentOperationTestCase, +) { + for (const update of test.baseToolCalls) { + if (update.type !== "update") { + throw new Error("Only update operations are supported"); + } + const blockId = update.id; + + const selection = test.getTestSelection?.(editor); + const steps = updateToReplaceSteps( + { + id: blockId, + block: update.block, + }, + editor.prosemirrorState.doc, + undefined, + selection?.from, + selection?.to, + ); + + const formatted = steps.map((step) => ({ + replaced: editor.prosemirrorState.doc.slice(step.from, step.to).toJSON(), + step: step, + })); + + expect(formatted).toMatchSnapshot(); + + editor.transact((tr) => { + for (const step of steps) { + const mapped = step.map(tr.mapping); + if (!mapped) { + throw new Error("Failed to map step"); + } + tr.step(mapped); + } + }); + } +} + +for (const test of updateOperationTestCases) { + it(`${test.description}`, async () => { + const editor = test.editor(); + executeTestCase(editor, test); + expect(editor.document).toEqual(getExpectedEditor(test).document); + }); +} + +describe("dontReplaceContentAtEnd=true", () => { + it("keeps content at end of block", async () => { + const editor = getEditorWithFormattingAndMentions(); + const steps = updateToReplaceSteps( + { + id: "ref1", + block: { + content: [{ type: "text", text: "Hello" }], + }, + }, + editor.prosemirrorState.doc, + true, + ); + + expect(steps).toEqual([]); + }); + + it("keeps content at end of block (mark update)", async () => { + const editor = getEditorWithFormattingAndMentions(); + const steps = updateToReplaceSteps( + { + id: "ref1", + block: { + content: [ + { type: "text", text: "Hello, " }, + { type: "text", text: "wo", styles: { bold: true } }, + ], + }, + }, + editor.prosemirrorState.doc, + true, + ); + + expect(steps).toEqual([]); + }); +}); diff --git a/packages/xl-ai/src/prosemirror/changeset.ts b/packages/xl-ai/src/prosemirror/changeset.ts new file mode 100644 index 0000000000..8f5eb45461 --- /dev/null +++ b/packages/xl-ai/src/prosemirror/changeset.ts @@ -0,0 +1,339 @@ +import { getNodeById, PartialBlock, updateBlockTr } from "@blocknote/core"; +import { + Change, + ChangeSet, + simplifyChanges, + TokenEncoder, +} from "prosemirror-changeset"; +import { Node } from "prosemirror-model"; +import { ReplaceStep, Transform } from "prosemirror-transform"; + +type CustomChange = Change & { + type?: "mark-update" | "node-type-or-attr-update"; +}; + +/** + * Adds missing changes to the changes array. + * This is needed because prosemirror-changeset may miss some changes, + * such as marks or node attributes. + * + * NOTE: we might be able to replace this code with a custom encoder + * (this didn't exist yet when this was written) + * + * @param changes The changes we have so far + * @param originalDoc The original document, applying the changes should result in the expectedDoc + * @param expectedDoc The expected document after applying the changes + * @returns + */ +function addMissingChanges( + changes: CustomChange[], + originalDoc: Node, + expectedDoc: Node, +) { + const tr = new Transform(originalDoc); + // first, apply all changes we already have to the originalTr + + for (const change of changes) { + const step = new ReplaceStep( + tr.mapping.map(change.fromA), + tr.mapping.map(change.toA), + expectedDoc.slice(change.fromB, change.toB), + ); + + tr.step(step); + } + + const invertMap = tr.mapping.invert(); + + // now, see if the doc created by applying all changes is equal to the expected doc + let diffStart = tr.doc.content.findDiffStart(expectedDoc.content); + + // if the docs are not equal, we might be missing changes that have not been detected by prosemirror-changeset, + // such as marks or node attributes. Let's find and add the missing changes. + // + // example, using _ for bold: + // actual: helloworld! + // expected: hello_world_! + // + // actual: hello_world_! + // expected: helloworld! + // + // note: might be possible to merge this loop with the one at the start of the function + // but considered ok for now + while (diffStart !== null) { + const expectedNode = expectedDoc.resolve(diffStart).nodeAfter; + const actualNode = tr.doc.resolve(diffStart).nodeAfter; + + if (!expectedNode || !actualNode) { + throw new Error("diffNode not found"); + } + + const isNodeAttrChange = + !expectedNode.isLeaf && expectedNode.content.eq(actualNode.content); + + const length = isNodeAttrChange + ? 1 + : Math.min(expectedNode.nodeSize, actualNode.nodeSize); + + const to = diffStart + length; + const fromA = invertMap.map(diffStart); + const toA = invertMap.map(to); + + // find the position in changes array to insert the new change + let insertPos = changes.length; + for (let i = 0; i < changes.length; i++) { + if (changes[i].fromA >= toA) { + insertPos = i; + break; + } + } + + changes.splice(insertPos, 0, { + fromA: fromA, + toA: toA, + fromB: diffStart, + toB: to, + deleted: [], + inserted: [], + type: isNodeAttrChange ? "node-type-or-attr-update" : "mark-update", + }); + + // apply the step so we can find the next diff + // Note: even for node type changes, this works - although maybe a ReplaceAroundStep might be cleaner? + tr.step( + new ReplaceStep( + diffStart, + to, + expectedDoc.slice(diffStart, to), + isNodeAttrChange, + ), + ); + const newDiffStart = tr.doc.content.findDiffStart(expectedDoc.content); + + if (newDiffStart === diffStart) { + // prevent infinite loop, should not happen + throw new Error("diffStart not moving"); + } + + diffStart = newDiffStart; + } + + return changes; +} + +const createEncoder = (doc: Node, updatedDoc: Node) => { + // this encoder makes sure unchanged table cells stay intact, + // without this, prosemirror-changeset would too eagerly + // return changes across table cells (this is covered in test cases). + + const tableCellsOld = new Set(); + const tableCellsNew = new Set(); + doc.descendants((node) => { + if (node.type.name === "tableCell") { + tableCellsOld.add(JSON.stringify(node.toJSON())); + } + }); + + updatedDoc.descendants((node) => { + if (node.type.name === "tableCell") { + tableCellsNew.add(JSON.stringify(node.toJSON())); + } + }); + + const tableCells = new Set( + [...tableCellsOld].filter((cell) => tableCellsNew.has(cell)), + ); + + const encoder: TokenEncoder = { + encodeCharacter: (char) => char, + encodeNodeStart: (node) => { + if (node.type.name === "tableCell") { + const str = JSON.stringify(node.toJSON()); + if (tableCells.has(str)) { + return str; + } + return node.type.name; + } + return node.type.name; + }, + encodeNodeEnd: (node) => { + if (node.type.name === "tableCell") { + const str = JSON.stringify(node.toJSON()); + if (tableCells.has(str)) { + return str; + } + return -1; + } + return -1; + }, + compareTokens: (a, b) => { + return a === b; + }, + }; + return encoder; +}; + +/** + * This turns a single update `op` (that is, an update that could affect different parts of a block) + * into more granular steps (that is, each step only affects a single part of the block), by using a diffing algorithm. + * + * @param editor the editor to apply the update to (only used for schema info) + * @param op the update operation to apply + * @param doc the document to apply the update to + * @param dontReplaceContentAtEnd whether to not replace content at the end of the block (set to true processing "partial updates") + * @param updateFromPos the position to start the update from (can be used for selections) + * @param updateToPos the position to end the update at (can be used for selections) + * @returns the granular steps to apply to the editor to get to the updated doc + */ +export function updateToReplaceSteps( + op: { + id: string; + block: PartialBlock; + }, + doc: Node, + dontReplaceContentAtEnd = false, + updateFromPos?: number, + updateToPos?: number, +) { + const blockPos = getNodeById(op.id, doc)!; + const updatedTr = new Transform(doc); + updateBlockTr( + updatedTr, + blockPos.posBeforeNode, + op.block, + updateFromPos, + updateToPos, + ); + + let updatedDoc = updatedTr.doc; + + let changeset = ChangeSet.create( + doc, + undefined, + createEncoder(doc, updatedDoc), + ); + + changeset = changeset.addSteps(updatedDoc, updatedTr.mapping.maps, 0); + + // When we're streaming (we sent `dontReplaceContentAtEnd = true`), + // we need to add back the content that was removed at the end of the block. + // because maybe this content will not actually be removed by the LLM, but instead, + // it simply hasn't been streamed in yet. + // e.g.: + // actual: hello world! How are you doing? + // incoming stream: hello world! + // + // at this point, the changeset would drop "How are you doing?" + // but we should ignore this, as maybe this will still be in the LLMs yet-to-be-streamed response + if (dontReplaceContentAtEnd && changeset.changes.length > 0) { + // TODO: unit test + const lastChange = changeset.changes[changeset.changes.length - 1]; + + const lengthA = lastChange.toA - lastChange.fromA; + const lengthB = lastChange.toB - lastChange.fromB; + + if (lengthA > lengthB) { + const endOfBlockToReAdd = doc.slice( + lastChange.fromA + lengthB, + lastChange.toA, + ); + updatedTr.step( + new ReplaceStep(lastChange.toB, lastChange.toB, endOfBlockToReAdd), + ); + updatedDoc = updatedTr.doc; + changeset = ChangeSet.create( + changeset.startDoc, + undefined, + createEncoder(changeset.startDoc, updatedDoc), + ); + changeset = changeset.addSteps(updatedDoc, updatedTr.mapping.maps, 0); + } + } + + const steps = []; + + // `changes` holds the changes that can be made to the cleaned doc to get to the updated doc + const changes: CustomChange[] = simplifyChanges( + changeset.changes, + updatedDoc, + ); + + for (let i = 0; i < changes.length; i++) { + const step = changes[i]; + const replacement = updatedDoc.slice(step.fromB, step.toB); + + if (replacement.openEnd === 1 && replacement.openStart === 0) { + // node attr / type update + step.type = "node-type-or-attr-update"; + + if (replacement.size > 2) { + // This change is both a node type and content change + // we split this in two separate steps so we can handle them separately in "agent.ts" + const typeChange: CustomChange = { + fromA: step.fromA, + toA: step.fromA + 1, + fromB: step.fromB, + toB: step.fromB + 1, + deleted: [], + inserted: [], + type: "node-type-or-attr-update", + }; + + const contentChange: CustomChange = { + fromA: step.fromA + 1, + toA: step.toA, + fromB: step.fromB + 1, + toB: step.toB, + deleted: [], + inserted: [], + }; + + changes.splice(i, 1, typeChange, contentChange); + i++; + } + } + } + + addMissingChanges(changes, doc, updatedDoc); + + for (let i = 0; i < changes.length; i++) { + const step = changes[i]; + const replacement = updatedDoc.slice(step.fromB, step.toB); + + if (replacement.openEnd > 0 && replacement.size > 1) { + throw new Error( + "unexpected, openEnd > 0 and size > 1, this should have been split into two steps", + ); + } + + if ( + i === changes.length - 1 && + dontReplaceContentAtEnd && + step.type === "mark-update" + ) { + // for streaming mode, let's say we update: + // hello world + // to: + // hello world + + // when we're streaming, we might get + // hello wo + // as a partial update + + // it would look weird to apply an update like this mid-world, + // so in this case, we should not add the update yet and wait for more content + continue; + } + + steps.push( + new ReplaceStep( + step.fromA, + step.toA, + replacement, + step.type === "node-type-or-attr-update", + ), + ); + } + + return steps; +} diff --git a/packages/xl-ai/src/prosemirror/fragmentUtil.test.ts b/packages/xl-ai/src/prosemirror/fragmentUtil.test.ts new file mode 100644 index 0000000000..93dfa3a0f3 --- /dev/null +++ b/packages/xl-ai/src/prosemirror/fragmentUtil.test.ts @@ -0,0 +1,85 @@ +import { Fragment, Schema } from "prosemirror-model"; +import { describe, expect, it } from "vitest"; +import { getFirstChar } from "./fragmentUtil.js"; + +describe("fragmentUtil", () => { + describe("getFirstChar", () => { + // Create a more complex schema for testing + const schema = new Schema({ + nodes: { + doc: { content: "block+" }, + paragraph: { content: "inline*", group: "block" }, + heading: { + content: "inline*", + group: "block", + attrs: { level: { default: 1 } }, + }, + blockcontainer: { content: "block+", group: "block" }, + text: { group: "inline" }, + }, + }); + + it("should return 0 for a text fragment", () => { + const fragment = Fragment.from(schema.text("Hello")); + expect(getFirstChar(fragment)).toBe(0); + }); + + it("should return correct index for a paragraph with text", () => { + const paragraph = schema.node("paragraph", null, [schema.text("Hello")]); + const fragment = Fragment.from(paragraph); + expect(getFirstChar(fragment)).toBe(1); + }); + + it("should return undefined for an empty fragment", () => { + const fragment = Fragment.empty; + expect(getFirstChar(fragment)).toBe(undefined); + }); + + it("should handle nested nodes correctly", () => { + const paragraph = schema.node("paragraph", null, [ + schema.text("Hello"), + schema.text(" World"), + ]); + const fragment = Fragment.from(paragraph); + expect(getFirstChar(fragment)).toBe(1); + }); + + it("should handle blockcontainer with nested paragraph", () => { + const paragraph = schema.node("paragraph", null, [schema.text("Hello")]); + const blockcontainer = schema.node("blockcontainer", null, [paragraph]); + const fragment = Fragment.from(blockcontainer); + // Blockquote opening (1) + paragraph opening (1) = 2 + expect(getFirstChar(fragment)).toBe(2); + }); + + it("should handle heading with text", () => { + const heading = schema.node("heading", { level: 2 }, [ + schema.text("Title"), + ]); + const fragment = Fragment.from(heading); + expect(getFirstChar(fragment)).toBe(1); + }); + + it("should handle multiple block nodes", () => { + const paragraph1 = schema.node("paragraph", null, [schema.text("First")]); + const paragraph2 = schema.node("paragraph", null, [ + schema.text("Second"), + ]); + const fragment = Fragment.from([paragraph1, paragraph2]); + expect(getFirstChar(fragment)).toBe(1); + }); + + it("should handle deeply nested structure", () => { + const text = schema.text("Deep text"); + const paragraph = schema.node("paragraph", null, [text]); + const blockcontainer = schema.node("blockcontainer", null, [paragraph]); + const blockcontainer2 = schema.node("blockcontainer", null, [ + blockcontainer, + ]); + + const fragment = Fragment.from(blockcontainer2); + // blockcontainer + blockcontainer + paragraph (1) = 3 + expect(getFirstChar(fragment)).toBe(3); + }); + }); +}); diff --git a/packages/xl-ai/src/prosemirror/fragmentUtil.ts b/packages/xl-ai/src/prosemirror/fragmentUtil.ts new file mode 100644 index 0000000000..77c98b7875 --- /dev/null +++ b/packages/xl-ai/src/prosemirror/fragmentUtil.ts @@ -0,0 +1,20 @@ +import { Fragment } from "prosemirror-model"; + +/** + * helper method to get the index of the first character of a fragment + */ +export function getFirstChar(fragment: Fragment) { + let index: number | undefined = undefined; + let found = false; + fragment.descendants((n, pos) => { + if (found) { + return false; + } + if (n.isText) { + found = true; + index = pos; + } + return true; + }); + return index; +} diff --git a/packages/xl-ai/src/prosemirror/rebaseTool.test.ts b/packages/xl-ai/src/prosemirror/rebaseTool.test.ts new file mode 100644 index 0000000000..914c294f8b --- /dev/null +++ b/packages/xl-ai/src/prosemirror/rebaseTool.test.ts @@ -0,0 +1,96 @@ +import { BlockNoteEditor, getBlockInfo, getNodeById } from "@blocknote/core"; +import { expect, it } from "vitest"; +import { getApplySuggestionsTr, rebaseTool } from "./rebaseTool.js"; + +function getExampleEditorWithSuggestions() { + const editor = BlockNoteEditor.create({ + initialContent: [ + { + id: "1", + type: "paragraph", + content: "HelloHi, world!", // "Hello" will be marked as deleted and "Hi" will be marked as inserted + }, + ], + }); + + const blockPos = getNodeById("1", editor.prosemirrorState.doc)!; + + const block = getBlockInfo(blockPos); + if (!block.isBlockContainer) { + throw new Error("Block is not a container"); + } + + editor.transact((tr) => { + tr.addMark( + block.blockContent.beforePos + 1, + block.blockContent.beforePos + 6, + editor.pmSchema.mark("deletion", {}), + ); + + tr.addMark( + block.blockContent.beforePos + 6, + block.blockContent.beforePos + 8, + editor.pmSchema.mark("insertion", {}), + ); + }); + + return editor; +} + +it("should create some example suggestions", async () => { + const editor = getExampleEditorWithSuggestions(); + expect(editor.prosemirrorState.doc.toJSON()).toMatchSnapshot(); +}); + +it("should be able to apply changes to a clean doc (use invertMap)", async () => { + const editor = getExampleEditorWithSuggestions(); + + const cleaned = rebaseTool(editor, getApplySuggestionsTr(editor)); + + const blockPos = getNodeById("1", cleaned.doc)!; + + const block = getBlockInfo(blockPos); + + if (!block.isBlockContainer) { + throw new Error("Block is not a container"); + } + + const start = block.blockContent.beforePos + 1; + const end = start + 2; + + expect(cleaned.doc.textBetween(start, end)).toBe("Hi"); + + editor.transact((tr) => { + tr.replaceWith( + cleaned.invertMap.map(start), + cleaned.invertMap.map(end), + editor.pmSchema.text("What's up"), + ); + }); + + expect(editor.prosemirrorState.doc.toJSON()).toMatchSnapshot(); +}); + +it("should be able to apply changes to a clean doc (use rebaseTr)", async () => { + const editor = getExampleEditorWithSuggestions(); + + const cleaned = rebaseTool(editor, getApplySuggestionsTr(editor)); + + const blockPos = getNodeById("1", cleaned.doc)!; + + const block = getBlockInfo(blockPos); + + if (!block.isBlockContainer) { + throw new Error("Block is not a container"); + } + + const start = block.blockContent.beforePos + 1; + const end = start + 2; + + expect(cleaned.doc.textBetween(start, end)).toBe("Hi"); + + const tr = cleaned.tr(); + tr.replaceWith(start, end, editor.pmSchema.text("What's up")); + + expect(cleaned.rebaseTr(tr).doc.toJSON()).toMatchSnapshot(); +}); diff --git a/packages/xl-ai/src/prosemirror/rebaseTool.ts b/packages/xl-ai/src/prosemirror/rebaseTool.ts new file mode 100644 index 0000000000..42afb81a38 --- /dev/null +++ b/packages/xl-ai/src/prosemirror/rebaseTool.ts @@ -0,0 +1,79 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { applySuggestions } from "@blocknote/prosemirror-suggest-changes"; +import { Transaction } from "prosemirror-state"; +import { Transform } from "prosemirror-transform"; + +// Helper function to get the transaction that removes all suggestions from the editor. +// +// (rebaseTool is usually used with a transaction that removes all suggestions from the editor) +export function getApplySuggestionsTr(editor: BlockNoteEditor) { + let applySuggestionsTr: Transaction; + applySuggestions(editor.prosemirrorState, (tr) => { + applySuggestionsTr = tr; + }); + + // @ts-ignore + if (!applySuggestionsTr) { + throw new Error("applySuggestionsTr is not set"); + } + + return applySuggestionsTr; +} + +/** + * A helper function to enable rebasing prosemirror operations. + * + * The idea is as follows: + * - There's an update U we want to apply to the editor state E + * - However, the update U cannot be applied directly to E. For example, because E contains suggestions, or other + * formatting incompatible with U + * - We can however apply U to a "clean" document E', the projection (one that has no suggestions or other formatting) + * - We can then use the inverse mapping of E' to E to get U' (the rebased update) which can be applied to E + * + * This function takes a `projectionTr`, which is the transaction that turns E into E' + * It returns a helper object that can be used to rebase operations done to E' onto E + */ +export function rebaseTool( + editor: BlockNoteEditor, + projectionTr: Transaction, +) { + const invertMap = projectionTr.mapping.invert(); + return { + doc: projectionTr.doc, + + /** + * Return a new transform that has the projection applied. + * You can add new operations to this transform and later rebase those on the original document with `rebaseTr` + */ + tr: () => { + return new Transform(projectionTr.doc); + }, + + /** + * Invert map created by the projection. + * You can use this to map positions on the "clean" document (the projection) to positions on the original document + */ + invertMap, + + /** + * Return a new transaction based on the editor state with all the steps you made to `tr`. + * These steps are rebased on the original document. + */ + rebaseTr: (tr: Transform) => { + if (tr.steps.length === 0) { + throw new Error("No steps to apply"); + } + let rebasedTr = editor.prosemirrorState.tr; + for (const step of tr.steps) { + const mappedStep = step.map(invertMap); + if (!mappedStep) { + throw new Error("Step is not mapped"); + } + rebasedTr = rebasedTr.step(mappedStep); + } + return rebasedTr; + }, + }; +} + +export type RebaseTool = ReturnType; diff --git a/packages/xl-ai/src/streamTool/README.md b/packages/xl-ai/src/streamTool/README.md new file mode 100644 index 0000000000..c441b8a89f --- /dev/null +++ b/packages/xl-ai/src/streamTool/README.md @@ -0,0 +1,12 @@ +# StreamTools + +This directory implements the concept of a a StreamTool. + +A StreamTool is similar to a Tool in the Vercel AI SDK, but: + +- a collection of StreamTools can be wrapped in a single LLM Tool to issue multiple operations (tool calls) at once. +- StreamTools can be used in a streaming manner (i.e.: non-complete tool calls can be evaluated) + +## Notes + +We should keep the code in this directory generic (non-BlockNote specific) diff --git a/packages/xl-ai/src/streamTool/asTool.ts b/packages/xl-ai/src/streamTool/asTool.ts new file mode 100644 index 0000000000..f1f18fc44e --- /dev/null +++ b/packages/xl-ai/src/streamTool/asTool.ts @@ -0,0 +1,44 @@ +import { jsonSchema, tool } from "ai"; +import { operationsToStream } from "./callLLMWithStreamTools.js"; +import { createStreamToolsArraySchema } from "./jsonSchema.js"; +import { StreamTool } from "./streamTool.js"; + +// TODO: remove or implement + +export function streamToolAsTool>(streamTool: T) { + return tool({ + parameters: jsonSchema(streamTool.parameters, { + validate: (value) => { + const result = streamTool.validate(value); + if (!result.ok) { + return { success: false, error: new Error(result.error) }; + } + return { success: true, value: result.value }; + }, + }), + execute: async (_value) => { + // console.log("execute", value); + // TODO + }, + }); +} + +export function streamToolsAsTool[]>(streamTools: T) { + const schema = createStreamToolsArraySchema(streamTools); + + return tool({ + parameters: jsonSchema(schema, { + validate: (value) => { + const stream = operationsToStream(value); + if (!stream.ok) { + return { success: false, error: new Error(stream.error) }; + } + return { success: true, value: stream.value }; + }, + }), + execute: async (_value) => { + // TODO + // console.log("execute", value); + }, + }); +} diff --git a/packages/xl-ai/src/streamTool/callLLMWithStreamTools.ts b/packages/xl-ai/src/streamTool/callLLMWithStreamTools.ts new file mode 100644 index 0000000000..b79dcfa7c6 --- /dev/null +++ b/packages/xl-ai/src/streamTool/callLLMWithStreamTools.ts @@ -0,0 +1,339 @@ +import { + CoreMessage, + GenerateObjectResult, + LanguageModel, + ObjectStreamPart, + StreamObjectResult, + generateObject, + jsonSchema, + streamObject, +} from "ai"; + +import { createStreamToolsArraySchema } from "./jsonSchema.js"; + +import { + AsyncIterableStream, + createAsyncIterableStream, + createAsyncIterableStreamFromAsyncIterable, +} from "../util/stream.js"; +import { filterNewOrUpdatedOperations } from "./filterNewOrUpdatedOperations.js"; +import { + preprocessOperationsNonStreaming, + preprocessOperationsStreaming, +} from "./preprocess.js"; +import { Result, StreamTool, StreamToolCall } from "./streamTool.js"; + +type LLMRequestOptions = { + model: LanguageModel; + messages: CoreMessage[]; + maxRetries: number; +}; + +/** + * Result of an LLM call with stream tools + */ +export type OperationsResult[]> = { + /** + * Result of the underlying `streamObject` (AI SDK) call, or `undefined` if non-streaming mode + */ + streamObjectResult: StreamObjectResult | undefined; + /** + * Result of the underlying `generateObject` (AI SDK) call, or `undefined` if streaming mode + */ + generateObjectResult: GenerateObjectResult | undefined; + /** + * Stream of tool call operations, these are the operations the LLM "decided" to execute + * + * Calling this consumes the underlying streams + */ + operationsSource: AsyncIterableStream<{ + operation: StreamToolCall; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; + }>; + /** + * All tool call operations the LLM decided to execute + */ + getGeneratedOperations: () => Promise<{ + operations: StreamToolCall[]; + }>; +}; + +/** + * Calls an LLM with StreamTools, using the `generateObject` of the AI SDK. + * + * This is the non-streaming version. + */ +export async function generateOperations[]>( + streamTools: T, + opts: LLMRequestOptions & { + _generateObjectOptions?: Partial>[0]>; + }, +): Promise> { + const { _generateObjectOptions, ...rest } = opts; + + if ( + _generateObjectOptions && + ("output" in _generateObjectOptions || "schema" in _generateObjectOptions) + ) { + throw new Error( + "Cannot provide output or schema in _generateObjectOptions", + ); + } + + const schema = jsonSchema(createStreamToolsArraySchema(streamTools)); + const options = { + // non-overridable options for streamObject + output: "object" as const, + schema, + + // configurable options for streamObject + + // - optional, with defaults + + // mistral somehow needs "auto", while groq/llama needs "tool" + // TODO: further research this and / or make configurable + // for now stick to "tool" by default as this has been tested mostly + mode: rest.model.provider === "mistral.chat" ? "auto" : "tool", + // - mandatory ones: + ...rest, + + // extra options for streamObject + ...((_generateObjectOptions ?? {}) as any), + }; + + const ret = await generateObject<{ operations: any }>(options); + + // because the rest of the codebase always expects a stream, we convert the object to a stream here + const stream = operationsToStream(ret.object); + + if (!stream.ok) { + throw new Error(stream.error); + } + + let _operationsSource: OperationsResult["operationsSource"]; + + return { + streamObjectResult: undefined, + generateObjectResult: ret, + get operationsSource() { + if (!_operationsSource) { + _operationsSource = createAsyncIterableStreamFromAsyncIterable( + preprocessOperationsNonStreaming(stream.value, streamTools), + ); + } + return _operationsSource; + }, + async getGeneratedOperations() { + return ret.object; + }, + }; +} + +export function operationsToStream[]>( + object: unknown, +): Result< + AsyncIterable<{ + partialOperation: StreamToolCall; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; + }> +> { + if ( + !object || + typeof object !== "object" || + !("operations" in object) || + !Array.isArray(object.operations) + ) { + return { + ok: false, + error: "No operations returned", + }; + } + const operations = object.operations; + async function* singleChunkGenerator() { + for (const op of operations) { + yield { + partialOperation: op, + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + }; + } + } + + return { + ok: true, + value: singleChunkGenerator(), + }; +} + +/** + * Calls an LLM with StreamTools, using the `streamObject` of the AI SDK. + * + * This is the streaming version. + */ +export async function streamOperations[]>( + streamTools: T, + opts: LLMRequestOptions & { + _streamObjectOptions?: Partial< + Parameters>[0] + >; + }, + onStart: () => void = () => { + // noop + }, +): Promise> { + const { _streamObjectOptions, ...rest } = opts; + + if ( + _streamObjectOptions && + ("output" in _streamObjectOptions || "schema" in _streamObjectOptions) + ) { + throw new Error("Cannot provide output or schema in _streamObjectOptions"); + } + + const schema = jsonSchema(createStreamToolsArraySchema(streamTools)); + + const options = { + // non-overridable options for streamObject + output: "object" as const, + schema, + // configurable options for streamObject + + // - optional, with defaults + // mistral somehow needs "auto", while groq/llama needs "tool" + // TODO: further research this and / or make configurable + // for now stick to "tool" by default as this has been tested mostly + mode: rest.model.provider === "mistral.chat" ? "auto" : "tool", + // - mandatory ones: + ...rest, + + // extra options for streamObject + ...((opts._streamObjectOptions ?? {}) as any), + }; + + const ret = streamObject<{ operations: any }>(options); + + let _operationsSource: OperationsResult["operationsSource"]; + + const [fullStream1, fullStream2] = ret.fullStream.tee(); + + // Always consume fullStream2 in the background and store the last operations + const allOperationsPromise = (async () => { + let lastOperations: { operations: StreamToolCall[] } = { + operations: [], + }; + const objectStream = createAsyncIterableStream( + partialObjectStream(fullStream2), + ); + + for await (const chunk of objectStream) { + if (chunk && typeof chunk === "object" && "operations" in chunk) { + lastOperations = chunk as any; + } + } + return lastOperations; + })(); + + // Note: we can probably clean this up by switching to streams instead of async iterables + return { + streamObjectResult: ret, + generateObjectResult: undefined, + get operationsSource() { + if (!_operationsSource) { + _operationsSource = createAsyncIterableStreamFromAsyncIterable( + preprocessOperationsStreaming( + filterNewOrUpdatedOperations( + streamOnStartCallback( + partialObjectStreamThrowError( + createAsyncIterableStream(fullStream1), + ), + onStart, + ), + ), + streamTools, + ), + ); + } + return _operationsSource; + }, + async getGeneratedOperations() { + // Simply return the stored operations + // If the stream hasn't completed yet, this will return the latest available operations + return allOperationsPromise; + }, + }; +} + +async function* streamOnStartCallback( + stream: AsyncIterable, + onStart: () => void, +): AsyncIterable { + let first = true; + for await (const chunk of stream) { + if (first) { + onStart(); + first = false; + } + yield chunk; + } +} + +// adapted from https://github.com/vercel/ai/blob/5d4610634f119dc394d36adcba200a06f850209e/packages/ai/core/generate-object/stream-object.ts#L1041C7-L1066C1 +// change made to throw errors (with the original they're silently ignored) +function partialObjectStreamThrowError( + stream: ReadableStream>, +): AsyncIterableStream { + return createAsyncIterableStream( + stream.pipeThrough( + new TransformStream, PARTIAL>({ + transform(chunk, controller) { + switch (chunk.type) { + case "object": + controller.enqueue(chunk.object); + break; + + case "text-delta": + case "finish": + break; + case "error": + controller.error(chunk.error); + break; + default: { + const _exhaustiveCheck: never = chunk; + throw new Error(`Unsupported chunk type: ${_exhaustiveCheck}`); + } + } + }, + }), + ), + ); +} + +// from https://github.com/vercel/ai/blob/5d4610634f119dc394d36adcba200a06f850209e/packages/ai/core/generate-object/stream-object.ts#L1041C7-L1066C1 +function partialObjectStream( + stream: ReadableStream>, +): AsyncIterableStream { + return createAsyncIterableStream( + stream.pipeThrough( + new TransformStream, PARTIAL>({ + transform(chunk, controller) { + switch (chunk.type) { + case "object": + controller.enqueue(chunk.object); + break; + case "text-delta": + case "finish": + break; + case "error": + break; + default: { + const _exhaustiveCheck: never = chunk; + throw new Error(`Unsupported chunk type: ${_exhaustiveCheck}`); + } + } + }, + }), + ), + ); +} diff --git a/packages/xl-ai/src/streamTool/filterNewOrUpdatedOperations.test.ts b/packages/xl-ai/src/streamTool/filterNewOrUpdatedOperations.test.ts new file mode 100644 index 0000000000..c68e9bdc7f --- /dev/null +++ b/packages/xl-ai/src/streamTool/filterNewOrUpdatedOperations.test.ts @@ -0,0 +1,158 @@ +import { describe, expect, it } from "vitest"; +import { filterNewOrUpdatedOperations } from "./filterNewOrUpdatedOperations.js"; + +describe("filterNewOrUpdatedOperations", () => { + it("should filter out new operations from a stream", async () => { + // Create a mock stream + async function* mockStream() { + yield { + operations: [ + { id: 1, content: "op1" }, + { id: 2, content: "op2-partial" }, + ], + }; + yield { + operations: [ + { id: 1, content: "op1" }, + { id: 2, content: "op2-complete" }, + { id: 3, content: "op3" }, + ], + }; + } + + const result = []; + for await (const chunk of filterNewOrUpdatedOperations(mockStream())) { + result.push(chunk); + } + + expect(result.length).toBe(5); + + // First chunk should have op1 and op2-partial + expect(result[0]).toEqual({ + partialOperation: { id: 1, content: "op1" }, + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + }); + + expect(result[1]).toEqual({ + partialOperation: { id: 2, content: "op2-partial" }, + isUpdateToPreviousOperation: false, + isPossiblyPartial: true, + }); + + expect(result[2]).toEqual({ + partialOperation: { id: 2, content: "op2-complete" }, + isUpdateToPreviousOperation: true, + isPossiblyPartial: false, + }); + + expect(result[3]).toEqual({ + partialOperation: { id: 3, content: "op3" }, + isUpdateToPreviousOperation: false, + isPossiblyPartial: true, + }); + + expect(result[4]).toEqual({ + partialOperation: { id: 3, content: "op3" }, + isUpdateToPreviousOperation: true, + isPossiblyPartial: false, + }); + }); + + it("should filter out new operations from a stream (partial start)", async () => { + // Create a mock stream + async function* mockStream() { + yield { + operations: [{ id: 1, content: "op1-partial" }], + }; + yield { + operations: [ + { id: 1, content: "op1-complete" }, + { id: 2, content: "op2" }, + ], + }; + } + + const result = []; + for await (const chunk of filterNewOrUpdatedOperations(mockStream())) { + result.push(chunk); + } + + expect(result.length).toBe(4); + + // First chunk should have op1-partial + expect(result[0]).toEqual({ + partialOperation: { id: 1, content: "op1-partial" }, + isUpdateToPreviousOperation: false, + isPossiblyPartial: true, + }); + + // Second chunk should have op1-complete + expect(result[1]).toEqual({ + partialOperation: { id: 1, content: "op1-complete" }, + isUpdateToPreviousOperation: true, + isPossiblyPartial: false, + }); + + // Third chunk should have op2 + expect(result[2]).toEqual({ + partialOperation: { id: 2, content: "op2" }, + isUpdateToPreviousOperation: false, + isPossiblyPartial: true, + }); + + expect(result[3]).toEqual({ + partialOperation: { id: 2, content: "op2" }, + isUpdateToPreviousOperation: true, + isPossiblyPartial: false, + }); + }); + + it("should handle empty operations array", async () => { + async function* mockStream() { + yield { operations: [] }; + yield { operations: [{ id: 1, content: "op1" }] }; + } + + const result = []; + for await (const chunk of filterNewOrUpdatedOperations(mockStream())) { + result.push(chunk); + } + + expect(result.length).toBe(2); + expect(result[0]).toEqual({ + partialOperation: { id: 1, content: "op1" }, + isUpdateToPreviousOperation: false, + isPossiblyPartial: true, + }); + expect(result[1]).toEqual({ + partialOperation: { id: 1, content: "op1" }, + isUpdateToPreviousOperation: true, + isPossiblyPartial: false, + }); + }); + + it("should handle undefined operations", async () => { + async function* mockStream() { + yield {}; + yield { operations: [{ id: 1, content: "op1" }] }; + } + + const result = []; + for await (const chunk of filterNewOrUpdatedOperations(mockStream())) { + result.push(chunk); + } + + expect(result.length).toBe(2); + expect(result[0]).toEqual({ + partialOperation: { id: 1, content: "op1" }, + isUpdateToPreviousOperation: false, + isPossiblyPartial: true, + }); + expect(result[1]).toEqual({ + partialOperation: { id: 1, content: "op1" }, + isUpdateToPreviousOperation: true, + isPossiblyPartial: false, + }); + }); +}); diff --git a/packages/xl-ai/src/streamTool/filterNewOrUpdatedOperations.ts b/packages/xl-ai/src/streamTool/filterNewOrUpdatedOperations.ts new file mode 100644 index 0000000000..6f1d17611d --- /dev/null +++ b/packages/xl-ai/src/streamTool/filterNewOrUpdatedOperations.ts @@ -0,0 +1,64 @@ +/** + * This takes the partialObjectStream from an LLM streaming response. + * + * Note that this streams in multiple operations in the operations array, and this will be called with chunks like this: + * + * {operations: [op1, op2partial]} + * {operations: [op1, op2complete, op3, op4]} + * + * This function transforms it into a stream of new or updated operations, so the output would be like this: + * + * {newOrUpdatedOperations: [op1, op2partial]} + * {newOrUpdatedOperations: [op2complete, op3, op4]} + */ +export async function* filterNewOrUpdatedOperations( + partialObjectStream: AsyncIterable<{ + operations?: any[]; + }> +): AsyncGenerator<{ + partialOperation: any; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; +}> { + let numOperationsAppliedCompletely = 0; + let first = true; + + let lastOp: any; + + for await (const chunk of partialObjectStream) { + if (!chunk.operations?.length) { + // yield { newOrUpdatedOperations: [] }; + continue; + } + + for ( + let i = numOperationsAppliedCompletely; + i < chunk.operations.length; + i++ + ) { + const operation = chunk.operations[i]; + lastOp = operation; + yield { + partialOperation: operation, + isUpdateToPreviousOperation: + i === numOperationsAppliedCompletely && !first, + isPossiblyPartial: i === chunk.operations.length - 1, + }; + first = false; + } + + // Update count to exclude the last operation which might be incomplete + numOperationsAppliedCompletely = chunk.operations.length - 1; + } + + if (!lastOp) { + throw new Error("No operations seen"); + } + + // mark final operation as final (by emitting with isPossiblyPartial: false) + yield { + partialOperation: lastOp, + isUpdateToPreviousOperation: true, + isPossiblyPartial: false, + }; +} diff --git a/packages/xl-ai/src/streamTool/filterValidOperations.test.ts b/packages/xl-ai/src/streamTool/filterValidOperations.test.ts new file mode 100644 index 0000000000..016829b65b --- /dev/null +++ b/packages/xl-ai/src/streamTool/filterValidOperations.test.ts @@ -0,0 +1,104 @@ +import { describe, expect, it } from "vitest"; +import { AddBlocksToolCall } from "../api/formats/base-tools/createAddBlocksTool.js"; +import { UpdateBlockToolCall } from "../api/formats/base-tools/createUpdateBlockTool.js"; +import { filterValidOperations } from "./filterValidOperations.js"; +import { Result } from "./streamTool.js"; + +// REC: better to make unit tests independent of BlockNote code (tools) +describe("filterValidOperations", () => { + it("should filter out valid operations from a stream", async () => { + // Create a mock stream with valid and invalid operations + async function* mockStream() { + yield { + operation: { + ok: true, + value: { + type: "add", + blocks: [], + referenceId: "123", + position: "after", + } as AddBlocksToolCall, + } as Result | UpdateBlockToolCall>, + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + }; + + yield { + operation: { + ok: false, + error: "Invalid operation", + } as Result | UpdateBlockToolCall>, + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + }; + + yield { + operation: { + ok: true, + value: { + type: "update", + id: "456", + block: { content: "updated" }, + } as UpdateBlockToolCall, + } as Result | UpdateBlockToolCall>, + isUpdateToPreviousOperation: true, + isPossiblyPartial: true, + }; + } + + const result = []; + for await (const chunk of filterValidOperations(mockStream())) { + result.push(chunk); + } + + // Should only have the valid operations + expect(result.length).toBe(2); + + expect(result[0]).toEqual({ + operation: { + type: "add", + blocks: [], + referenceId: "123", + position: "after", + }, + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + }); + + expect(result[1]).toEqual({ + operation: { type: "update", id: "456", block: { content: "updated" } }, + isUpdateToPreviousOperation: false, + isPossiblyPartial: true, + }); + }); + + it("should handle a stream with only invalid operations", async () => { + async function* mockStream() { + yield { + operation: { + ok: false, + error: "Invalid operation 1", + } as Result | UpdateBlockToolCall>, + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + }; + + yield { + operation: { + ok: false, + error: "Invalid operation 2", + } as Result | UpdateBlockToolCall>, + isUpdateToPreviousOperation: true, + isPossiblyPartial: false, + }; + } + + const result = []; + for await (const chunk of filterValidOperations(mockStream())) { + result.push(chunk); + } + + // Should have no valid operations + expect(result.length).toBe(0); + }); +}); diff --git a/packages/xl-ai/src/streamTool/filterValidOperations.ts b/packages/xl-ai/src/streamTool/filterValidOperations.ts new file mode 100644 index 0000000000..3f06db50f1 --- /dev/null +++ b/packages/xl-ai/src/streamTool/filterValidOperations.ts @@ -0,0 +1,47 @@ +import { Result } from "./streamTool.js"; + +/** + * Yields only valid operations from the stream. + * + * For invalid operations, the `onInvalidOperation` callback is called. + */ +export async function* filterValidOperations( + operationsStream: AsyncIterable<{ + operation: Result; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; + }>, + onInvalidOperation?: (chunk: { + operation: Result & { + ok: false; + }; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; + }) => void, +): AsyncGenerator<{ + operation: T; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; +}> { + let forceNewOperation = false; + for await (const chunk of operationsStream) { + const operation = chunk.operation; + if (operation.ok) { + yield { + operation: operation.value, + isUpdateToPreviousOperation: forceNewOperation + ? false + : chunk.isUpdateToPreviousOperation, + isPossiblyPartial: chunk.isPossiblyPartial, + }; + forceNewOperation = false; + } else { + forceNewOperation = + forceNewOperation || !chunk.isUpdateToPreviousOperation; + onInvalidOperation?.({ + ...chunk, + operation, + }); + } + } +} diff --git a/packages/xl-ai/src/streamTool/jsonSchema.ts b/packages/xl-ai/src/streamTool/jsonSchema.ts new file mode 100644 index 0000000000..048af716e7 --- /dev/null +++ b/packages/xl-ai/src/streamTool/jsonSchema.ts @@ -0,0 +1,78 @@ +import type { JSONSchema7, JSONSchema7Definition } from "json-schema"; +import isEqual from "lodash.isequal"; +import { StreamTool } from "./streamTool.js"; + +function streamToolToJSONSchema(tool: StreamTool): { + schema: JSONSchema7; + $defs?: Record; +} { + // this adds the tool name as the "type". (not very clean way to do it) + const { properties, required, $defs, ...rest } = tool.parameters; + return { + schema: { + type: "object", + description: tool.description, + properties: { + type: { + type: "string", + enum: [tool.name], + }, + ...properties, + }, + required: ["type", ...(required ?? [])], + additionalProperties: false, + ...rest, + }, + $defs, + }; +} + +/** + * Creates the JSON Schema for an object that can represent a call to one or more StreamTools. + * + * E.g., given StreamTools add, delete, update, returns the json schema for an object that conforms to this shape: + * + * { + * "operations": [ + * { + * "type": "add", + * ...parameters for add function... + * }, + * { + * "type": "delete", + * ...parameters for delete function... + * }, + * ... + * ] + * } + */ +export function createStreamToolsArraySchema( + streamTools: StreamTool[], +): JSONSchema7 { + const schemas = streamTools.map((tool) => streamToolToJSONSchema(tool)); + + const $defs: Record = {}; + for (const schema of schemas) { + for (const key in schema.$defs) { + if ($defs[key] && !isEqual($defs[key], schema.$defs[key])) { + throw new Error(`Duplicate, but different definition for ${key}`); + } + $defs[key] = schema.$defs[key]; + } + } + + return { + type: "object", + properties: { + operations: { + type: "array", + items: { + anyOf: schemas.map((schema) => schema.schema), + }, + }, + }, + additionalProperties: false, + required: ["operations"] as string[], + $defs: Object.keys($defs).length > 0 ? $defs : undefined, + }; +} diff --git a/packages/xl-ai/src/streamTool/preprocess.test.ts b/packages/xl-ai/src/streamTool/preprocess.test.ts new file mode 100644 index 0000000000..ba608aaee3 --- /dev/null +++ b/packages/xl-ai/src/streamTool/preprocess.test.ts @@ -0,0 +1,207 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { beforeEach, describe, expect, it } from "vitest"; +import { tools } from "../api/formats/json/tools/index.js"; +import { + preprocessOperationsNonStreaming, + preprocessOperationsStreaming, +} from "./preprocess.js"; +import { StreamTool } from "./streamTool.js"; + +const addOperationValid = { + type: "add" as const, + referenceId: "existing-id$", + position: "after" as const, + blocks: [ + { + type: "paragraph" as const, + content: [{ type: "text" as const, text: "test" }], + }, + ], +}; + +const addOperationInvalidId = { + type: "add" as const, + referenceId: "existing-id", + position: "after" as const, + blocks: [ + { + type: "paragraph" as const, + content: [{ type: "text" as const, text: "test" }], + }, + ], +}; + +const invalidOperationType = { + type: "invalid" as const, + referenceId: "existing-id", + position: "after" as const, + blocks: [ + { + type: "paragraph" as const, + content: [{ type: "text" as const, text: "test" }], + }, + ], +}; + +async function collectStreamToArray(stream: AsyncIterable): Promise { + const results: T[] = []; + for await (const result of stream) { + results.push(result); + } + return results; +} + +describe("preprocess", () => { + let editor: BlockNoteEditor; + let streamTools: StreamTool[]; + beforeEach(() => { + editor = BlockNoteEditor.create({ + initialContent: [ + { + type: "paragraph", + content: "test", + id: "existing-id", + }, + ], + }); + streamTools = [ + tools.add(editor, { idsSuffixed: true, withDelays: false }), + tools.update(editor, { idsSuffixed: true, withDelays: false }), + tools.delete(editor, { idsSuffixed: true, withDelays: false }), + ]; + }); + + describe("preprocessOperationsStreaming", () => { + it("should process pass valid operations", async () => { + async function* mockStream() { + yield { + partialOperation: addOperationValid, + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + }; + } + + const results = await collectStreamToArray( + preprocessOperationsStreaming(mockStream(), streamTools), + ); + + expect(results.length).toBe(1); + }); + + it("should drop invalid partial operations", async () => { + async function* mockStream() { + yield { + partialOperation: addOperationInvalidId, + isUpdateToPreviousOperation: false, + isPossiblyPartial: true, + }; + yield { + partialOperation: invalidOperationType, + isUpdateToPreviousOperation: false, + isPossiblyPartial: true, + }; + } + + const results = await collectStreamToArray( + preprocessOperationsStreaming(mockStream(), streamTools), + ); + + expect(results.length).toBe(0); + }); + + it("should throw invalid full operations", async () => { + async function* mockStream() { + yield { + partialOperation: addOperationInvalidId, + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + }; + yield { + partialOperation: invalidOperationType, + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + }; + } + + await expect( + collectStreamToArray( + preprocessOperationsStreaming(mockStream(), streamTools), + ), + ).rejects.toThrow(); + }); + + it("should handle empty operation streams", async () => { + async function* mockStream() { + // Empty stream + } + + const results = await collectStreamToArray( + preprocessOperationsStreaming(mockStream(), streamTools), + ); + + expect(results).toHaveLength(0); + }); + }); + + describe("preprocessOperationsNonStreaming", () => { + it("should pass valid operations", async () => { + async function* mockStream() { + yield { + partialOperation: addOperationValid, + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + }; + } + + const results = await collectStreamToArray( + preprocessOperationsNonStreaming(mockStream(), streamTools), + ); + + expect(results.length).toBe(1); + }); + + it("should throw an error on invalid operations (invalid id)", async () => { + async function* mockStream() { + yield { + partialOperation: addOperationInvalidId, + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + }; + } + + await expect( + collectStreamToArray( + preprocessOperationsNonStreaming(mockStream(), streamTools), + ), + ).rejects.toThrow(); + }); + + it("should throw an error on invalid operations (invalid type)", async () => { + async function* mockStream() { + yield { + partialOperation: invalidOperationType, + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + }; + } + + await expect( + collectStreamToArray( + preprocessOperationsNonStreaming(mockStream(), streamTools), + ), + ).rejects.toThrow(); + }); + + it("should handle empty operation streams", async () => { + async function* mockStream() { + // Empty stream + } + + const results = await collectStreamToArray( + preprocessOperationsNonStreaming(mockStream(), streamTools), + ); + + expect(results).toHaveLength(0); + }); + }); +}); diff --git a/packages/xl-ai/src/streamTool/preprocess.ts b/packages/xl-ai/src/streamTool/preprocess.ts new file mode 100644 index 0000000000..0a98ecc216 --- /dev/null +++ b/packages/xl-ai/src/streamTool/preprocess.ts @@ -0,0 +1,73 @@ +import { filterValidOperations } from "./filterValidOperations.js"; +import { StreamTool, StreamToolCall } from "./streamTool.js"; +import { toValidatedOperations } from "./toValidatedOperations.js"; + +export type PreprocessOperationResult[]> = { + operation: StreamToolCall; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; +}; + +/** + * Validates an stream of operations and filters out invalid operations. + */ +export async function* preprocessOperationsStreaming< + T extends StreamTool[], +>( + operationsStream: AsyncIterable<{ + partialOperation: any; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; + }>, + streamTools: T, +): AsyncGenerator> { + // from partial operations to valid / invalid operations + const validatedOperationsStream = toValidatedOperations( + operationsStream, + streamTools, + ); + + // filter valid operations, invalid partial operations are ignored + const validOperationsStream = filterValidOperations( + validatedOperationsStream, + (chunk) => { + if (!chunk.isPossiblyPartial) { + // only throw if the operation is not possibly partial + throw new Error("invalid operation: " + chunk.operation.error); + } + }, + ); + + yield* validOperationsStream; +} + +/** + * Validates an stream of operations and throws an error if an invalid operation is found. + */ +export async function* preprocessOperationsNonStreaming< + T extends StreamTool[], +>( + operationsStream: AsyncIterable<{ + partialOperation: any; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; + }>, + streamTools: T, +): AsyncGenerator> { + // from partial operations to valid / invalid operations + const validatedOperationsStream = toValidatedOperations( + operationsStream, + streamTools, + ); + + // filter valid operations, invalid operations should throw an error + const validOperationsStream = filterValidOperations( + validatedOperationsStream, + (chunk) => { + throw new Error("invalid operation: " + chunk.operation.error); + }, + ); + + // yield results + yield* validOperationsStream; +} diff --git a/packages/xl-ai/src/streamTool/streamTool.ts b/packages/xl-ai/src/streamTool/streamTool.ts new file mode 100644 index 0000000000..a30d1b29a2 --- /dev/null +++ b/packages/xl-ai/src/streamTool/streamTool.ts @@ -0,0 +1,96 @@ +import { DeepPartial } from "ai"; +import type { JSONSchema7 } from "json-schema"; + +export type Result = + | { + ok: false; + error: string; + } + | { ok: true; value: T }; + +/** + * A StreamTool is a function that can be called by the LLM. + * It's similar to a Tool in the Vercel AI SDK, but: + * + * - a collection of StreamTools can be wrapped in a single LLM Tool to issue multiple operations (tool calls) at once. + * - StreamTools can be used in a streaming manner. + */ +export type StreamTool = { + /** + * The name of the tool + */ + name: T["type"]; + /** + * An optional description of the tool that can influence when the tool is picked. + */ + description?: string; + /** + * The schema of the input that the tool expects. The language model will use this to generate the input. + */ + parameters: JSONSchema7; + /** + * Validates the input of the tool call + * + * @param operation - The operation to validate. + * This can be a partial object as the LLM may not have completed the operation yet. + * The object is not guaranteed to be of type DeepPartial as the LLM might not conform to the schema correctly - so this needs to be validated. + */ + validate: ( + operation: DeepPartial, // TODO: maybe `unknown` is better? + ) => Result; + + /** + * Executes tool calls. + * + * Note that this operates on the full stream of operations (including other StreamTools calls). + * This way, we can + * + * @returns the stream of operations that have not been processed (and should be passed on to execute handlers of other StreamTools) + */ + execute: ( + operationsStream: AsyncIterable<{ + operation: StreamToolCall[]>; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; + }>, + ) => AsyncIterable<{ + operation: StreamToolCall[]>; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; + }>; +}; + +export type StreamToolCallSingle> = + T extends StreamTool ? U : never; + +/** + * A ToolCall represents an invocation of a StreamTool. + * + * Its type is the same as what a validated StreamTool returns + */ +export type StreamToolCall | StreamTool[]> = + T extends StreamTool + ? U + : // when passed an array of StreamTools, StreamToolCall represents the type of one of the StreamTool invocations + T extends StreamTool[] + ? T[number] extends StreamTool + ? V + : never + : never; + +/** + * Helper function to create a StreamTool. + * + * A StreamTool is a function that can be called by the LLM. + * It's similar to a Tool in the Vercel AI SDK, but: + * + * - a collection of StreamTools can be wrapped in a single LLM Tool to issue multiple operations (tool calls) at once. + * - StreamTools can be used in a streaming manner. + */ +export function streamTool( + config: StreamTool, +): StreamTool { + // Note: this helper function doesn't do a lot but makes it a bit easier to create a StreamTool + // and makes it similar to the `tool()` function in the Vercel AI SDK. + return config; +} diff --git a/packages/xl-ai/src/streamTool/toValidatedOperations.test.ts b/packages/xl-ai/src/streamTool/toValidatedOperations.test.ts new file mode 100644 index 0000000000..cc4010efe4 --- /dev/null +++ b/packages/xl-ai/src/streamTool/toValidatedOperations.test.ts @@ -0,0 +1,98 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { beforeEach, describe, expect, it } from "vitest"; + +import { tools } from "../api/formats/json/tools/index.js"; +import { StreamTool } from "./streamTool.js"; +import { toValidatedOperations } from "./toValidatedOperations.js"; + +const addOperationValid = { + type: "add" as const, + referenceId: "existing-id$", + position: "after" as const, + blocks: [ + { + type: "paragraph" as const, + content: [{ type: "text" as const, text: "test" }], + }, + ], +}; + +const addOperationInvalidId = { + type: "add" as const, + referenceId: "existing-id", + position: "after" as const, + blocks: [ + { + type: "paragraph" as const, + content: [{ type: "text" as const, text: "test" }], + }, + ], +}; + +const invalidOperationType = { + type: "invalid" as const, + referenceId: "existing-id", + position: "after" as const, + blocks: [ + { + type: "paragraph" as const, + content: [{ type: "text" as const, text: "test" }], + }, + ], +}; + +async function collectStreamToArray(stream: AsyncIterable): Promise { + const results: T[] = []; + for await (const result of stream) { + results.push(result); + } + return results; +} + +describe("toValidatedOperations", () => { + let editor: BlockNoteEditor; + let streamTools: StreamTool[]; + beforeEach(() => { + editor = BlockNoteEditor.create({ + initialContent: [ + { + type: "paragraph", + content: "test", + id: "existing-id", + }, + ], + }); + streamTools = [ + tools.add(editor, { idsSuffixed: true, withDelays: false }), + tools.update(editor, { idsSuffixed: true, withDelays: false }), + tools.delete(editor, { idsSuffixed: true, withDelays: false }), + ]; + }); + + it("should keep mark mark valid / invalid operations", async () => { + // Create a mock stream + async function* mockStream() { + for (const operation of [ + addOperationValid, + addOperationInvalidId, + invalidOperationType, + ]) { + yield { + partialOperation: operation, + isUpdateToPreviousOperation: false, + isPossiblyPartial: false, + }; + } + } + + const result = await collectStreamToArray( + toValidatedOperations(mockStream(), streamTools), + ); + + // Should yield the transformed operation + expect(result.length).toBe(3); + expect(result[0].operation.ok).toBe(true); + expect(result[1].operation.ok).toBe(false); + expect(result[2].operation.ok).toBe(false); + }); +}); diff --git a/packages/xl-ai/src/streamTool/toValidatedOperations.ts b/packages/xl-ai/src/streamTool/toValidatedOperations.ts new file mode 100644 index 0000000000..0b19668cda --- /dev/null +++ b/packages/xl-ai/src/streamTool/toValidatedOperations.ts @@ -0,0 +1,49 @@ +import { Result, StreamTool, StreamToolCall } from "./streamTool.js"; + +/** + * Transforms the partialObjectStream into a stream of operations (tool calls), or indicates that the operation is invalid. + * + * Invalid operations can happen because: + * a) the LLM produces an invalid result + * b) the "partial" operation doesn't have enough data yet to execute + */ +export async function* toValidatedOperations[]>( + partialObjectStream: AsyncIterable<{ + partialOperation: any; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; + }>, + streamTools: T, +): AsyncGenerator<{ + operation: Result>; + isUpdateToPreviousOperation: boolean; + isPossiblyPartial: boolean; +}> { + for await (const chunk of partialObjectStream) { + const func = streamTools.find( + (f) => f.name === chunk.partialOperation.type, + )!; + + if (!func) { + // Skip operations with no matching function + // console.error("no matching function", chunk.partialOperation); + yield { + operation: { + ok: false, + error: `No matching function for ${chunk.partialOperation.type}`, + }, + isUpdateToPreviousOperation: chunk.isUpdateToPreviousOperation, + isPossiblyPartial: chunk.isPossiblyPartial, + }; + continue; + } + + const operation = func.validate(chunk.partialOperation); + + yield { + operation, + isUpdateToPreviousOperation: chunk.isUpdateToPreviousOperation, + isPossiblyPartial: chunk.isPossiblyPartial, + }; + } +} diff --git a/packages/xl-ai/src/style.css b/packages/xl-ai/src/style.css new file mode 100644 index 0000000000..4b7558d518 --- /dev/null +++ b/packages/xl-ai/src/style.css @@ -0,0 +1,33 @@ +.bn-combobox { + display: flex; + flex-direction: column; + gap: 4px; + width: 100%; +} + +.bn-combobox-items { + max-width: 50%; +} + +.bn-combobox-items:empty { + display: none; +} + +div[data-type="modification"] { + display: inline; +} + +ins, +[data-type="modification"] { + background: rgba(24, 122, 220, 0.1); + border-bottom: 2px solid rgba(24, 122, 220, 0.1); + color: rgb(20, 95, 170); + text-decoration: none; +} + +del, +[DISABLED-data-node-deletion] { + color: rgba(100, 90, 75, 0.3); + text-decoration: line-through; + text-decoration-thickness: 1px; +} diff --git a/packages/xl-ai/src/testUtil/cases/addOperationTestCases.ts b/packages/xl-ai/src/testUtil/cases/addOperationTestCases.ts new file mode 100644 index 0000000000..a6da025f43 --- /dev/null +++ b/packages/xl-ai/src/testUtil/cases/addOperationTestCases.ts @@ -0,0 +1,89 @@ +import { getSimpleEditor } from "./editors/simpleEditor.js"; +import { DocumentOperationTestCase } from "./index.js"; + +export const addOperationTestCases: DocumentOperationTestCase[] = [ + { + editor: getSimpleEditor, + description: "add a new paragraph (start)", + baseToolCalls: [ + { + type: "add", + blocks: [{ content: "You look great today!" }], + referenceId: "ref1", + position: "before", + }, + ], + userPrompt: + "add a new paragraph with the text 'You look great today!' before the first sentence", + }, + { + editor: getSimpleEditor, + description: "add a new paragraph (end)", + baseToolCalls: [ + { + type: "add", + blocks: [{ content: "You look great today!" }], + referenceId: "ref2", + position: "after", + }, + ], + userPrompt: + "add a new paragraph with the text 'You look great today!' after the last sentence", + }, + { + editor: getSimpleEditor, + description: "add a list (end)", + baseToolCalls: [ + { + type: "add", + blocks: [ + { type: "bulletListItem", content: "Apples" }, + { type: "bulletListItem", content: "Bananas" }, + ], + referenceId: "ref2", + position: "after", + }, + ], + userPrompt: + "add a list with the items 'Apples' and 'Bananas' after the last sentence", + }, + { + editor: getSimpleEditor, + description: "Add heading (h1) and code block", + baseToolCalls: [ + { + type: "add", + blocks: [ + { type: "heading", content: "Code", props: { level: 1 } }, + { + type: "codeBlock", + content: "console.log('hello world');", + props: { language: "javascript" }, + }, + ], + referenceId: "ref2", + position: "after", + }, + ], + userPrompt: + "at the end of doc, add a heading `Code` and a javascript code block with `console.log('hello world');`", + }, + // TODO: fix cursor block + // { + // editor: getSimpleEditorWithCursorBetweenBlocks, + // description: "Add heading (based on cursor)", + // baseToolCalls: [ + // { + // type: "add", + // blocks: [ + // { type: "heading", content: "I love lamp", props: { level: 1 } }, + // ], + // referenceId: "ref1", + // position: "after", + // }, + // ], + + // userPrompt: + // "at the end of doc, add a heading `Code` and a javascript code block with `console.log('hello world');`", + // }, +]; diff --git a/packages/xl-ai/src/testUtil/cases/combinedOperationsTestCases.ts b/packages/xl-ai/src/testUtil/cases/combinedOperationsTestCases.ts new file mode 100644 index 0000000000..ab1b61e045 --- /dev/null +++ b/packages/xl-ai/src/testUtil/cases/combinedOperationsTestCases.ts @@ -0,0 +1,59 @@ +import { BlockNoteEditor, getBlockInfo, getNodeById } from "@blocknote/core"; +import { getEditorWithFormattingAndMentions } from "./editors/formattingAndMentions.js"; +import { DocumentOperationTestCase } from "./index.js"; + +export const combinedOperationsTestCases: DocumentOperationTestCase[] = [ + { + editor: getEditorWithFormattingAndMentions, + description: "add and update paragraph", + baseToolCalls: [ + { + type: "add", + blocks: [{ content: "You look great today!" }], + referenceId: "ref1", + position: "after", + }, + { + type: "update", + id: "ref1", + block: { content: "Hallo, wereld!" }, + }, + ], + userPrompt: + "add a new paragraph with the text 'You look great today!' after the first paragraph and translate 'Hello, world' to dutch", + }, + { + editor: getEditorWithFormattingAndMentions, + description: "add paragraph and update selection", + // Note: this test is important because it will validate whether the + // positions of `getTestSelection` are mapped correctly after the first toolcall + baseToolCalls: [ + { + type: "add", + blocks: [{ content: "You look great today!" }], + referenceId: "ref2", + position: "before", + }, + { + type: "update", + id: "ref2", + block: { + content: [{ type: "text", text: "Hallo", styles: {} }], + }, + }, + ], + getTestSelection: (editor: BlockNoteEditor) => { + const posInfo = getNodeById("ref2", editor.prosemirrorState.doc)!; + const block = getBlockInfo(posInfo); + if (!block.isBlockContainer) { + throw new Error("Block is not a block container"); + } + return { + from: block.blockContent.beforePos + 1, + to: block.blockContent.beforePos + 1 + "Hello".length, + }; + }, + userPrompt: + "add a paragraph with the text 'You look great today!' at the beginning and translate selection to German", + }, +]; diff --git a/packages/xl-ai/src/testUtil/cases/deleteOperationTestCases.ts b/packages/xl-ai/src/testUtil/cases/deleteOperationTestCases.ts new file mode 100644 index 0000000000..50d70c833a --- /dev/null +++ b/packages/xl-ai/src/testUtil/cases/deleteOperationTestCases.ts @@ -0,0 +1,16 @@ +import { getEditorWithFormattingAndMentions } from "./editors/formattingAndMentions.js"; +import { DocumentOperationTestCase } from "./index.js"; + +export const deleteOperationTestCases: DocumentOperationTestCase[] = [ + { + editor: getEditorWithFormattingAndMentions, + description: "delete first block", + baseToolCalls: [ + { + type: "delete", + id: "ref1", + }, + ], + userPrompt: "delete the first paragraph", + }, +]; diff --git a/packages/xl-ai/src/testUtil/cases/editors/blockFormatting.ts b/packages/xl-ai/src/testUtil/cases/editors/blockFormatting.ts new file mode 100644 index 0000000000..4f956f03ac --- /dev/null +++ b/packages/xl-ai/src/testUtil/cases/editors/blockFormatting.ts @@ -0,0 +1,33 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { createAIExtension } from "../../../AIExtension.js"; +import { schemaWithMention as schema } from "../schemas/mention.js"; + +export function getEditorWithBlockFormatting() { + const editor = BlockNoteEditor.create({ + initialContent: [ + { + id: "ref1", + content: "Colored text", + props: { + backgroundColor: "red", + }, + }, + { + id: "ref2", + content: "Aligned text", + props: { + textAlignment: "right", + }, + }, + ], + trailingBlock: false, + schema, + _extensions: { + ai: createAIExtension({ + model: undefined as any, + }), + }, + }); + editor._tiptapEditor.forceEnablePlugins(); + return editor; +} diff --git a/packages/xl-ai/src/testUtil/cases/editors/formattingAndMentions.ts b/packages/xl-ai/src/testUtil/cases/editors/formattingAndMentions.ts new file mode 100644 index 0000000000..22874aa093 --- /dev/null +++ b/packages/xl-ai/src/testUtil/cases/editors/formattingAndMentions.ts @@ -0,0 +1,83 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { createAIExtension } from "../../../AIExtension.js"; +import { schemaWithMention as schema } from "../schemas/mention.js"; + +export function getEditorWithFormattingAndMentions() { + const editor = BlockNoteEditor.create({ + initialContent: [ + { + id: "ref1", + content: "Hello, world!", + }, + { + id: "ref2", + content: [ + { + type: "text", + text: "Hello, ", + }, + { + type: "mention", + props: { + user: "John Doe", + }, + }, + { + type: "text", + text: "! ", + }, + { + type: "text", + text: "How are you doing?", + styles: { + bold: true, + }, + }, + { + type: "text", + text: " ", + }, + { + type: "text", + text: "This text is blue!", + styles: { + textColor: "blue", + }, + }, + ], + }, + { + id: "ref3", + type: "paragraph", + content: [ + { + type: "text", + text: "Hello, world! ", + styles: {}, + }, + { + type: "text", + text: "Bold text. ", + styles: { + bold: true, + }, + }, + { + type: "link", + href: "https://www.google.com", + content: "Link.", + }, + ], + }, + ], + trailingBlock: false, + schema, + _extensions: { + ai: createAIExtension({ + model: undefined as any, + }), + }, + }); + editor._tiptapEditor.forceEnablePlugins(); + return editor; +} diff --git a/packages/xl-ai/src/testUtil/cases/editors/simpleEditor.ts b/packages/xl-ai/src/testUtil/cases/editors/simpleEditor.ts new file mode 100644 index 0000000000..5b96e10d19 --- /dev/null +++ b/packages/xl-ai/src/testUtil/cases/editors/simpleEditor.ts @@ -0,0 +1,56 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { createAIExtension } from "../../../AIExtension.js"; +import { schemaWithMention as schema } from "../schemas/mention.js"; + +export function getSimpleEditor() { + const editor = BlockNoteEditor.create({ + initialContent: [ + { + id: "ref1", + content: "Hello, world!", + }, + { + id: "ref2", + content: "How are you?", + }, + ], + trailingBlock: false, + schema, + _extensions: { + ai: createAIExtension({ + model: undefined as any, + }), + }, + }); + editor._tiptapEditor.forceEnablePlugins(); + return editor; +} + +export function getSimpleEditorWithCursorBetweenBlocks() { + const editor = BlockNoteEditor.create({ + initialContent: [ + { + id: "ref1", + content: "Hello, world!", + }, + { + id: "ref2", + content: "", + }, + { + id: "ref3", + content: "How are you?", + }, + ], + trailingBlock: false, + schema, + extensions: [ + createAIExtension({ + model: undefined as any, + }), + ], + }); + editor.setTextCursorPosition("ref2"); + editor._tiptapEditor.forceEnablePlugins(); + return editor; +} diff --git a/packages/xl-ai/src/testUtil/cases/editors/tables.ts b/packages/xl-ai/src/testUtil/cases/editors/tables.ts new file mode 100644 index 0000000000..e16a684361 --- /dev/null +++ b/packages/xl-ai/src/testUtil/cases/editors/tables.ts @@ -0,0 +1,49 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { createAIExtension } from "../../../AIExtension.js"; +import { schemaWithMention as schema } from "../schemas/mention.js"; + +export function getEditorWithTables() { + const editor = BlockNoteEditor.create({ + initialContent: [ + { + id: "ref1", + type: "table", + content: { + type: "tableContent", + rows: [ + { + cells: ["Table Cell 1", "Table Cell 2", "Table Cell 3"], + }, + { + cells: [ + "Table Cell 4", + [ + { + type: "text", + text: "Table Cell Bold 5", + styles: { + bold: true, + }, + }, + ], + "Table Cell 6", + ], + }, + { + cells: ["Table Cell 7", "Table Cell 8", "Table Cell 9"], + }, + ], + }, + }, + ], + schema, + trailingBlock: false, + _extensions: { + ai: createAIExtension({ + model: undefined as any, + }), + }, + }); + editor._tiptapEditor.forceEnablePlugins(); + return editor; +} diff --git a/packages/xl-ai/src/testUtil/cases/index.ts b/packages/xl-ai/src/testUtil/cases/index.ts new file mode 100644 index 0000000000..07b2ee4ce1 --- /dev/null +++ b/packages/xl-ai/src/testUtil/cases/index.ts @@ -0,0 +1,110 @@ +import { + BlockNoteEditor, + getNodeById, + PartialBlock, + updateBlockTr, +} from "@blocknote/core"; +import { AddBlocksToolCall } from "../../api/formats/base-tools/createAddBlocksTool.js"; +import { UpdateBlockToolCall } from "../../api/formats/base-tools/createUpdateBlockTool.js"; +import { DeleteBlockToolCall } from "../../api/formats/base-tools/delete.js"; +import { isEmptyParagraph } from "../../util/emptyBlock.js"; + +export type DocumentOperationTestCase = { + /** + * The editor to apply the update to + */ + editor: () => BlockNoteEditor; + /** + * The toolcalls to apply to the editor + */ + baseToolCalls: Array< + | UpdateBlockToolCall> + | AddBlocksToolCall> + | DeleteBlockToolCall + >; + /** + * If provided, this function will be used to get the selection to use for the test. + */ + getTestSelection?: (editor: BlockNoteEditor) => { + from: number; + to: number; + }; + /** + * Description (name) of the test case + */ + description: string; + /** + * For LLM tests, this is a prompt that can be given that should also result in the same update. + * + * Note: the test cases in this file focus on formatting, so the prompts might not be very realistic, + * the goal of these tests is to test whether LLMs can make certain updates technically, not to test + * the quality of the prompt understanding, etc. (should be in different tests) + */ + userPrompt: string; + /** + * The capabilities that are required to perform the update. + * If the LLM does not have these capabilities, the test will be skipped. + */ + requiredCapabilities?: { + mentions?: boolean; + textAlignment?: boolean; + blockColor?: boolean; + }; +}; + +export function getExpectedEditor( + testCase: DocumentOperationTestCase, + opts: { + deleteEmptyCursorBlock: boolean; + } = { + deleteEmptyCursorBlock: false, + }, +) { + (window as any).__TEST_OPTIONS.mockID = undefined; + + const editor = testCase.editor(); + + const cursorBlock = testCase.getTestSelection + ? undefined + : editor.getTextCursorPosition().block; + + const deleteCursorBlock: string | undefined = + cursorBlock && opts.deleteEmptyCursorBlock && isEmptyParagraph(cursorBlock) + ? cursorBlock.id + : undefined; + + if (deleteCursorBlock) { + editor.removeBlocks([deleteCursorBlock]); + } + + for (const toolCall of testCase.baseToolCalls) { + if (toolCall.type === "update") { + const selection = testCase.getTestSelection?.(editor); + if (selection) { + editor.transact((tr) => { + const pos = getNodeById(toolCall.id, tr.doc)!; + // this is a bit of an ugly internal API, do we want to expose this (updating a selection) + // to the user-facing API? + updateBlockTr( + tr, + pos.posBeforeNode, + toolCall.block, + selection?.from, + selection?.to, + ); + }); + } else { + editor.updateBlock(toolCall.id, toolCall.block); + } + } else if (toolCall.type === "add") { + editor.insertBlocks( + toolCall.blocks, + toolCall.referenceId, + toolCall.position, + ); + } else if (toolCall.type === "delete") { + editor.removeBlocks([toolCall.id]); + } + } + return editor; +} diff --git a/packages/xl-ai/src/testUtil/cases/schemas/mention.ts b/packages/xl-ai/src/testUtil/cases/schemas/mention.ts new file mode 100644 index 0000000000..743e34948a --- /dev/null +++ b/packages/xl-ai/src/testUtil/cases/schemas/mention.ts @@ -0,0 +1,34 @@ +import { + BlockNoteSchema, + createInlineContentSpec, + defaultInlineContentSpecs, +} from "@blocknote/core"; + +export const mention = createInlineContentSpec( + { + type: "mention", + propSchema: { + user: { + default: "", + }, + }, + content: "none", + }, + { + render: (inlineContent) => { + const mention = document.createElement("span"); + mention.textContent = `@${inlineContent.props.user}`; + + return { + dom: mention, + }; + }, + } +); + +export const schemaWithMention = BlockNoteSchema.create({ + inlineContentSpecs: { + mention, + ...defaultInlineContentSpecs, + }, +}); diff --git a/packages/xl-ai/src/testUtil/cases/updateOperationTestCases.ts b/packages/xl-ai/src/testUtil/cases/updateOperationTestCases.ts new file mode 100644 index 0000000000..7a46ff435e --- /dev/null +++ b/packages/xl-ai/src/testUtil/cases/updateOperationTestCases.ts @@ -0,0 +1,835 @@ +import { BlockNoteEditor, getBlockInfo, getNodeById } from "@blocknote/core"; +import { createAIExtension } from "../../AIExtension.js"; +import { getEditorWithBlockFormatting } from "./editors/blockFormatting.js"; +import { getEditorWithFormattingAndMentions } from "./editors/formattingAndMentions.js"; +import { DocumentOperationTestCase } from "./index.js"; +import { schemaWithMention as schema } from "./schemas/mention.js"; + +/** + * This file defines a set of test cases that can be used to test update operations to the editor. + * It focuses on formatting related operations (like changing styles, inline content, props, etc) + */ + +// TODO: add test case where existing paragraph is right aligned / colored +// TODO: add test case where some text is colored + +export const updateOperationTestCases: DocumentOperationTestCase[] = [ + { + editor: getEditorWithFormattingAndMentions, + description: "standard update", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + content: [{ type: "text", text: "Hallo, Welt!", styles: {} }], + }, + }, + ], + userPrompt: "translate the first paragraph to german", + }, + { + editor: getEditorWithFormattingAndMentions, + description: "translate selection", + baseToolCalls: [ + { + type: "update", + id: "ref2", + block: { + content: [{ type: "text", text: "Hallo", styles: {} }], + }, + }, + ], + getTestSelection: (editor: BlockNoteEditor) => { + const posInfo = getNodeById("ref2", editor.prosemirrorState.doc)!; + const block = getBlockInfo(posInfo); + if (!block.isBlockContainer) { + throw new Error("Block is not a block container"); + } + return { + from: block.blockContent.beforePos + 1, + to: block.blockContent.beforePos + 1 + "Hello".length, + }; + }, + userPrompt: "translate to German", + }, + { + editor: getEditorWithFormattingAndMentions, + description: "update block type", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + type: "heading", + props: { + level: 1, + }, + content: [{ type: "text", text: "Hello, world!", styles: {} }], + }, + }, + ], + userPrompt: "make the first paragraph a heading", + }, + { + editor: getEditorWithFormattingAndMentions, + description: "update block prop", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + props: { + textAlignment: "right", + }, + }, + }, + ], + userPrompt: "make the first paragraph right aligned", + requiredCapabilities: { + textAlignment: true, + }, + }, + { + editor: getEditorWithFormattingAndMentions, + description: "update block type and content", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + type: "heading", + props: { + level: 1, + }, + content: [{ type: "text", text: "What's up, world!", styles: {} }], + }, + }, + ], + userPrompt: + "make the first paragraph a heading and update the content to 'What's up, world!'", + }, + { + editor: getEditorWithFormattingAndMentions, + description: "update block prop and content", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + props: { + textAlignment: "right", + }, + content: [{ type: "text", text: "What's up, world!", styles: {} }], + }, + }, + ], + userPrompt: + "make the first paragraph right aligned and update the content to 'What's up, world!'", + requiredCapabilities: { + textAlignment: true, + }, + }, + { + editor: getEditorWithFormattingAndMentions, + description: "styles + ic in source block, replace content", + baseToolCalls: [ + { + type: "update", + id: "ref2", + block: { + content: [ + { type: "text", text: "Hello, updated content", styles: {} }, + ], + }, + }, + ], + userPrompt: + "update the content of the second block to 'Hello, updated content'", + }, + { + editor: getEditorWithFormattingAndMentions, + description: "styles + ic in source block, update text", + baseToolCalls: [ + { + type: "update", + id: "ref2", + block: { + content: [ + { + type: "text", + text: "Hallo, ", + styles: {}, + }, + { + type: "mention", + props: { + user: "John Doe", + }, + content: undefined, + }, + { + type: "text", + text: "! ", + styles: {}, + }, + { + type: "text", + text: "Wie geht es dir?", + styles: { + bold: true, + }, + }, + { + type: "text", + text: " ", + styles: {}, + }, + { + type: "text", + text: "Dieser Text ist blau!", + styles: { + textColor: "blue", + }, + }, + ], + }, + }, + ], + userPrompt: + "translate the second block to german (use dir instead of Ihnen)", + }, + { + editor: getEditorWithFormattingAndMentions, + description: "styles + ic in source block, remove mark", + baseToolCalls: [ + { + type: "update", + id: "ref2", + block: { + content: [ + { + type: "text", + text: "Hello, ", + styles: {}, + }, + { + type: "mention", + props: { + user: "John Doe", + }, + content: undefined, + }, + { + type: "text", + text: "! How are you doing?", + styles: {}, + }, + { + type: "text", + text: " ", + }, + { + type: "text", + text: "This text is blue!", + styles: { + textColor: "blue", + }, + }, + ], + }, + }, + ], + userPrompt: "remove the bold style from the second block", + }, + { + editor: getEditorWithFormattingAndMentions, + description: "styles + ic in source block, remove mention", + baseToolCalls: [ + { + type: "update", + id: "ref2", + block: { + content: [ + { + type: "text", + text: "Hello! ", + styles: {}, + }, + { + type: "text", + text: "How are you doing?", + styles: { + bold: true, + }, + }, + { + type: "text", + text: " ", + }, + { + type: "text", + text: "This text is blue!", + styles: { + textColor: "blue", + }, + }, + ], + }, + }, + ], + userPrompt: + "change to say 'Hello! How are you doing? This text is blue!' (remove mention but keep bold text)", + }, + { + editor: getEditorWithFormattingAndMentions, + description: "styles + ic in target block, add mark (word)", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + content: [ + { + type: "text", + text: "Hello, ", + styles: {}, + }, + { + type: "text", + text: "world!", + styles: { + bold: true, + }, + }, + ], + }, + }, + ], + userPrompt: "make 'world!' (in the first block) bold", + }, + { + editor: getEditorWithFormattingAndMentions, + description: "styles + ic in target block, add mark (paragraph)", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + content: [ + { + type: "text", + text: "Hello, world!", + styles: { + bold: true, + }, + }, + ], + }, + }, + ], + userPrompt: "make first paragraph bold", + }, + { + editor: getEditorWithFormattingAndMentions, + description: "plain source block, add mention", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + content: [ + { + type: "text", + text: "Hello, ", + styles: {}, + }, + { + type: "mention", + props: { + user: "Jane Doe", + }, + content: undefined, + }, + { + type: "text", + text: "!", + styles: {}, + }, + ], + }, + }, + ], + userPrompt: + "Change the first paragraph to Hello, Jane Doe! (use a mention)", + requiredCapabilities: { + mentions: true, + }, + }, + { + editor: getEditorWithFormattingAndMentions, + description: "styles + ic in source block, update mention prop", + baseToolCalls: [ + { + type: "update", + id: "ref2", + block: { + content: [ + { + styles: {}, + type: "text", + text: "Hello, ", + }, + { + content: undefined, + type: "mention", + props: { + user: "Jane Doe", + }, + }, + { + styles: {}, + type: "text", + text: "! ", + }, + { + type: "text", + text: "How are you doing?", + styles: { + bold: true, + }, + }, + { + type: "text", + text: " ", + }, + { + type: "text", + text: "This text is blue!", + styles: { + textColor: "blue", + }, + }, + ], + }, + }, + ], + userPrompt: "update the mention to Jane Doe", + requiredCapabilities: { + mentions: true, + }, + }, + { + editor: getEditorWithFormattingAndMentions, + description: "drop mark and link", + baseToolCalls: [ + { + type: "update", + id: "ref3", + block: { + content: [ + { + type: "text", + text: "Hello, world! Bold text. Link.", + styles: {}, + }, + ], + }, + }, + ], + userPrompt: + "remove the formatting (turn into plain text without styles or urls) from the last paragraph", + }, + { + editor: getEditorWithFormattingAndMentions, + description: "drop mark and link and change text within mark", + baseToolCalls: [ + { + type: "update", + id: "ref3", + block: { + content: [ + { + type: "text", + text: "Hi, world! Bold the text. Link.", + styles: {}, + }, + ], + }, + }, + ], + userPrompt: + "change the last paragraph to 'Hi, world! Bold the text. Link.' without any markup like bold or link", + }, + /*{ + editor: getEditorWithTables, + description: "update table cell", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + content: { + type: "tableContent", + rows: [ + { + cells: ["Hello, world!", "Table Cell 2", "Table Cell 3"], + }, + { + cells: [ + "Table Cell 4", + [ + { + type: "text", + text: "Table Cell Bold 5", + styles: { + bold: true, + }, + }, + ], + "Table Cell 6", + ], + }, + { + cells: ["Table Cell 7", "Table Cell 8", "Table Cell 9"], + }, + ], + }, + }, + }, + ], + userPrompt: "update the first cell to 'Hello, world!'", + }, + { + editor: getEditorWithTables, + description: "update table to caps", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + content: { + type: "tableContent", + rows: [ + { + cells: ["TABLE CELL 1", "TABLE CELL 2", "TABLE CELL 3"], + }, + { + cells: [ + "TABLE CELL 4", + [ + { + type: "text", + text: "TABLE CELL BOLD 5", + styles: { + bold: true, + }, + }, + ], + "TABLE CELL 6", + ], + }, + { + cells: ["TABLE CELL 7", "TABLE CELL 8", "TABLE CELL 9"], + }, + ], + }, + }, + }, + ], + userPrompt: "update all table content to CAPS", + }, + { + editor: getEditorWithTables, + description: "remove column", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + content: { + type: "tableContent", + rows: [ + { + cells: ["Table Cell 1", "Table Cell 3"], + }, + { + cells: ["Table Cell 4", "Table Cell 6"], + }, + { + cells: ["Table Cell 7", "Table Cell 9"], + }, + ], + }, + }, + }, + ], + userPrompt: "Remove the second column", + }, + { + editor: getEditorWithTables, + description: "remove last column", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + content: { + type: "tableContent", + rows: [ + { + cells: ["Table Cell 1", "Table Cell 2"], + }, + { + cells: [ + "Table Cell 4", + [ + { + type: "text", + text: "Table Cell Bold 5", + styles: { + bold: true, + }, + }, + ], + ], + }, + { + cells: ["Table Cell 7", "Table Cell 8"], + }, + ], + }, + }, + }, + ], + userPrompt: "Remove the last column", + }, + { + editor: getEditorWithTables, + description: "remove row", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + content: { + type: "tableContent", + rows: [ + { + cells: ["Table Cell 1", "Table Cell 2", "Table Cell 3"], + }, + { + cells: ["Table Cell 7", "Table Cell 8", "Table Cell 9"], + }, + ], + }, + }, + }, + ], + userPrompt: "Remove the second row", + }, + { + editor: getEditorWithTables, + description: "remove last row", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + content: { + type: "tableContent", + rows: [ + { + cells: ["Table Cell 1", "Table Cell 2", "Table Cell 3"], + }, + { + cells: [ + "Table Cell 4", + [ + { + type: "text", + text: "Table Cell Bold 5", + styles: { + bold: true, + }, + }, + ], + "Table Cell 6", + ], + }, + ], + }, + }, + }, + ], + userPrompt: "Remove the last row", + },*/ + { + editor: () => { + const editor = BlockNoteEditor.create({ + trailingBlock: false, + initialContent: [ + { + id: "ref1", + type: "paragraph", + content: [{ type: "text", text: "I need to buy:", styles: {} }], + }, + { + id: "ref2", + type: "paragraph", + content: [{ type: "text", text: "Apples", styles: {} }], + }, + { + id: "ref3", + type: "paragraph", + content: [{ type: "text", text: "Bananas", styles: {} }], + }, + ], + schema, + _extensions: { + ai: createAIExtension({ + model: undefined as any, + }), + }, + }); + return editor; + }, + description: "turn paragraphs into list", + baseToolCalls: [ + { + type: "update", + id: "ref2", + block: { + type: "bulletListItem", + }, + }, + { + type: "update", + id: "ref3", + block: { + type: "bulletListItem", + }, + }, + ], + userPrompt: "turn into list (update existing blocks)", + getTestSelection(editor) { + const posInfo = getNodeById("ref2", editor.prosemirrorState.doc)!; + const block = getBlockInfo(posInfo); + if (!block.isBlockContainer) { + throw new Error("Block is not a block container"); + } + return { + from: block.blockContent.beforePos + 1, + to: editor.prosemirrorState.doc.content.size, + }; + }, + }, + { + editor: () => { + const editor = BlockNoteEditor.create({ + trailingBlock: false, + initialContent: [ + { + id: "ref1", + type: "paragraph", + content: [{ type: "text", text: "I need to buy:", styles: {} }], + children: [ + { + id: "ref2", + type: "paragraph", + content: [{ type: "text", text: "Apples", styles: {} }], + }, + ], + }, + ], + schema, + _extensions: { + ai: createAIExtension({ + model: undefined as any, + }), + }, + }); + return editor; + }, + description: "modify nested content", + baseToolCalls: [ + { + type: "update", + id: "ref2", + block: { + content: [{ type: "text", text: "APPLES", styles: {} }], + }, + }, + ], + userPrompt: "make apples uppercase", + }, + { + editor: () => { + const editor = BlockNoteEditor.create({ + trailingBlock: false, + initialContent: [ + { + id: "ref1", + type: "paragraph", + content: [{ type: "text", text: "I need to buy:", styles: {} }], + children: [ + { + id: "ref2", + type: "paragraph", + content: [{ type: "text", text: "Apples", styles: {} }], + }, + ], + }, + ], + schema, + _extensions: { + ai: createAIExtension({ + model: undefined as any, + }), + }, + }); + return editor; + }, + description: "modify parent content", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + content: [{ type: "text", text: "I NEED TO BUY:", styles: {} }], + }, + }, + ], + userPrompt: "make the first paragraph uppercase", + }, + { + editor: getEditorWithBlockFormatting, + description: "clear block formatting", + baseToolCalls: [ + { + type: "update", + id: "ref1", + block: { + props: { + backgroundColor: undefined, + textAlignment: undefined, + }, + }, + }, + { + type: "update", + id: "ref2", + block: { + props: { + backgroundColor: undefined, + textAlignment: undefined, + }, + }, + }, + ], + userPrompt: "clear the formatting (colors and alignment)", + requiredCapabilities: { + blockColor: true, + }, + }, +]; diff --git a/packages/xl-ai/src/testUtil/suggestChangesTestUtil.ts b/packages/xl-ai/src/testUtil/suggestChangesTestUtil.ts new file mode 100644 index 0000000000..fac6358d88 --- /dev/null +++ b/packages/xl-ai/src/testUtil/suggestChangesTestUtil.ts @@ -0,0 +1,13 @@ +import { BlockNoteEditor } from "@blocknote/core"; +import { revertSuggestions } from "@blocknote/prosemirror-suggest-changes"; +import { Node } from "prosemirror-model"; +import { expect } from "vitest"; + +export function validateRejectingResultsInOriginalDoc( + editor: BlockNoteEditor, + originalDoc: Node, +) { + revertSuggestions(editor.prosemirrorState, (tr) => { + expect(tr.doc.toJSON()).toEqual(originalDoc.toJSON()); + }); +} diff --git a/packages/xl-ai/src/testUtil/testAIModels.ts b/packages/xl-ai/src/testUtil/testAIModels.ts new file mode 100644 index 0000000000..d1715bd8bd --- /dev/null +++ b/packages/xl-ai/src/testUtil/testAIModels.ts @@ -0,0 +1,30 @@ +import { createGroq } from "@ai-sdk/groq"; +import { createOpenAI } from "@ai-sdk/openai"; +import { createOpenAICompatible } from "@ai-sdk/openai-compatible"; +import { createBlockNoteAIClient } from "../blocknoteAIClient/client.js"; + +// Create client and models outside of test suites so they can be shared +const client = createBlockNoteAIClient({ + baseURL: "https://localhost:3000/ai", + apiKey: "PLACEHOLDER", +}); + +const groq = createGroq({ + ...client.getProviderSettings("groq"), +})("llama-3.3-70b-versatile"); + +const openai = createOpenAI({ + ...client.getProviderSettings("openai"), +})("gpt-4o-2024-08-06", {}); + +const albert = createOpenAICompatible({ + name: "albert-etalab", + baseURL: "https://albert.api.etalab.gouv.fr/v1", + ...client.getProviderSettings("albert-etalab"), +})("neuralmagic/Meta-Llama-3.1-70B-Instruct-FP8"); + +export const testAIModels = { + groq, + openai, + albert, +}; diff --git a/packages/xl-ai/src/util/emptyBlock.ts b/packages/xl-ai/src/util/emptyBlock.ts new file mode 100644 index 0000000000..1b4b0fc15b --- /dev/null +++ b/packages/xl-ai/src/util/emptyBlock.ts @@ -0,0 +1,8 @@ +import type { PartialBlock } from "@blocknote/core"; + +export function isEmptyParagraph(block: PartialBlock) { + return ( + ((block.type === "paragraph" || !block.type) && !block.content) || + (Array.isArray(block.content) && block.content.length === 0) + ); +} diff --git a/packages/xl-ai/src/util/stream.ts b/packages/xl-ai/src/util/stream.ts new file mode 100644 index 0000000000..03ac85c234 --- /dev/null +++ b/packages/xl-ai/src/util/stream.ts @@ -0,0 +1,66 @@ +/** + * Converts an AsyncIterable to a ReadableStream + */ +export function asyncIterableToStream( + iterable: AsyncIterable +): ReadableStream { + return new ReadableStream({ + async start(controller) { + try { + for await (const result of iterable) { + controller.enqueue(result); + } + controller.close(); + } catch (error) { + controller.error(error); + } + }, + }); +} + +// https://github.com/vercel/ai/blob/ebec3d3235d7a59bd8de8b0bed010777c1d25b05/packages/ai/core/util/async-iterable-stream.ts + +/** + * A stream that is both an AsyncIterable and a ReadableStream + */ +export type AsyncIterableStream = AsyncIterable & ReadableStream; + +/** + * Creates an AsyncIterableStream from a ReadableStream + */ +export function createAsyncIterableStream( + source: ReadableStream +): AsyncIterableStream { + if (source.locked) { + throw new Error( + "Stream (source) is already locked and cannot be iterated." + ); + } + + const stream = source.pipeThrough(new TransformStream()); + + (stream as AsyncIterableStream)[Symbol.asyncIterator] = () => { + if (stream.locked) { + throw new Error("Stream is already locked and cannot be iterated again."); + } + + const reader = stream.getReader(); + return { + async next(): Promise> { + const { done, value } = await reader.read(); + return done ? { done: true, value: undefined } : { done: false, value }; + }, + }; + }; + + return stream as AsyncIterableStream; +} + +/** + * Creates an AsyncIterableStream from an AsyncGenerator + */ +export function createAsyncIterableStreamFromAsyncIterable( + source: AsyncIterable +): AsyncIterableStream { + return createAsyncIterableStream(asyncIterableToStream(source)); +} diff --git a/packages/xl-ai/src/util/trimArray.ts b/packages/xl-ai/src/util/trimArray.ts new file mode 100644 index 0000000000..f92267823d --- /dev/null +++ b/packages/xl-ai/src/util/trimArray.ts @@ -0,0 +1,26 @@ +export function trimArray( + arr: T[], + matchFn: (element: T) => boolean, + trimStart = true, + trimEnd = true +): T[] { + let start = 0; + let end = arr.length; + + // Find the first non-matching element from the start + if (trimStart) { + while (start < end && matchFn(arr[start])) { + start++; + } + } + + // Find the first non-matching element from the end + if (trimEnd) { + while (end > start && matchFn(arr[end - 1])) { + end--; + } + } + + // Slice the array to include only the untrimmed portion + return arr.slice(start, end); +} diff --git a/packages/xl-ai/tsconfig.json b/packages/xl-ai/tsconfig.json new file mode 100644 index 0000000000..dcf6b07cb8 --- /dev/null +++ b/packages/xl-ai/tsconfig.json @@ -0,0 +1,38 @@ +{ + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ESNext", "DOM"], + "moduleResolution": "Node", + "jsx": "react-jsx", + "strict": true, + "sourceMap": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "noEmit": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "outDir": "dist", + "declaration": true, + "declarationDir": "types", + "composite": true, + "skipLibCheck": true, + "paths": { + "@shared/*": ["../../shared/*"] + } + }, + "include": ["src"], + "references": [ + { + "path": "../core" + }, + { + "path": "../react" + }, + { + "path": "../../shared" + } + ] +} diff --git a/packages/xl-ai/vite.config.ts b/packages/xl-ai/vite.config.ts new file mode 100644 index 0000000000..1b91e30c06 --- /dev/null +++ b/packages/xl-ai/vite.config.ts @@ -0,0 +1,63 @@ +import react from "@vitejs/plugin-react"; +import * as path from "path"; +import { webpackStats } from "rollup-plugin-webpack-stats"; +import { defineConfig } from "vite"; +import pkg from "./package.json"; +// import eslintPlugin from "vite-plugin-eslint"; + +const deps = Object.keys(pkg.dependencies); + +// https://vitejs.dev/config/ +export default defineConfig((conf) => ({ + test: { + environment: "jsdom", + setupFiles: ["./vitestSetup.ts"], + }, + plugins: [react(), webpackStats()], + // used so that vitest resolves the core package from the sources instead of the built version + resolve: { + alias: + conf.command === "build" + ? ({ + "@shared": path.resolve(__dirname, "../../shared/"), + } as Record) + : ({ + // load live from sources with live reload working + "@blocknote/core": path.resolve(__dirname, "../core/src/"), + "@blocknote/mantine": path.resolve(__dirname, "../mantine/src/"), + "@blocknote/react": path.resolve(__dirname, "../react/src/"), + "@shared": path.resolve(__dirname, "../../shared/"), + } as Record), + }, + build: { + sourcemap: true, + lib: { + entry: path.resolve(__dirname, "src/index.ts"), + name: "blocknote-xl-ai", + fileName: "blocknote-xl-ai", + }, + rollupOptions: { + // make sure to externalize deps that shouldn't be bundled + // into your library + external: (source: string) => { + if (deps.includes(source)) { + return true; + } + return ( + source.startsWith("prosemirror-") || + source.startsWith("@shikijs/lang") || + source.startsWith("@shikijs/theme") + ); + }, + output: { + // Provide global variables to use in the UMD build + // for externalized deps + globals: { + react: "React", + "react-dom": "ReactDOM", + }, + interop: "compat", // https://rollupjs.org/migration/#changed-defaults + }, + }, + }, +})); diff --git a/packages/xl-ai/vitestSetup.ts b/packages/xl-ai/vitestSetup.ts new file mode 100644 index 0000000000..7644d24b66 --- /dev/null +++ b/packages/xl-ai/vitestSetup.ts @@ -0,0 +1,46 @@ +import { Agent, setGlobalDispatcher } from "undici"; +import { afterEach, beforeEach } from "vitest"; +// make sure our fetch request uses HTTP/2 +setGlobalDispatcher( + new Agent({ + allowH2: true, + }) +); + +// https.globalAgent.options.ca = fs.readFileSync( +// path.join(__dirname, "../xl-ai-server/localhost.pem") +// ); +// debugger; +beforeEach(() => { + (window as Window & { __TEST_OPTIONS?: any }).__TEST_OPTIONS = {}; +}); + +afterEach(() => { + delete (window as Window & { __TEST_OPTIONS?: any }).__TEST_OPTIONS; +}); + +// Mock ClipboardEvent +class ClipboardEventMock extends Event { + public clipboardData = { + getData: () => { + // + }, + setData: () => { + // + }, + }; +} +(global as any).ClipboardEvent = ClipboardEventMock; + +// Mock DragEvent +class DragEventMock extends Event { + public dataTransfer = { + getData: () => { + // + }, + setData: () => { + // + }, + }; +} +(global as any).DragEvent = DragEventMock; diff --git a/packages/xl-multi-column/package.json b/packages/xl-multi-column/package.json index 7d0c10f340..5548b100eb 100644 --- a/packages/xl-multi-column/package.json +++ b/packages/xl-multi-column/package.json @@ -57,7 +57,7 @@ "prosemirror-model": "^1.25.1", "prosemirror-state": "^1.4.3", "prosemirror-tables": "^1.3.7", - "prosemirror-transform": "^1.9.0", + "prosemirror-transform": "^1.10.4", "prosemirror-view": "^1.38.1", "react-icons": "^5.2.1" }, diff --git a/packages/xl-multi-column/src/pm-nodes/Column.ts b/packages/xl-multi-column/src/pm-nodes/Column.ts index 319d6f569f..0026e76047 100644 --- a/packages/xl-multi-column/src/pm-nodes/Column.ts +++ b/packages/xl-multi-column/src/pm-nodes/Column.ts @@ -9,6 +9,7 @@ export const Column = createStronglyTypedTiptapNode({ content: "blockContainer+", priority: 40, defining: true, + marks: "deletion insertion modification", addAttributes() { return { width: { diff --git a/packages/xl-multi-column/src/pm-nodes/ColumnList.ts b/packages/xl-multi-column/src/pm-nodes/ColumnList.ts index d760ae002e..7aba3475b1 100644 --- a/packages/xl-multi-column/src/pm-nodes/ColumnList.ts +++ b/packages/xl-multi-column/src/pm-nodes/ColumnList.ts @@ -7,7 +7,7 @@ export const ColumnList = createStronglyTypedTiptapNode({ content: "column column+", // min two columns priority: 40, // should be below blockContainer defining: true, - + marks: "deletion insertion modification", parseHTML() { return [ { diff --git a/packages/xl-multi-column/src/test/conversions/formatConversionTestUtil.ts b/packages/xl-multi-column/src/test/conversions/formatConversionTestUtil.ts index 8b6b16f851..8eea1129df 100644 --- a/packages/xl-multi-column/src/test/conversions/formatConversionTestUtil.ts +++ b/packages/xl-multi-column/src/test/conversions/formatConversionTestUtil.ts @@ -1,3 +1,5 @@ +// TODO: remove duplicate file + import { Block, BlockNoteSchema, diff --git a/packages/xl-multi-column/tsconfig.json b/packages/xl-multi-column/tsconfig.json index c445a9c77e..c74ac34642 100644 --- a/packages/xl-multi-column/tsconfig.json +++ b/packages/xl-multi-column/tsconfig.json @@ -4,7 +4,7 @@ "useDefineForClassFields": true, "module": "ESNext", "lib": ["ESNext", "DOM"], - "moduleResolution": "Node", + "moduleResolution": "bundler", "jsx": "react-jsx", "strict": true, "sourceMap": true, diff --git a/packages/xl-pdf-exporter/src/pdf/__snapshots__/example.jsx b/packages/xl-pdf-exporter/src/pdf/__snapshots__/example.jsx index 314a0cda69..6d231f7d07 100644 --- a/packages/xl-pdf-exporter/src/pdf/__snapshots__/example.jsx +++ b/packages/xl-pdf-exporter/src/pdf/__snapshots__/example.jsx @@ -429,77 +429,167 @@ rows: [ { cells: [ - [ - { - styles: {}, - text: 'Wide Cell', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell', - type: 'text' - } - ] + { + content: [ + { + styles: {}, + text: 'Wide Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + } ] }, { cells: [ - [ - { - styles: {}, - text: 'Wide Cell', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell', - type: 'text' - } - ] + { + content: [ + { + styles: {}, + text: 'Wide Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + } ] }, { cells: [ - [ - { - styles: {}, - text: 'Wide Cell', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell', - type: 'text' - } - ] + { + content: [ + { + styles: {}, + text: 'Wide Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + } ] } ], @@ -809,79 +899,169 @@ rows: [ { cells: [ - [ - { - styles: {}, - text: 'Table Cell 1', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell 2', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell 3', - type: 'text' - } - ] + { + content: [ + { + styles: {}, + text: 'Table Cell 1', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell 2', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell 3', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + } ] }, { cells: [ - [ - { - styles: {}, - text: 'Table Cell 4', - type: 'text' - } - ], - [ - { - styles: { - bold: true - }, - text: 'Table Cell Bold 5', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell 6', - type: 'text' - } - ] + { + content: [ + { + styles: {}, + text: 'Table Cell 4', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: { + bold: true + }, + text: 'Table Cell Bold 5', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell 6', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + } ] }, { cells: [ - [ - { - styles: {}, - text: 'Table Cell 7', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell 8', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell 9', - type: 'text' - } - ] + { + content: [ + { + styles: {}, + text: 'Table Cell 7', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell 8', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell 9', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + } ] } ], diff --git a/packages/xl-pdf-exporter/src/pdf/__snapshots__/exampleWithHeaderAndFooter.jsx b/packages/xl-pdf-exporter/src/pdf/__snapshots__/exampleWithHeaderAndFooter.jsx index 11a4be332b..c1c42623c5 100644 --- a/packages/xl-pdf-exporter/src/pdf/__snapshots__/exampleWithHeaderAndFooter.jsx +++ b/packages/xl-pdf-exporter/src/pdf/__snapshots__/exampleWithHeaderAndFooter.jsx @@ -437,77 +437,167 @@ rows: [ { cells: [ - [ - { - styles: {}, - text: 'Wide Cell', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell', - type: 'text' - } - ] + { + content: [ + { + styles: {}, + text: 'Wide Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + } ] }, { cells: [ - [ - { - styles: {}, - text: 'Wide Cell', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell', - type: 'text' - } - ] + { + content: [ + { + styles: {}, + text: 'Wide Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + } ] }, { cells: [ - [ - { - styles: {}, - text: 'Wide Cell', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell', - type: 'text' - } - ] + { + content: [ + { + styles: {}, + text: 'Wide Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + } ] } ], @@ -817,79 +907,169 @@ rows: [ { cells: [ - [ - { - styles: {}, - text: 'Table Cell 1', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell 2', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell 3', - type: 'text' - } - ] + { + content: [ + { + styles: {}, + text: 'Table Cell 1', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell 2', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell 3', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + } ] }, { cells: [ - [ - { - styles: {}, - text: 'Table Cell 4', - type: 'text' - } - ], - [ - { - styles: { - bold: true - }, - text: 'Table Cell Bold 5', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell 6', - type: 'text' - } - ] + { + content: [ + { + styles: {}, + text: 'Table Cell 4', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: { + bold: true + }, + text: 'Table Cell Bold 5', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell 6', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + } ] }, { cells: [ - [ - { - styles: {}, - text: 'Table Cell 7', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell 8', - type: 'text' - } - ], - [ - { - styles: {}, - text: 'Table Cell 9', - type: 'text' - } - ] + { + content: [ + { + styles: {}, + text: 'Table Cell 7', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell 8', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + }, + { + content: [ + { + styles: {}, + text: 'Table Cell 9', + type: 'text' + } + ], + props: { + backgroundColor: 'default', + colspan: 1, + rowspan: 1, + textAlignment: 'left', + textColor: 'default' + }, + type: 'tableCell' + } ] } ], diff --git a/playground/.env b/playground/.env new file mode 100644 index 0000000000..087c0f3af0 --- /dev/null +++ b/playground/.env @@ -0,0 +1,2 @@ +VITE_BLOCKNOTE_AI_SERVER_API_KEY= +VITE_BLOCKNOTE_AI_SERVER_BASE_URL= \ No newline at end of file diff --git a/playground/package.json b/playground/package.json index d42ee2abe5..d88c1bc7f2 100644 --- a/playground/package.json +++ b/playground/package.json @@ -10,6 +10,12 @@ "clean": "rimraf dist" }, "dependencies": { + "ai": "^4.3.15", + "@ai-sdk/openai": "^1.3.22", + "@ai-sdk/openai-compatible": "^0.2.14", + "@ai-sdk/groq": "^1.2.9", + "@ai-sdk/anthropic": "^1.2.11", + "@ai-sdk/mistral": "^1.2.8", "@aws-sdk/client-s3": "^3.609.0", "@aws-sdk/s3-request-presigner": "^3.609.0", "@blocknote/ariakit": "workspace:^", @@ -19,6 +25,7 @@ "@blocknote/react": "workspace:^", "@blocknote/server-util": "workspace:^", "@blocknote/shadcn": "workspace:^", + "@blocknote/xl-ai": "workspace:^", "@blocknote/xl-docx-exporter": "workspace:^", "@blocknote/xl-multi-column": "workspace:^", "@blocknote/xl-odt-exporter": "workspace:^", @@ -52,7 +59,8 @@ "react-icons": "^5.2.1", "react-router-dom": "^6.20.0", "y-partykit": "^0.0.25", - "yjs": "^13.6.15" + "yjs": "^13.6.15", + "zustand": "^5.0.3" }, "devDependencies": { "@types/react": "^18.0.25", diff --git a/playground/src/examples.gen.tsx b/playground/src/examples.gen.tsx index 23615a61ce..61d221427c 100644 --- a/playground/src/examples.gen.tsx +++ b/playground/src/examples.gen.tsx @@ -1381,6 +1381,96 @@ } ] }, + "ai": { + "pathFromRoot": "examples/09-ai", + "slug": "ai", + "projects": [ + { + "projectSlug": "minimal", + "fullSlug": "ai/minimal", + "pathFromRoot": "examples/09-ai/01-minimal", + "config": { + "playground": true, + "docs": true, + "author": "yousefed", + "tags": [ + "AI", + "llm" + ], + "dependencies": { + "@blocknote/xl-ai": "latest", + "@mantine/core": "^7.10.1", + "ai": "^4.3.15", + "@ai-sdk/groq": "^1.2.9", + "zustand": "^5.0.3" + } as any + }, + "title": "Rich Text editor AI integration", + "group": { + "pathFromRoot": "examples/09-ai", + "slug": "ai" + } + }, + { + "projectSlug": "playground", + "fullSlug": "ai/playground", + "pathFromRoot": "examples/09-ai/02-playground", + "config": { + "playground": true, + "docs": true, + "author": "yousefed", + "tags": [ + "AI", + "llm" + ], + "dependencies": { + "@blocknote/xl-ai": "latest", + "@mantine/core": "^7.10.1", + "ai": "^4.3.15", + "@ai-sdk/openai": "^1.3.22", + "@ai-sdk/openai-compatible": "^0.2.14", + "@ai-sdk/groq": "^1.2.9", + "@ai-sdk/anthropic": "^1.2.11", + "@ai-sdk/mistral": "^1.2.8", + "zustand": "^5.0.3" + } as any + }, + "title": "AI Playground", + "group": { + "pathFromRoot": "examples/09-ai", + "slug": "ai" + } + }, + { + "projectSlug": "ai-menu-items", + "fullSlug": "ai/ai-menu-items", + "pathFromRoot": "examples/09-ai/03-ai-menu-items", + "config": { + "playground": true, + "docs": true, + "author": "matthewlipski", + "tags": [ + "AI", + "llm" + ], + "dependencies": { + "@blocknote/xl-ai": "latest", + "@mantine/core": "^7.10.1", + "ai": "^4.1.0", + "@ai-sdk/openai": "^1.1.0", + "@ai-sdk/groq": "^1.1.0", + "react-icons": "^5.2.1", + "zustand": "^5.0.3" + } as any + }, + "title": "Adding AI Menu Items", + "group": { + "pathFromRoot": "examples/09-ai", + "slug": "ai" + } + } + ] + }, "vanilla-js": { "pathFromRoot": "examples/vanilla-js", "slug": "vanilla-js", diff --git a/playground/tsconfig.json b/playground/tsconfig.json index 8561d1dc0a..6de9cc3fe9 100644 --- a/playground/tsconfig.json +++ b/playground/tsconfig.json @@ -21,6 +21,7 @@ "include": ["src", "../examples"], "references": [ { "path": "./tsconfig.node.json" }, + { "path": "../packages/xl-ai/" }, { "path": "../packages/core/" }, { "path": "../packages/react/" }, { "path": "../packages/ariakit/" }, diff --git a/playground/vite.config.ts b/playground/vite.config.ts index 3e9466f0ce..d3415d921c 100644 --- a/playground/vite.config.ts +++ b/playground/vite.config.ts @@ -57,6 +57,10 @@ export default defineConfig( __dirname, "../packages/shadcn/src/", ), + "@blocknote/xl-ai": path.resolve( + __dirname, + "../packages/xl-ai/src/", + ), "@blocknote/xl-docx-exporter": path.resolve( __dirname, "../packages/xl-docx-exporter/src/", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index efb1e86377..6f573a6481 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -49,7 +49,7 @@ importers: version: 5.8.2 vitest: specifier: ^2.0.3 - version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0) + version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0) wait-on: specifier: 8.0.3 version: 8.0.3 @@ -2728,6 +2728,180 @@ importers: specifier: ^5.3.4 version: 5.4.15(@types/node@22.14.1)(terser@5.39.0) + examples/09-ai/01-minimal: + dependencies: + '@ai-sdk/groq': + specifier: ^1.2.9 + version: 1.2.9(zod@3.24.2) + '@blocknote/ariakit': + specifier: latest + version: link:../../../packages/ariakit + '@blocknote/core': + specifier: latest + version: link:../../../packages/core + '@blocknote/mantine': + specifier: latest + version: link:../../../packages/mantine + '@blocknote/react': + specifier: latest + version: link:../../../packages/react + '@blocknote/shadcn': + specifier: latest + version: link:../../../packages/shadcn + '@blocknote/xl-ai': + specifier: latest + version: link:../../../packages/xl-ai + '@mantine/core': + specifier: ^7.10.1 + version: 7.17.3(@mantine/hooks@7.17.3(react@18.3.1))(@types/react@18.3.20)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + ai: + specifier: ^4.3.15 + version: 4.3.15(react@18.3.1)(zod@3.24.2) + react: + specifier: ^18.3.1 + version: 18.3.1 + react-dom: + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) + zustand: + specifier: ^5.0.3 + version: 5.0.3(@types/react@18.3.20)(immer@10.1.1)(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) + devDependencies: + '@types/react': + specifier: ^18.0.25 + version: 18.3.20 + '@types/react-dom': + specifier: ^18.0.9 + version: 18.3.5(@types/react@18.3.20) + '@vitejs/plugin-react': + specifier: ^4.3.1 + version: 4.3.4(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) + vite: + specifier: ^5.3.4 + version: 5.4.15(@types/node@22.14.1)(terser@5.39.0) + + examples/09-ai/02-playground: + dependencies: + '@ai-sdk/anthropic': + specifier: ^1.2.11 + version: 1.2.11(zod@3.24.2) + '@ai-sdk/groq': + specifier: ^1.2.9 + version: 1.2.9(zod@3.24.2) + '@ai-sdk/mistral': + specifier: ^1.2.8 + version: 1.2.8(zod@3.24.2) + '@ai-sdk/openai': + specifier: ^1.3.22 + version: 1.3.22(zod@3.24.2) + '@ai-sdk/openai-compatible': + specifier: ^0.2.14 + version: 0.2.14(zod@3.24.2) + '@blocknote/ariakit': + specifier: latest + version: link:../../../packages/ariakit + '@blocknote/core': + specifier: latest + version: link:../../../packages/core + '@blocknote/mantine': + specifier: latest + version: link:../../../packages/mantine + '@blocknote/react': + specifier: latest + version: link:../../../packages/react + '@blocknote/shadcn': + specifier: latest + version: link:../../../packages/shadcn + '@blocknote/xl-ai': + specifier: latest + version: link:../../../packages/xl-ai + '@mantine/core': + specifier: ^7.10.1 + version: 7.17.3(@mantine/hooks@7.17.3(react@18.3.1))(@types/react@18.3.20)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + ai: + specifier: ^4.3.15 + version: 4.3.15(react@18.3.1)(zod@3.24.2) + react: + specifier: ^18.3.1 + version: 18.3.1 + react-dom: + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) + zustand: + specifier: ^5.0.3 + version: 5.0.3(@types/react@18.3.20)(immer@10.1.1)(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) + devDependencies: + '@types/react': + specifier: ^18.0.25 + version: 18.3.20 + '@types/react-dom': + specifier: ^18.0.9 + version: 18.3.5(@types/react@18.3.20) + '@vitejs/plugin-react': + specifier: ^4.3.1 + version: 4.3.4(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) + vite: + specifier: ^5.3.4 + version: 5.4.15(@types/node@22.14.1)(terser@5.39.0) + + examples/09-ai/03-custom-ai-menu-items: + dependencies: + '@ai-sdk/groq': + specifier: ^1.1.0 + version: 1.2.9(zod@3.24.2) + '@ai-sdk/openai': + specifier: ^1.1.0 + version: 1.3.22(zod@3.24.2) + '@blocknote/ariakit': + specifier: latest + version: link:../../../packages/ariakit + '@blocknote/core': + specifier: latest + version: link:../../../packages/core + '@blocknote/mantine': + specifier: latest + version: link:../../../packages/mantine + '@blocknote/react': + specifier: latest + version: link:../../../packages/react + '@blocknote/shadcn': + specifier: latest + version: link:../../../packages/shadcn + '@blocknote/xl-ai': + specifier: latest + version: link:../../../packages/xl-ai + '@mantine/core': + specifier: ^7.10.1 + version: 7.17.3(@mantine/hooks@7.17.3(react@18.3.1))(@types/react@18.3.20)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + ai: + specifier: ^4.1.0 + version: 4.3.15(react@18.3.1)(zod@3.24.2) + react: + specifier: ^18.3.1 + version: 18.3.1 + react-dom: + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) + react-icons: + specifier: ^5.2.1 + version: 5.5.0(react@18.3.1) + zustand: + specifier: ^5.0.3 + version: 5.0.3(@types/react@18.3.20)(immer@10.1.1)(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) + devDependencies: + '@types/react': + specifier: ^18.0.25 + version: 18.3.20 + '@types/react-dom': + specifier: ^18.0.9 + version: 18.3.5(@types/react@18.3.20) + '@vitejs/plugin-react': + specifier: ^4.3.1 + version: 4.3.4(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) + vite: + specifier: ^5.3.4 + version: 5.4.15(@types/node@22.14.1)(terser@5.39.0) + examples/vanilla-js/react-vanilla-custom-blocks: dependencies: '@blocknote/ariakit': @@ -2929,7 +3103,7 @@ importers: version: 1.8.1(eslint@8.57.1)(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) vitest: specifier: ^2.0.3 - version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0) + version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0) packages/core: dependencies: @@ -2978,9 +3152,6 @@ importers: '@tiptap/extension-table-header': specifier: ^2.11.5 version: 2.11.5(@tiptap/core@2.11.5(@tiptap/pm@2.11.5)) - '@tiptap/extension-table-row': - specifier: ^2.11.5 - version: 2.11.5(@tiptap/core@2.11.5(@tiptap/pm@2.11.5)) '@tiptap/extension-text': specifier: ^2.11.5 version: 2.11.5(@tiptap/core@2.11.5(@tiptap/pm@2.11.5)) @@ -3001,7 +3172,7 @@ importers: version: 1.8.1 prosemirror-highlight: specifier: ^0.13.0 - version: 0.13.0(@shikijs/types@3.2.1)(@types/hast@3.0.4)(prosemirror-model@1.25.1)(prosemirror-state@1.4.3)(prosemirror-transform@1.10.3)(prosemirror-view@1.38.1) + version: 0.13.0(@shikijs/types@3.2.1)(@types/hast@3.0.4)(prosemirror-model@1.25.1)(prosemirror-state@1.4.3)(prosemirror-transform@1.10.4)(prosemirror-view@1.38.1) prosemirror-model: specifier: ^1.25.1 version: 1.25.1 @@ -3012,8 +3183,8 @@ importers: specifier: ^1.6.4 version: 1.6.4 prosemirror-transform: - specifier: ^1.10.2 - version: 1.10.3 + specifier: ^1.10.4 + version: 1.10.4 prosemirror-view: specifier: ^1.38.1 version: 1.38.1 @@ -3089,7 +3260,7 @@ importers: version: 1.8.1(eslint@8.57.1)(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) vitest: specifier: ^2.0.3 - version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0) + version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0) packages/dev-scripts: dependencies: @@ -3263,7 +3434,7 @@ importers: version: 0.8.0(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) vitest: specifier: ^2.0.3 - version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0) + version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0) packages/server-util: dependencies: @@ -3324,7 +3495,7 @@ importers: version: 1.8.1(eslint@8.57.1)(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) vitest: specifier: ^2.0.3 - version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0) + version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0) packages/shadcn: dependencies: @@ -3438,6 +3609,194 @@ importers: specifier: ^0.8.0 version: 0.8.0(vite@5.4.15(@types/node@20.17.28)(terser@5.39.0)) + packages/xl-ai: + dependencies: + '@ai-sdk/groq': + specifier: ^1.2.9 + version: 1.2.9(zod@3.24.2) + '@ai-sdk/mistral': + specifier: ^1.2.8 + version: 1.2.8(zod@3.24.2) + '@ai-sdk/openai': + specifier: ^1.3.22 + version: 1.3.22(zod@3.24.2) + '@ai-sdk/openai-compatible': + specifier: ^0.2.14 + version: 0.2.14(zod@3.24.2) + '@blocknote/core': + specifier: workspace:* + version: link:../core + '@blocknote/mantine': + specifier: workspace:* + version: link:../mantine + '@blocknote/prosemirror-suggest-changes': + specifier: ^0.1.3 + version: 0.1.3(prosemirror-model@1.25.1)(prosemirror-state@1.4.3)(prosemirror-transform@1.10.4)(prosemirror-view@1.38.1) + '@blocknote/react': + specifier: workspace:* + version: link:../react + '@floating-ui/react': + specifier: ^0.26.4 + version: 0.26.28(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@tiptap/core': + specifier: ^2.7.1 + version: 2.11.5(@tiptap/pm@2.11.5) + ai: + specifier: ^4.3.15 + version: 4.3.15(react@18.3.1)(zod@3.24.2) + lodash.isequal: + specifier: ^4.5.0 + version: 4.5.0 + prosemirror-changeset: + specifier: ^2.3.0 + version: 2.3.0 + prosemirror-model: + specifier: ^1.24.1 + version: 1.25.1 + prosemirror-state: + specifier: ^1.4.3 + version: 1.4.3 + prosemirror-tables: + specifier: ^1.6.4 + version: 1.6.4 + prosemirror-transform: + specifier: ^1.10.4 + version: 1.10.4 + prosemirror-view: + specifier: ^1.33.7 + version: 1.38.1 + react: + specifier: ^18 + version: 18.3.1 + react-dom: + specifier: ^18 + version: 18.3.1(react@18.3.1) + react-icons: + specifier: ^5.2.1 + version: 5.5.0(react@18.3.1) + remark-parse: + specifier: ^10.0.1 + version: 10.0.2 + remark-stringify: + specifier: ^10.0.2 + version: 10.0.3 + unified: + specifier: ^10.1.2 + version: 10.1.2 + y-prosemirror: + specifier: ^1.3.4 + version: 1.3.4(prosemirror-model@1.25.1)(prosemirror-state@1.4.3)(prosemirror-view@1.38.1)(y-protocols@1.0.6(yjs@13.6.24))(yjs@13.6.24) + zustand: + specifier: ^5.0.3 + version: 5.0.3(@types/react@18.3.20)(immer@10.1.1)(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) + devDependencies: + '@mswjs/interceptors': + specifier: ^0.37.5 + version: 0.37.6 + '@types/diff': + specifier: ^6.0.0 + version: 6.0.0 + '@types/json-diff': + specifier: ^1.0.3 + version: 1.0.3 + '@types/json-schema': + specifier: ^7.0.15 + version: 7.0.15 + '@types/lodash.isequal': + specifier: ^4.5.8 + version: 4.5.8 + '@types/react': + specifier: ^18.0.25 + version: 18.3.20 + '@types/react-dom': + specifier: ^18.0.9 + version: 18.3.5(@types/react@18.3.20) + '@vitejs/plugin-react': + specifier: ^4.3.1 + version: 4.3.4(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) + '@vitest/runner': + specifier: ^2.0.3 + version: 2.1.9 + eslint: + specifier: ^8.10.0 + version: 8.57.1 + glob: + specifier: ^10.3.10 + version: 10.4.5 + headers-polyfill: + specifier: ^4.0.3 + version: 4.0.3 + msw: + specifier: ^2.7.3 + version: 2.7.3(@types/node@22.14.1)(typescript@5.8.2) + msw-snapshot: + specifier: ^5.2.0 + version: 5.2.0(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2)) + rimraf: + specifier: ^5.0.5 + version: 5.0.10 + rollup-plugin-webpack-stats: + specifier: ^0.2.2 + version: 0.2.6(rollup@4.37.0) + typescript: + specifier: ^5.3.3 + version: 5.8.2 + undici: + specifier: ^6 + version: 6.21.2 + vite: + specifier: ^5.3.4 + version: 5.4.15(@types/node@22.14.1)(terser@5.39.0) + vite-plugin-eslint: + specifier: ^1.8.1 + version: 1.8.1(eslint@8.57.1)(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) + vite-plugin-externalize-deps: + specifier: ^0.8.0 + version: 0.8.0(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) + vitest: + specifier: ^2.0.3 + version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0) + + packages/xl-ai-server: + dependencies: + '@hono/node-server': + specifier: ^1.13.7 + version: 1.14.0(hono@4.7.5) + hono: + specifier: ^4.6.12 + version: 4.7.5 + devDependencies: + eslint: + specifier: ^8.10.0 + version: 8.57.1 + rimraf: + specifier: ^5.0.5 + version: 5.0.10 + rollup-plugin-webpack-stats: + specifier: ^0.2.2 + version: 0.2.6(rollup@4.37.0) + typescript: + specifier: ^5.3.3 + version: 5.8.2 + undici: + specifier: ^6 + version: 6.21.2 + vite: + specifier: ^5.3.4 + version: 5.4.15(@types/node@22.14.1)(terser@5.39.0) + vite-node: + specifier: ^2.1.6 + version: 2.1.9(@types/node@22.14.1)(terser@5.39.0) + vite-plugin-eslint: + specifier: ^1.8.1 + version: 1.8.1(eslint@8.57.1)(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) + vite-plugin-externalize-deps: + specifier: ^0.8.0 + version: 0.8.0(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) + vitest: + specifier: ^2.0.3 + version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0) + packages/xl-docx-exporter: dependencies: '@blocknote/core': @@ -3485,7 +3844,7 @@ importers: version: 1.8.1(eslint@8.57.1)(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) vitest: specifier: ^2.0.3 - version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0) + version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0) xml-formatter: specifier: ^3.6.3 version: 3.6.5 @@ -3511,8 +3870,8 @@ importers: specifier: ^1.3.7 version: 1.6.4 prosemirror-transform: - specifier: ^1.9.0 - version: 1.10.3 + specifier: ^1.10.4 + version: 1.10.4 prosemirror-view: specifier: ^1.38.1 version: 1.38.1 @@ -3561,7 +3920,7 @@ importers: version: 1.8.1(eslint@8.57.1)(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) vitest: specifier: ^2.0.3 - version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@21.1.2(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0) + version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@21.1.2(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0) packages/xl-odt-exporter: dependencies: @@ -3607,7 +3966,7 @@ importers: version: 1.8.1(eslint@8.57.1)(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) vitest: specifier: ^2.0.3 - version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0) + version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0) xml-formatter: specifier: ^3.6.3 version: 3.6.5 @@ -3677,10 +4036,25 @@ importers: version: 1.8.1(eslint@8.57.1)(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) vitest: specifier: ^2.0.3 - version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0) + version: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0) playground: dependencies: + '@ai-sdk/anthropic': + specifier: ^1.2.11 + version: 1.2.11(zod@3.24.2) + '@ai-sdk/groq': + specifier: ^1.2.9 + version: 1.2.9(zod@3.24.2) + '@ai-sdk/mistral': + specifier: ^1.2.8 + version: 1.2.8(zod@3.24.2) + '@ai-sdk/openai': + specifier: ^1.3.22 + version: 1.3.22(zod@3.24.2) + '@ai-sdk/openai-compatible': + specifier: ^0.2.14 + version: 0.2.14(zod@3.24.2) '@aws-sdk/client-s3': specifier: ^3.609.0 version: 3.775.0 @@ -3708,6 +4082,9 @@ importers: '@blocknote/shadcn': specifier: workspace:^ version: link:../packages/shadcn + '@blocknote/xl-ai': + specifier: workspace:^ + version: link:../packages/xl-ai '@blocknote/xl-docx-exporter': specifier: workspace:^ version: link:../packages/xl-docx-exporter @@ -3786,6 +4163,9 @@ importers: '@y-sweet/react': specifier: ^0.6.3 version: 0.6.4(react@18.3.1)(yjs@13.6.24) + ai: + specifier: ^4.3.15 + version: 4.3.15(react@18.3.1)(zod@3.24.2) autoprefixer: specifier: 10.4.21 version: 10.4.21(postcss@8.5.3) @@ -3810,6 +4190,9 @@ importers: yjs: specifier: ^13.6.15 version: 13.6.24 + zustand: + specifier: ^5.0.3 + version: 5.0.3(@types/react@18.3.20)(immer@10.1.1)(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) devDependencies: '@types/react': specifier: ^18.0.25 @@ -3913,10 +4296,66 @@ importers: version: 1.8.1(eslint@8.57.1)(vite@5.4.15(@types/node@20.17.28)(terser@5.39.0)) vitest: specifier: ^2.0.3 - version: 2.1.9(@types/node@20.17.28)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0) + version: 2.1.9(@types/node@20.17.28)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@20.17.28)(typescript@5.8.2))(terser@5.39.0) packages: + '@ai-sdk/anthropic@1.2.11': + resolution: {integrity: sha512-lZLcEMh8MXY4NVSrN/7DyI2rnid8k7cn/30nMmd3bwJrnIsOuIuuFvY8f0nj+pFcTi6AYK7ujLdqW5dQVz1YQw==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.0.0 + + '@ai-sdk/groq@1.2.9': + resolution: {integrity: sha512-7MoDaxm8yWtiRbD1LipYZG0kBl+Xe0sv/EeyxnHnGPZappXdlgtdOgTZVjjXkT3nWP30jjZi9A45zoVrBMb3Xg==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.0.0 + + '@ai-sdk/mistral@1.2.8': + resolution: {integrity: sha512-lv857D9UJqCVxiq2Fcu7mSPTypEHBUqLl1K+lCaP6X/7QAkcaxI36QDONG+tOhGHJOXTsS114u8lrUTaEiGXbg==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.0.0 + + '@ai-sdk/openai-compatible@0.2.14': + resolution: {integrity: sha512-icjObfMCHKSIbywijaoLdZ1nSnuRnWgMEMLgwoxPJgxsUHMx0aVORnsLUid4SPtdhHI3X2masrt6iaEQLvOSFw==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.0.0 + + '@ai-sdk/openai@1.3.22': + resolution: {integrity: sha512-QwA+2EkG0QyjVR+7h6FE7iOu2ivNqAVMm9UJZkVxxTk5OIq5fFJDTEI/zICEMuHImTTXR2JjsL6EirJ28Jc4cw==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.0.0 + + '@ai-sdk/provider-utils@2.2.8': + resolution: {integrity: sha512-fqhG+4sCVv8x7nFzYnFo19ryhAa3w096Kmc3hWxMQfW/TubPOmt3A6tYZhl4mUfQWWQMsuSkLrtjlWuXBVSGQA==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.23.8 + + '@ai-sdk/provider@1.1.3': + resolution: {integrity: sha512-qZMxYJ0qqX/RfnuIaab+zp8UAeJn/ygXXAffR5I4N0n1IrvA6qBsjc8hXLmBiMV2zoXlifkacF7sEFnYnjBcqg==} + engines: {node: '>=18'} + + '@ai-sdk/react@1.2.12': + resolution: {integrity: sha512-jK1IZZ22evPZoQW3vlkZ7wvjYGYF+tRBKXtrcolduIkQ/m/sOAVcVeVDUDvh1T91xCnWCdUGCPZg2avZ90mv3g==} + engines: {node: '>=18'} + peerDependencies: + react: ^18 || ^19 || ^19.0.0-rc + zod: ^3.23.8 + peerDependenciesMeta: + zod: + optional: true + + '@ai-sdk/ui-utils@1.2.11': + resolution: {integrity: sha512-3zcwCc8ezzFlwp3ZD15wAPjf2Au4s3vAbKsXQVyhxODHcmu0iyPO2Eua6D/vicq/AUm/BAo60r97O6HU+EI0+w==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.23.8 + '@alloc/quick-lru@5.2.0': resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} @@ -4783,9 +5222,26 @@ packages: '@better-fetch/fetch@1.1.18': resolution: {integrity: sha512-rEFOE1MYIsBmoMJtQbl32PGHHXuG2hDxvEd7rUHE0vCBoFQVSDqaVs9hkZEtHCxRoY+CljXKFCOuJ8uxqw1LcA==} + '@blocknote/prosemirror-suggest-changes@0.1.3': + resolution: {integrity: sha512-g/RxkStEg67bGiujK092aabD6tA/O4jI9jwKAnasP+t00khgyBBIXIvp7K7QT+gjVB6kP+ez27669iiJy8MZ5w==} + peerDependencies: + prosemirror-model: ^1.0.0 + prosemirror-state: ^1.0.0 + prosemirror-transform: ^1.0.0 + prosemirror-view: ^1.0.0 + '@braintree/sanitize-url@6.0.4': resolution: {integrity: sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==} + '@bundled-es-modules/cookie@2.0.1': + resolution: {integrity: sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw==} + + '@bundled-es-modules/statuses@1.0.1': + resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==} + + '@bundled-es-modules/tough-cookie@0.1.6': + resolution: {integrity: sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==} + '@cloudflare/workerd-darwin-64@1.20240129.0': resolution: {integrity: sha512-DfVVB5IsQLVcWPJwV019vY3nEtU88c2Qu2ST5SQxqcGivZ52imagLRK0RHCIP8PK4piSiq90qUC6ybppUsw8eg==} engines: {node: '>=16'} @@ -5582,6 +6038,12 @@ packages: y-protocols: ^1.0.6 yjs: ^13.6.8 + '@hono/node-server@1.14.0': + resolution: {integrity: sha512-YUCxJwgHRKSqjrdTk9e4VMGKN27MK5r4+MGPyZTgKH+IYbK+KtYbHeOcPGJ91KGGD6RIQiz2dAHxvjauNhOS8g==} + engines: {node: '>=18.14.1'} + peerDependencies: + hono: ^4 + '@hookform/resolvers@3.10.0': resolution: {integrity: sha512-79Dv+3mDF7i+2ajj7SkypSKHhl1cbln1OGavqrsF7p6mbUv11xpqpacPsGDCTRvCSjEEIez2ef1NveSVL3b0Ag==} peerDependencies: @@ -5815,6 +6277,37 @@ packages: cpu: [x64] os: [win32] + '@inquirer/confirm@5.1.9': + resolution: {integrity: sha512-NgQCnHqFTjF7Ys2fsqK2WtnA8X1kHyInyG+nMIuHowVTIgIuS10T4AznI/PvbqSpJqjCUqNBlKGh1v3bwLFL4w==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/core@10.1.10': + resolution: {integrity: sha512-roDaKeY1PYY0aCqhRmXihrHjoSW2A00pV3Ke5fTpMCkzcGF64R8e0lw3dK+eLEHwS4vB5RnW1wuQmvzoRul8Mw==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/figures@1.0.11': + resolution: {integrity: sha512-eOg92lvrn/aRUqbxRyvpEWnrvRuTYRifixHkYVpJiygTgVSBIHDqLh0SrMQXkafvULg3ck11V7xvR+zcgvpHFw==} + engines: {node: '>=18'} + + '@inquirer/type@3.0.6': + resolution: {integrity: sha512-/mKVCtVpyBu3IDarv0G+59KC4stsD5mDsGpYh+GKs1NZT88Jh52+cuoA1AtLk2Q0r/quNl+1cSUyLRHBFeD0XA==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -5934,6 +6427,10 @@ packages: peerDependencies: react: '>=16' + '@mswjs/interceptors@0.37.6': + resolution: {integrity: sha512-wK+5pLK5XFmgtH3aQ2YVvA3HohS3xqV/OxuVOdNx9Wpnz7VE/fnC+e1A7ln6LFYeck7gOJ/dsZV6OLplOtAJ2w==} + engines: {node: '>=18'} + '@mui/core-downloads-tracker@5.17.1': resolution: {integrity: sha512-OcZj+cs6EfUD39IoPBOgN61zf1XFVY+imsGoBDwXeSq2UHJZE3N59zzBOVjclck91Ne3e9gudONOeILvHCIhUA==} @@ -6326,6 +6823,15 @@ packages: '@nx/workspace@20.6.4': resolution: {integrity: sha512-HZK0XTJ1flx9NpAFW8ZVeMRrsAEOc4Bj5ZtBR1aVUSC/IzAGQH4dkVZMXX1oG3vBzhuz+4Ery2mfst1YsJNuxQ==} + '@open-draft/deferred-promise@2.2.0': + resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==} + + '@open-draft/logger@0.3.0': + resolution: {integrity: sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==} + + '@open-draft/until@2.1.0': + resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} + '@opentelemetry/api-logs@0.57.2': resolution: {integrity: sha512-uIX52NnTM0iBh84MShlpouI7UKqkZ7MrUszTmaypHBu4r7NofznSnQRfJ+uUeDtQDj6w8eFGg5KBLDAwAPz1+A==} engines: {node: '>=14'} @@ -7799,11 +8305,6 @@ packages: peerDependencies: '@tiptap/core': ^2.7.0 - '@tiptap/extension-table-row@2.11.5': - resolution: {integrity: sha512-+/VWhCuW24BcM5aaIc/f0bC6ZR1Q5gnuqw13MIo7gyPx7iIY6BXK8roGiZSs8wYAN4uBEf3EKFm0bSZwQuAeyg==} - peerDependencies: - '@tiptap/core': ^2.7.0 - '@tiptap/extension-text@2.11.5': resolution: {integrity: sha512-Gq1WwyhFpCbEDrLPIHt5A8aLSlf8bfz4jm417c8F/JyU0J5dtYdmx0RAxjnLw1i7ZHE7LRyqqAoS0sl7JHDNSQ==} peerDependencies: @@ -7865,6 +8366,9 @@ packages: '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + '@types/cookie@0.6.0': + resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} + '@types/cors@2.8.17': resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} @@ -7880,6 +8384,12 @@ packages: '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/diff-match-patch@1.0.36': + resolution: {integrity: sha512-xFdR6tkm0MWvBfO8xXCSsinYxHcqkQUlcHeSpMC2ukzOb6lwQAfDmW+Qt0AvlGd8HpsS28qKsB+oPeJn9I39jg==} + + '@types/diff@6.0.0': + resolution: {integrity: sha512-dhVCYGv3ZSbzmQaBSagrv1WJ6rXCdkyTcDyoNu1MD8JohI7pR7k8wdZEm+mvdxRKXyHVwckFzWU1vJc+Z29MlA==} + '@types/emoji-mart@3.0.14': resolution: {integrity: sha512-/vMkVnet466bK37ugf2jry9ldCZklFPXYMB2m+qNo3vkP2I7L0cvtNFPKAjfcHgPg9Z8pbYqVqZn7AgsC0qf+g==} @@ -7928,6 +8438,9 @@ packages: '@types/jsdom@21.1.7': resolution: {integrity: sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA==} + '@types/json-diff@1.0.3': + resolution: {integrity: sha512-Qvxm8fpRMv/1zZR3sQWImeRK2mBYJji20xF51Fq9Gt//Ed18u0x6/FNLogLS1xhfUWTEmDyqveJqn95ltB6Kvw==} + '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -7946,6 +8459,9 @@ packages: '@types/lodash.groupby@4.6.9': resolution: {integrity: sha512-z2xtCX2ko7GrqORnnYea4+ksT7jZNAvaOcLd6mP9M7J09RHvJs06W8BGdQQAX8ARef09VQLdeRilSOcfHlDQJQ==} + '@types/lodash.isequal@4.5.8': + resolution: {integrity: sha512-uput6pg4E/tj2LGxCZo9+y27JNyB2OZuuI/T5F+ylVDYuqICLG2/ktjxx0v6GvVntAf8TvEzeQLcV0ffRirXuA==} + '@types/lodash.merge@4.6.9': resolution: {integrity: sha512-23sHDPmzd59kUgWyKGiOMO2Qb9YtqRO/x4IhkgNUiPQ1+5MUVqi6bCZeq9nBJ17msjIMbEIO5u+XW4Kz6aGUhQ==} @@ -8019,9 +8535,6 @@ packages: '@types/react@18.3.20': resolution: {integrity: sha512-IPaCZN7PShZK/3t6Q87pfTkRm6oLTd4vztyoj+cbHUF1g3FfVb2tFIL79uCRKEfv16AhqDMBywP2VW3KIZUvcg==} - '@types/react@19.1.2': - resolution: {integrity: sha512-oxLPMytKchWGbnQM9O7D67uPa9paTNxO7jVoNMXgkkErULBPhPARCfkKL9ytcIJJRGjbsVwW4ugJzyFFvm/Tiw==} - '@types/retry@0.12.2': resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==} @@ -8034,6 +8547,9 @@ packages: '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} + '@types/statuses@2.0.5': + resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==} + '@types/tedious@4.0.14': resolution: {integrity: sha512-KHPsfX/FoVbUGbyYvk1q9MMQHLPeRZhRJZdO45Q4YjvFkv4hMNghCWTvy7rdKessBsmtz4euWCWAB6/tVpI1Iw==} @@ -8497,6 +9013,16 @@ packages: resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} engines: {node: '>= 14'} + ai@4.3.15: + resolution: {integrity: sha512-TYKRzbWg6mx/pmTadlAEIhuQtzfHUV0BbLY72+zkovXwq/9xhcH24IlQmkyBpElK6/4ArS0dHdOOtR1jOPVwtg==} + engines: {node: '>=18'} + peerDependencies: + react: ^18 || ^19 || ^19.0.0-rc + zod: ^3.23.8 + peerDependenciesMeta: + react: + optional: true + ajv-formats@2.1.1: resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} peerDependencies: @@ -8531,6 +9057,10 @@ packages: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -8891,6 +9421,10 @@ packages: resolution: {integrity: sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + chalk@5.4.1: + resolution: {integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + character-entities-html4@2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} @@ -8955,6 +9489,10 @@ packages: resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} engines: {node: '>=6'} + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} + client-only@0.0.1: resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} @@ -9457,6 +9995,9 @@ packages: didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + diff-match-patch@1.0.5: + resolution: {integrity: sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==} + diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -9611,9 +10152,6 @@ packages: resolution: {integrity: sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==} engines: {node: '>= 0.4'} - es-module-lexer@1.6.0: - resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==} - es-module-lexer@1.7.0: resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} @@ -10217,6 +10755,10 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + graphql@16.10.0: + resolution: {integrity: sha512-AjqGKbDGUFRKIRCP9tCKiIGHyriz2oHEbPIbEtcSLSs4YjReZOIPQQWek4+6hjw62H9QShXHyaGivGiYVLeYFQ==} + engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} + gray-matter@4.0.3: resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} engines: {node: '>=6.0'} @@ -10329,6 +10871,9 @@ packages: hastscript@9.0.1: resolution: {integrity: sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==} + headers-polyfill@4.0.3: + resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} + hex-rgb@4.3.0: resolution: {integrity: sha512-Ox1pJVrDCyGHMG9CFg1tmrRUMRPRsAWYc/PinY0XzJU4K7y7vjNoLKIQ7BR5UJMCxNN8EM1MNDmHWA/B3aZUuw==} engines: {node: '>=6'} @@ -10336,6 +10881,10 @@ packages: hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} + hono@4.7.5: + resolution: {integrity: sha512-fDOK5W2C1vZACsgLONigdZTRZxuBqFtcKh7bUQ5cVSbwI2RWjloJDcgFOVzbQrlI6pCmhlTsVYZ7zpLj4m4qMQ==} + engines: {node: '>=16.9.0'} + hosted-git-info@7.0.2: resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==} engines: {node: ^16.14.0 || >=18.0.0} @@ -10576,6 +11125,9 @@ packages: resolution: {integrity: sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==} engines: {node: '>=16'} + is-node-process@1.2.0: + resolution: {integrity: sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==} + is-number-object@1.1.1: resolution: {integrity: sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==} engines: {node: '>= 0.4'} @@ -10818,6 +11370,9 @@ packages: json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + json-schema@0.4.0: + resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} + json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} @@ -10836,6 +11391,11 @@ packages: jsonc-parser@3.3.1: resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + jsondiffpatch@0.6.0: + resolution: {integrity: sha512-3QItJOXp2AP1uv7waBkao5nCvhEv+QmJAd38Ybq7wNI74Q+BBmnLn4EDKz6yI9xGAIQoUF87qHt+kc1IVxB4zQ==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + jsx-ast-utils@3.3.5: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} @@ -10932,6 +11492,10 @@ packages: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. + lodash.isequal@4.5.0: + resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} + deprecated: This package is deprecated. Use require('node:util').isDeepStrictEqual instead. + lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -11424,10 +11988,29 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + msw-snapshot@5.2.0: + resolution: {integrity: sha512-vcgRtVkE8ZRoDZ5IDpaJ4Mdwx/SdwnJXMIw9gm3LYSQTQxJBUwda+txMe6Sn20cYDF3a+VpmWhhnQyZXGvAs5A==} + peerDependencies: + msw: ^2.0.0 + + msw@2.7.3: + resolution: {integrity: sha512-+mycXv8l2fEAjFZ5sjrtjJDmm2ceKGjrNbBr1durRg6VkU9fNUE/gsmQ51hWbHqs+l35W1iM+ZsmOD9Fd6lspw==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + typescript: '>= 4.8.x' + peerDependenciesMeta: + typescript: + optional: true + mustache@4.2.0: resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==} hasBin: true + mute-stream@2.0.0: + resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} + engines: {node: ^18.17.0 || >=20.5.0} + mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} @@ -11718,6 +12301,9 @@ packages: orderedmap@2.1.1: resolution: {integrity: sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==} + outvariant@1.4.3: + resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} + own-keys@1.0.1: resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} engines: {node: '>= 0.4'} @@ -11824,6 +12410,9 @@ packages: path-to-regexp@3.3.0: resolution: {integrity: sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==} + path-to-regexp@6.3.0: + resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -12136,6 +12725,9 @@ packages: prosemirror-changeset@2.2.1: resolution: {integrity: sha512-J7msc6wbxB4ekDFj+n9gTW/jav/p53kdlivvuppHsrZXCaQdVgRghoZbSS3kwrRyAstRVQ4/+u5k7YfLgkkQvQ==} + prosemirror-changeset@2.3.0: + resolution: {integrity: sha512-8wRKhlEwEJ4I13Ju54q2NZR1pVKGTgJ/8XsQ8L5A5uUsQ/YQScQJuEAuh8Bn8i6IwAMjjLRABd9lVli+DlIiVw==} + prosemirror-collab@1.3.1: resolution: {integrity: sha512-4SnynYR9TTYaQVXd/ieUvsVV4PDMBzrq2xPUWutHivDuOshZXqQ5rGbZM84HEaXKbLdItse7weMGOUdDVcLKEQ==} @@ -12220,8 +12812,8 @@ packages: prosemirror-state: ^1.4.2 prosemirror-view: ^1.33.8 - prosemirror-transform@1.10.3: - resolution: {integrity: sha512-Nhh/+1kZGRINbEHmVu39oynhcap4hWTs/BlU7NnxWj3+l0qi8I1mu67v6mMdEe/ltD8hHvU4FV6PHiCw2VSpMw==} + prosemirror-transform@1.10.4: + resolution: {integrity: sha512-pwDy22nAnGqNR1feOQKHxoFkkUtepoFAd3r2hbEDsnf4wp57kKA36hXsB3njA9FtONBEwSDnDeCiJe+ItD+ykw==} prosemirror-view@1.38.1: resolution: {integrity: sha512-4FH/uM1A4PNyrxXbD+RAbAsf0d/mM0D/wAKSVVWK7o0A9Q/oOXJBrw786mBf2Vnrs/Edly6dH6Z2gsb7zWwaUw==} @@ -12527,6 +13119,9 @@ packages: remark-rehype@11.1.1: resolution: {integrity: sha512-g/osARvjkBXb6Wo0XvAeXQohVta8i84ACbenPpoSsxTOQH/Ae0/RGP4WZgnMH5pMLpsj4FG7OHmcIcXxpza8eQ==} + remark-stringify@10.0.3: + resolution: {integrity: sha512-koyOzCMYoUHudypbj4XpnAKFbkddRMYZHwghnxd7ue5210WzGw6kOBwauJTRUMq16jsovXx8dYNvSSWP89kZ3A==} + remark-stringify@11.0.0: resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==} @@ -12706,6 +13301,9 @@ packages: resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} engines: {node: '>=4'} + secure-json-parse@2.7.0: + resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} + selderee@0.11.0: resolution: {integrity: sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA==} @@ -12924,6 +13522,10 @@ packages: standardwebhooks@1.0.0: resolution: {integrity: sha512-BbHGOQK9olHPMvQNHWul6MYlrRTAOKn03rOe4A8O3CLWhNf4YHBqq2HJKKC+sfqpxiBY52pNeesD6jIiLDz8jg==} + statuses@2.0.1: + resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} + engines: {node: '>= 0.8'} + std-env@3.8.1: resolution: {integrity: sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==} @@ -12935,6 +13537,9 @@ packages: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} + strict-event-emitter@0.5.1: + resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} + string-natural-compare@3.0.1: resolution: {integrity: sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==} @@ -13066,6 +13671,11 @@ packages: svg-arc-to-cubic-bezier@3.2.0: resolution: {integrity: sha512-djbJ/vZKZO+gPoSDThGNpKDO+o+bAeA4XQKovvkNCqnIS2t+S4qnLAGQhyyrulhCFRl1WWzAp0wUDV8PpTVU3g==} + swr@2.3.3: + resolution: {integrity: sha512-dshNvs3ExOqtZ6kJBaAsabhPdHyeY4P2cKwRCniDVifBMoG/SVI7tfLWqPXriVspf2Rg4tPzXJTnwaihIeFw2A==} + peerDependencies: + react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} @@ -13135,6 +13745,10 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + throttleit@2.1.0: + resolution: {integrity: sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw==} + engines: {node: '>=18'} + tiny-inflate@1.0.3: resolution: {integrity: sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==} @@ -13270,6 +13884,10 @@ packages: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + type-fest@0.7.1: resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==} engines: {node: '>=8'} @@ -13330,6 +13948,10 @@ packages: resolution: {integrity: sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==} engines: {node: '>=14.0'} + undici@6.21.2: + resolution: {integrity: sha512-uROZWze0R0itiAKVPsYhFov9LxrPMHLMEQFszeI2gCN6bnIIZ8twzBCJcN2LJrBBLfrP0t1FW0g+JmKVl8Vk1g==} + engines: {node: '>=18.17'} + unicode-canonical-property-names-ecmascript@2.0.1: resolution: {integrity: sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==} engines: {node: '>=4'} @@ -13750,6 +14372,10 @@ packages: engines: {node: '>=16'} hasBin: true + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -13890,6 +14516,10 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + yoctocolors-cjs@2.1.2: + resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} + engines: {node: '>=18'} + yoga-layout@3.2.1: resolution: {integrity: sha512-0LPOt3AxKqMdFBZA3HBAt/t/8vIKq7VaQYbuA8WxCgung+p9TVyKRYdpvCb80HcdTN2NkbIKbhNwKUfm3tQywQ==} @@ -13899,14 +14529,95 @@ packages: youch@3.3.4: resolution: {integrity: sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg==} + zod-to-json-schema@3.24.5: + resolution: {integrity: sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==} + peerDependencies: + zod: ^3.24.1 + zod@3.24.2: resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==} + zustand@5.0.3: + resolution: {integrity: sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg==} + engines: {node: '>=12.20.0'} + peerDependencies: + '@types/react': '>=18.0.0' + immer: '>=9.0.6' + react: '>=18.0.0' + use-sync-external-store: '>=1.2.0' + peerDependenciesMeta: + '@types/react': + optional: true + immer: + optional: true + react: + optional: true + use-sync-external-store: + optional: true + zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} snapshots: + '@ai-sdk/anthropic@1.2.11(zod@3.24.2)': + dependencies: + '@ai-sdk/provider': 1.1.3 + '@ai-sdk/provider-utils': 2.2.8(zod@3.24.2) + zod: 3.24.2 + + '@ai-sdk/groq@1.2.9(zod@3.24.2)': + dependencies: + '@ai-sdk/provider': 1.1.3 + '@ai-sdk/provider-utils': 2.2.8(zod@3.24.2) + zod: 3.24.2 + + '@ai-sdk/mistral@1.2.8(zod@3.24.2)': + dependencies: + '@ai-sdk/provider': 1.1.3 + '@ai-sdk/provider-utils': 2.2.8(zod@3.24.2) + zod: 3.24.2 + + '@ai-sdk/openai-compatible@0.2.14(zod@3.24.2)': + dependencies: + '@ai-sdk/provider': 1.1.3 + '@ai-sdk/provider-utils': 2.2.8(zod@3.24.2) + zod: 3.24.2 + + '@ai-sdk/openai@1.3.22(zod@3.24.2)': + dependencies: + '@ai-sdk/provider': 1.1.3 + '@ai-sdk/provider-utils': 2.2.8(zod@3.24.2) + zod: 3.24.2 + + '@ai-sdk/provider-utils@2.2.8(zod@3.24.2)': + dependencies: + '@ai-sdk/provider': 1.1.3 + nanoid: 3.3.11 + secure-json-parse: 2.7.0 + zod: 3.24.2 + + '@ai-sdk/provider@1.1.3': + dependencies: + json-schema: 0.4.0 + + '@ai-sdk/react@1.2.12(react@18.3.1)(zod@3.24.2)': + dependencies: + '@ai-sdk/provider-utils': 2.2.8(zod@3.24.2) + '@ai-sdk/ui-utils': 1.2.11(zod@3.24.2) + react: 18.3.1 + swr: 2.3.3(react@18.3.1) + throttleit: 2.1.0 + optionalDependencies: + zod: 3.24.2 + + '@ai-sdk/ui-utils@1.2.11(zod@3.24.2)': + dependencies: + '@ai-sdk/provider': 1.1.3 + '@ai-sdk/provider-utils': 2.2.8(zod@3.24.2) + zod: 3.24.2 + zod-to-json-schema: 3.24.5(zod@3.24.2) + '@alloc/quick-lru@5.2.0': {} '@ampproject/remapping@2.3.0': @@ -15283,8 +15994,28 @@ snapshots: '@better-fetch/fetch@1.1.18': {} + '@blocknote/prosemirror-suggest-changes@0.1.3(prosemirror-model@1.25.1)(prosemirror-state@1.4.3)(prosemirror-transform@1.10.4)(prosemirror-view@1.38.1)': + dependencies: + prosemirror-model: 1.25.1 + prosemirror-state: 1.4.3 + prosemirror-transform: 1.10.4 + prosemirror-view: 1.38.1 + '@braintree/sanitize-url@6.0.4': {} + '@bundled-es-modules/cookie@2.0.1': + dependencies: + cookie: 0.7.2 + + '@bundled-es-modules/statuses@1.0.1': + dependencies: + statuses: 2.0.1 + + '@bundled-es-modules/tough-cookie@0.1.6': + dependencies: + '@types/tough-cookie': 4.0.5 + tough-cookie: 4.1.4 + '@cloudflare/workerd-darwin-64@1.20240129.0': optional: true @@ -15814,6 +16545,10 @@ snapshots: - bufferutil - utf-8-validate + '@hono/node-server@1.14.0(hono@4.7.5)': + dependencies: + hono: 4.7.5 + '@hookform/resolvers@3.10.0(react-hook-form@7.54.2(react@18.3.1))': dependencies: react-hook-form: 7.54.2(react@18.3.1) @@ -15983,6 +16718,59 @@ snapshots: '@img/sharp-win32-x64@0.34.1': optional: true + '@inquirer/confirm@5.1.9(@types/node@20.17.28)': + dependencies: + '@inquirer/core': 10.1.10(@types/node@20.17.28) + '@inquirer/type': 3.0.6(@types/node@20.17.28) + optionalDependencies: + '@types/node': 20.17.28 + optional: true + + '@inquirer/confirm@5.1.9(@types/node@22.14.1)': + dependencies: + '@inquirer/core': 10.1.10(@types/node@22.14.1) + '@inquirer/type': 3.0.6(@types/node@22.14.1) + optionalDependencies: + '@types/node': 22.14.1 + + '@inquirer/core@10.1.10(@types/node@20.17.28)': + dependencies: + '@inquirer/figures': 1.0.11 + '@inquirer/type': 3.0.6(@types/node@20.17.28) + ansi-escapes: 4.3.2 + cli-width: 4.1.0 + mute-stream: 2.0.0 + signal-exit: 4.1.0 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.2 + optionalDependencies: + '@types/node': 20.17.28 + optional: true + + '@inquirer/core@10.1.10(@types/node@22.14.1)': + dependencies: + '@inquirer/figures': 1.0.11 + '@inquirer/type': 3.0.6(@types/node@22.14.1) + ansi-escapes: 4.3.2 + cli-width: 4.1.0 + mute-stream: 2.0.0 + signal-exit: 4.1.0 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.2 + optionalDependencies: + '@types/node': 22.14.1 + + '@inquirer/figures@1.0.11': {} + + '@inquirer/type@3.0.6(@types/node@20.17.28)': + optionalDependencies: + '@types/node': 20.17.28 + optional: true + + '@inquirer/type@3.0.6(@types/node@22.14.1)': + optionalDependencies: + '@types/node': 22.14.1 + '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 @@ -16208,6 +16996,15 @@ snapshots: '@types/react': 18.3.20 react: 18.3.1 + '@mswjs/interceptors@0.37.6': + dependencies: + '@open-draft/deferred-promise': 2.2.0 + '@open-draft/logger': 0.3.0 + '@open-draft/until': 2.1.0 + is-node-process: 1.2.0 + outvariant: 1.4.3 + strict-event-emitter: 0.5.1 + '@mui/core-downloads-tracker@5.17.1': {} '@mui/icons-material@5.17.1(@mui/material@5.17.1(@emotion/react@11.14.0(@types/react@18.3.20)(react@18.3.1))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.20)(react@18.3.1))(@types/react@18.3.20)(react@18.3.1))(@types/react@18.3.20)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.20)(react@18.3.1)': @@ -16544,6 +17341,15 @@ snapshots: - '@swc/core' - debug + '@open-draft/deferred-promise@2.2.0': {} + + '@open-draft/logger@0.3.0': + dependencies: + is-node-process: 1.2.0 + outvariant: 1.4.3 + + '@open-draft/until@2.1.0': {} + '@opentelemetry/api-logs@0.57.2': dependencies: '@opentelemetry/api': 1.9.0 @@ -18311,10 +19117,6 @@ snapshots: dependencies: '@tiptap/core': 2.11.5(@tiptap/pm@2.11.5) - '@tiptap/extension-table-row@2.11.5(@tiptap/core@2.11.5(@tiptap/pm@2.11.5))': - dependencies: - '@tiptap/core': 2.11.5(@tiptap/pm@2.11.5) - '@tiptap/extension-text@2.11.5(@tiptap/core@2.11.5(@tiptap/pm@2.11.5))': dependencies: '@tiptap/core': 2.11.5(@tiptap/pm@2.11.5) @@ -18341,7 +19143,7 @@ snapshots: prosemirror-state: 1.4.3 prosemirror-tables: 1.6.4 prosemirror-trailing-node: 3.0.0(prosemirror-model@1.25.1)(prosemirror-state@1.4.3)(prosemirror-view@1.38.1) - prosemirror-transform: 1.10.3 + prosemirror-transform: 1.10.4 prosemirror-view: 1.38.1 '@tiptap/react@2.11.5(@tiptap/core@2.11.5(@tiptap/pm@2.11.5))(@tiptap/pm@2.11.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': @@ -18404,6 +19206,8 @@ snapshots: dependencies: '@types/node': 20.17.45 + '@types/cookie@0.6.0': {} + '@types/cors@2.8.17': dependencies: '@types/node': 20.17.45 @@ -18420,9 +19224,13 @@ snapshots: dependencies: '@types/ms': 2.1.0 + '@types/diff-match-patch@1.0.36': {} + + '@types/diff@6.0.0': {} + '@types/emoji-mart@3.0.14': dependencies: - '@types/react': 19.1.2 + '@types/react': 18.3.20 '@types/eslint-scope@3.7.7': dependencies: @@ -18484,6 +19292,8 @@ snapshots: '@types/tough-cookie': 4.0.5 parse5: 7.2.1 + '@types/json-diff@1.0.3': {} + '@types/json-schema@7.0.15': {} '@types/json5@0.0.29': {} @@ -18500,6 +19310,10 @@ snapshots: dependencies: '@types/lodash': 4.17.16 + '@types/lodash.isequal@4.5.8': + dependencies: + '@types/lodash': 4.17.16 + '@types/lodash.merge@4.6.9': dependencies: '@types/lodash': 4.17.16 @@ -18587,10 +19401,6 @@ snapshots: '@types/prop-types': 15.7.14 csstype: 3.1.3 - '@types/react@19.1.2': - dependencies: - csstype: 3.1.3 - '@types/retry@0.12.2': {} '@types/semver@7.7.0': {} @@ -18599,6 +19409,8 @@ snapshots: '@types/stack-utils@2.0.3': {} + '@types/statuses@2.0.5': {} + '@types/tedious@4.0.14': dependencies: '@types/node': 20.17.45 @@ -18927,20 +19739,22 @@ snapshots: chai: 5.2.0 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.9(vite@5.4.15(@types/node@20.17.28)(terser@5.39.0))': + '@vitest/mocker@2.1.9(msw@2.7.3(@types/node@20.17.28)(typescript@5.8.2))(vite@5.4.15(@types/node@20.17.28)(terser@5.39.0))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: + msw: 2.7.3(@types/node@20.17.28)(typescript@5.8.2) vite: 5.4.15(@types/node@20.17.28)(terser@5.39.0) - '@vitest/mocker@2.1.9(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0))': + '@vitest/mocker@2.1.9(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0))': dependencies: '@vitest/spy': 2.1.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: + msw: 2.7.3(@types/node@22.14.1)(typescript@5.8.2) vite: 5.4.15(@types/node@22.14.1)(terser@5.39.0) '@vitest/pretty-format@2.1.9': @@ -18971,7 +19785,7 @@ snapshots: sirv: 3.0.1 tinyglobby: 0.2.12 tinyrainbow: 1.2.0 - vitest: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0) + vitest: 2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0) '@vitest/utils@2.1.9': dependencies: @@ -19133,6 +19947,18 @@ snapshots: agent-base@7.1.3: {} + ai@4.3.15(react@18.3.1)(zod@3.24.2): + dependencies: + '@ai-sdk/provider': 1.1.3 + '@ai-sdk/provider-utils': 2.2.8(zod@3.24.2) + '@ai-sdk/react': 1.2.12(react@18.3.1)(zod@3.24.2) + '@ai-sdk/ui-utils': 1.2.11(zod@3.24.2) + '@opentelemetry/api': 1.9.0 + jsondiffpatch: 0.6.0 + zod: 3.24.2 + optionalDependencies: + react: 18.3.1 + ajv-formats@2.1.1(ajv@8.17.1): optionalDependencies: ajv: 8.17.1 @@ -19173,6 +19999,10 @@ snapshots: ansi-colors@4.1.3: {} + ansi-escapes@4.3.2: + dependencies: + type-fest: 0.21.3 + ansi-regex@5.0.1: {} ansi-regex@6.1.0: {} @@ -19620,6 +20450,8 @@ snapshots: chalk@5.0.1: {} + chalk@5.4.1: {} + character-entities-html4@2.1.0: {} character-entities-legacy@3.0.0: {} @@ -19673,6 +20505,8 @@ snapshots: cli-spinners@2.9.2: {} + cli-width@4.1.0: {} + client-only@0.0.1: {} clipboardy@1.2.2: @@ -20183,6 +21017,8 @@ snapshots: didyoumean@1.2.2: {} + diff-match-patch@1.0.5: {} + diff-sequences@29.6.3: {} diff@5.2.0: {} @@ -20400,8 +21236,6 @@ snapshots: iterator.prototype: 1.1.5 safe-array-concat: 1.1.3 - es-module-lexer@1.6.0: {} - es-module-lexer@1.7.0: {} es-object-atoms@1.1.1: @@ -21220,6 +22054,8 @@ snapshots: graphemer@1.4.0: {} + graphql@16.10.0: {} + gray-matter@4.0.3: dependencies: js-yaml: 3.14.1 @@ -21447,12 +22283,16 @@ snapshots: property-information: 7.0.0 space-separated-tokens: 2.0.2 + headers-polyfill@4.0.3: {} + hex-rgb@4.3.0: {} hoist-non-react-statics@3.3.2: dependencies: react-is: 16.13.1 + hono@4.7.5: {} + hosted-git-info@7.0.2: dependencies: lru-cache: 10.4.3 @@ -21684,6 +22524,8 @@ snapshots: is-network-error@1.1.0: {} + is-node-process@1.2.0: {} + is-number-object@1.1.1: dependencies: call-bound: 1.0.4 @@ -21976,6 +22818,8 @@ snapshots: json-schema-traverse@1.0.0: {} + json-schema@0.4.0: {} + json-stable-stringify-without-jsonify@1.0.1: {} json5@1.0.2: @@ -21988,6 +22832,12 @@ snapshots: jsonc-parser@3.3.1: {} + jsondiffpatch@0.6.0: + dependencies: + '@types/diff-match-patch': 1.0.36 + chalk: 5.4.1 + diff-match-patch: 1.0.5 + jsx-ast-utils@3.3.5: dependencies: array-includes: 3.1.8 @@ -22076,6 +22926,8 @@ snapshots: lodash.get@4.4.2: {} + lodash.isequal@4.5.0: {} + lodash.merge@4.6.2: {} lodash@4.17.21: {} @@ -23028,8 +23880,65 @@ snapshots: ms@2.1.3: {} + msw-snapshot@5.2.0(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2)): + dependencies: + msw: 2.7.3(@types/node@22.14.1)(typescript@5.8.2) + + msw@2.7.3(@types/node@20.17.28)(typescript@5.8.2): + dependencies: + '@bundled-es-modules/cookie': 2.0.1 + '@bundled-es-modules/statuses': 1.0.1 + '@bundled-es-modules/tough-cookie': 0.1.6 + '@inquirer/confirm': 5.1.9(@types/node@20.17.28) + '@mswjs/interceptors': 0.37.6 + '@open-draft/deferred-promise': 2.2.0 + '@open-draft/until': 2.1.0 + '@types/cookie': 0.6.0 + '@types/statuses': 2.0.5 + graphql: 16.10.0 + headers-polyfill: 4.0.3 + is-node-process: 1.2.0 + outvariant: 1.4.3 + path-to-regexp: 6.3.0 + picocolors: 1.1.1 + strict-event-emitter: 0.5.1 + type-fest: 4.38.0 + yargs: 17.7.2 + optionalDependencies: + typescript: 5.8.2 + transitivePeerDependencies: + - '@types/node' + optional: true + + msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2): + dependencies: + '@bundled-es-modules/cookie': 2.0.1 + '@bundled-es-modules/statuses': 1.0.1 + '@bundled-es-modules/tough-cookie': 0.1.6 + '@inquirer/confirm': 5.1.9(@types/node@22.14.1) + '@mswjs/interceptors': 0.37.6 + '@open-draft/deferred-promise': 2.2.0 + '@open-draft/until': 2.1.0 + '@types/cookie': 0.6.0 + '@types/statuses': 2.0.5 + graphql: 16.10.0 + headers-polyfill: 4.0.3 + is-node-process: 1.2.0 + outvariant: 1.4.3 + path-to-regexp: 6.3.0 + picocolors: 1.1.1 + strict-event-emitter: 0.5.1 + type-fest: 4.38.0 + yargs: 17.7.2 + optionalDependencies: + typescript: 5.8.2 + transitivePeerDependencies: + - '@types/node' + mustache@4.2.0: {} + mute-stream@2.0.0: {} + mz@2.7.0: dependencies: any-promise: 1.3.0 @@ -23415,6 +24324,8 @@ snapshots: orderedmap@2.1.1: {} + outvariant@1.4.3: {} + own-keys@1.0.1: dependencies: get-intrinsic: 1.3.0 @@ -23532,6 +24443,8 @@ snapshots: path-to-regexp@3.3.0: {} + path-to-regexp@6.3.0: {} + path-type@4.0.0: {} path2d@0.2.2: @@ -23766,7 +24679,11 @@ snapshots: prosemirror-changeset@2.2.1: dependencies: - prosemirror-transform: 1.10.3 + prosemirror-transform: 1.10.4 + + prosemirror-changeset@2.3.0: + dependencies: + prosemirror-transform: 1.10.4 prosemirror-collab@1.3.1: dependencies: @@ -23776,12 +24693,12 @@ snapshots: dependencies: prosemirror-model: 1.25.1 prosemirror-state: 1.4.3 - prosemirror-transform: 1.10.3 + prosemirror-transform: 1.10.4 prosemirror-dropcursor@1.8.1: dependencies: prosemirror-state: 1.4.3 - prosemirror-transform: 1.10.3 + prosemirror-transform: 1.10.4 prosemirror-view: 1.38.1 prosemirror-gapcursor@1.3.2: @@ -23791,26 +24708,26 @@ snapshots: prosemirror-state: 1.4.3 prosemirror-view: 1.38.1 - prosemirror-highlight@0.13.0(@shikijs/types@3.2.1)(@types/hast@3.0.4)(prosemirror-model@1.25.1)(prosemirror-state@1.4.3)(prosemirror-transform@1.10.3)(prosemirror-view@1.38.1): + prosemirror-highlight@0.13.0(@shikijs/types@3.2.1)(@types/hast@3.0.4)(prosemirror-model@1.25.1)(prosemirror-state@1.4.3)(prosemirror-transform@1.10.4)(prosemirror-view@1.38.1): optionalDependencies: '@shikijs/types': 3.2.1 '@types/hast': 3.0.4 prosemirror-model: 1.25.1 prosemirror-state: 1.4.3 - prosemirror-transform: 1.10.3 + prosemirror-transform: 1.10.4 prosemirror-view: 1.38.1 prosemirror-history@1.4.1: dependencies: prosemirror-state: 1.4.3 - prosemirror-transform: 1.10.3 + prosemirror-transform: 1.10.4 prosemirror-view: 1.38.1 rope-sequence: 1.3.4 prosemirror-inputrules@1.5.0: dependencies: prosemirror-state: 1.4.3 - prosemirror-transform: 1.10.3 + prosemirror-transform: 1.10.4 prosemirror-keymap@1.2.2: dependencies: @@ -23842,12 +24759,12 @@ snapshots: dependencies: prosemirror-model: 1.25.1 prosemirror-state: 1.4.3 - prosemirror-transform: 1.10.3 + prosemirror-transform: 1.10.4 prosemirror-state@1.4.3: dependencies: prosemirror-model: 1.25.1 - prosemirror-transform: 1.10.3 + prosemirror-transform: 1.10.4 prosemirror-view: 1.38.1 prosemirror-tables@1.6.4: @@ -23855,7 +24772,7 @@ snapshots: prosemirror-keymap: 1.2.2 prosemirror-model: 1.25.1 prosemirror-state: 1.4.3 - prosemirror-transform: 1.10.3 + prosemirror-transform: 1.10.4 prosemirror-view: 1.38.1 prosemirror-trailing-node@3.0.0(prosemirror-model@1.25.1)(prosemirror-state@1.4.3)(prosemirror-view@1.38.1): @@ -23866,7 +24783,7 @@ snapshots: prosemirror-state: 1.4.3 prosemirror-view: 1.38.1 - prosemirror-transform@1.10.3: + prosemirror-transform@1.10.4: dependencies: prosemirror-model: 1.25.1 @@ -23874,7 +24791,7 @@ snapshots: dependencies: prosemirror-model: 1.25.1 prosemirror-state: 1.4.3 - prosemirror-transform: 1.10.3 + prosemirror-transform: 1.10.4 protocols@2.0.2: {} @@ -24294,6 +25211,12 @@ snapshots: unified: 11.0.5 vfile: 6.0.3 + remark-stringify@10.0.3: + dependencies: + '@types/mdast': 3.0.15 + mdast-util-to-markdown: 1.5.0 + unified: 10.1.2 + remark-stringify@11.0.0: dependencies: '@types/mdast': 4.0.4 @@ -24500,6 +25423,8 @@ snapshots: extend-shallow: 2.0.1 kind-of: 6.0.3 + secure-json-parse@2.7.0: {} + selderee@0.11.0: dependencies: parseley: 0.12.1 @@ -24823,12 +25748,16 @@ snapshots: '@stablelib/base64': 1.0.1 fast-sha256: 1.3.0 + statuses@2.0.1: {} + std-env@3.8.1: {} stoppable@1.1.0: {} streamsearch@1.1.0: {} + strict-event-emitter@0.5.1: {} + string-natural-compare@3.0.1: {} string-width@4.2.3: @@ -24973,6 +25902,12 @@ snapshots: svg-arc-to-cubic-bezier@3.2.0: {} + swr@2.3.3(react@18.3.1): + dependencies: + dequal: 2.0.3 + react: 18.3.1 + use-sync-external-store: 1.4.0(react@18.3.1) + symbol-tree@3.2.4: {} system-architecture@0.1.0: {} @@ -25065,6 +26000,8 @@ snapshots: dependencies: any-promise: 1.3.0 + throttleit@2.1.0: {} + tiny-inflate@1.0.3: {} tiny-invariant@1.3.1: {} @@ -25185,6 +26122,8 @@ snapshots: type-fest@0.20.2: {} + type-fest@0.21.3: {} + type-fest@0.7.1: {} type-fest@1.4.0: {} @@ -25250,6 +26189,8 @@ snapshots: dependencies: '@fastify/busboy': 2.1.1 + undici@6.21.2: {} + unicode-canonical-property-names-ecmascript@2.0.1: {} unicode-match-property-ecmascript@2.0.0: @@ -25526,7 +26467,7 @@ snapshots: dependencies: cac: 6.7.14 debug: 4.4.0 - es-module-lexer: 1.6.0 + es-module-lexer: 1.7.0 pathe: 1.1.2 vite: 5.4.15(@types/node@20.17.28)(terser@5.39.0) transitivePeerDependencies: @@ -25544,7 +26485,7 @@ snapshots: dependencies: cac: 6.7.14 debug: 4.4.0 - es-module-lexer: 1.6.0 + es-module-lexer: 1.7.0 pathe: 1.1.2 vite: 5.4.15(@types/node@22.14.1)(terser@5.39.0) transitivePeerDependencies: @@ -25611,10 +26552,10 @@ snapshots: transitivePeerDependencies: - supports-color - vitest@2.1.9(@types/node@20.17.28)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0): + vitest@2.1.9(@types/node@20.17.28)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@20.17.28)(typescript@5.8.2))(terser@5.39.0): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(vite@5.4.15(@types/node@20.17.28)(terser@5.39.0)) + '@vitest/mocker': 2.1.9(msw@2.7.3(@types/node@20.17.28)(typescript@5.8.2))(vite@5.4.15(@types/node@20.17.28)(terser@5.39.0)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -25648,10 +26589,10 @@ snapshots: - supports-color - terser - vitest@2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@21.1.2(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0): + vitest@2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@21.1.2(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) + '@vitest/mocker': 2.1.9(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -25685,10 +26626,10 @@ snapshots: - supports-color - terser - vitest@2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(terser@5.39.0): + vitest@2.1.9(@types/node@22.14.1)(@vitest/ui@2.1.9)(jsdom@25.0.1(canvas@2.11.2(encoding@0.1.13)))(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(terser@5.39.0): dependencies: '@vitest/expect': 2.1.9 - '@vitest/mocker': 2.1.9(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) + '@vitest/mocker': 2.1.9(msw@2.7.3(@types/node@22.14.1)(typescript@5.8.2))(vite@5.4.15(@types/node@22.14.1)(terser@5.39.0)) '@vitest/pretty-format': 2.1.9 '@vitest/runner': 2.1.9 '@vitest/snapshot': 2.1.9 @@ -25918,6 +26859,12 @@ snapshots: '@cloudflare/workerd-linux-arm64': 1.20240129.0 '@cloudflare/workerd-windows-64': 1.20240129.0 + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 @@ -26016,6 +26963,8 @@ snapshots: yocto-queue@0.1.0: {} + yoctocolors-cjs@2.1.2: {} + yoga-layout@3.2.1: {} yoga-wasm-web@0.3.3: {} @@ -26026,6 +26975,17 @@ snapshots: mustache: 4.2.0 stacktracey: 2.1.8 + zod-to-json-schema@3.24.5(zod@3.24.2): + dependencies: + zod: 3.24.2 + zod@3.24.2: {} + zustand@5.0.3(@types/react@18.3.20)(immer@10.1.1)(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)): + optionalDependencies: + '@types/react': 18.3.20 + immer: 10.1.1 + react: 18.3.1 + use-sync-external-store: 1.4.0(react@18.3.1) + zwitch@2.0.4: {} diff --git a/shared/formatConversionTestUtil.ts b/shared/formatConversionTestUtil.ts index 8b6b16f851..5a9c95f090 100644 --- a/shared/formatConversionTestUtil.ts +++ b/shared/formatConversionTestUtil.ts @@ -1,3 +1,5 @@ +// TODO: remove duplicate file + import { Block, BlockNoteSchema, @@ -73,12 +75,22 @@ function partialContentToInlineContent( columnWidths: content.columnWidths, headerRows: content.headerRows, headerCols: content.headerCols, - rows: content.rows.map((row) => ({ - ...row, - cells: row.cells.map( - (cell) => partialContentToInlineContent(cell) as any, - ), - })), + rows: content.rows.map((row) => { + const cells: any[] = row.cells.map((cell) => { + if (!("type" in cell) || cell.type !== "tableCell") { + return partialContentToInlineContent({ + type: "tableCell", + content: cell as any, + }); + } + return partialContentToInlineContent(cell); + }); + + return { + ...row, + cells, + }; + }), }; } else if (content?.type === "tableCell") { return { diff --git a/shared/package.json b/shared/package.json index bb48351985..1811aa6016 100644 --- a/shared/package.json +++ b/shared/package.json @@ -2,7 +2,7 @@ "name": "@blocknote/shared", "homepage": "https://github.com/TypeCellOS/BlockNote", "private": true, - "version": "0.26.0", + "version": "0.30.0", "files": [ "dist", "types", diff --git a/tests/package.json b/tests/package.json index 30335f85e0..91e66834ee 100644 --- a/tests/package.json +++ b/tests/package.json @@ -1,7 +1,7 @@ { "name": "@blocknote/tests", "private": true, - "version": "0.26.0", + "version": "0.30.0", "scripts": { "build": "tsc", "lint": "eslint src --max-warnings 0", diff --git a/tests/src/unit/core/clipboard/copy/copyTestInstances.ts b/tests/src/unit/core/clipboard/copy/copyTestInstances.ts index 5018f0d552..9e709ab630 100644 --- a/tests/src/unit/core/clipboard/copy/copyTestInstances.ts +++ b/tests/src/unit/core/clipboard/copy/copyTestInstances.ts @@ -8,11 +8,11 @@ import { } from "../../testSchema.js"; import { CopyTestCase } from "../../../shared/clipboard/copy/copyTestCase.js"; import { testCopyHTML } from "../../../shared/clipboard/copy/copyTestExecutors.js"; -import { TestInstance } from "../../../types.js"; import { getPosOfTableCellNode, getPosOfTextNode, -} from "../clipboardTestUtil.js"; +} from "../../../shared/testUtil.js"; +import { TestInstance } from "../../../types.js"; export const copyTestInstancesHTML: TestInstance< CopyTestCase, diff --git a/tests/src/unit/core/clipboard/copy/runTests.test.ts b/tests/src/unit/core/clipboard/copy/runTests.test.ts index c1e3d77a0e..f7f2474d03 100644 --- a/tests/src/unit/core/clipboard/copy/runTests.test.ts +++ b/tests/src/unit/core/clipboard/copy/runTests.test.ts @@ -1,6 +1,6 @@ import { describe, it } from "vitest"; -import { setupTestEditor } from "../../setupTestEditor.js"; +import { createTestEditor } from "../../createTestEditor.js"; import { testSchema } from "../../testSchema.js"; import { copyTestInstancesHTML } from "./copyTestInstances.js"; @@ -8,7 +8,7 @@ import { copyTestInstancesHTML } from "./copyTestInstances.js"; // within the editor. Used for as many cases as possible to ensure each block or // set of blocks is correctly converted into different types of clipboard data. describe("Copy tests (HTML)", () => { - const getEditor = setupTestEditor(testSchema); + const getEditor = createTestEditor(testSchema); for (const { testCase, executeTest } of copyTestInstancesHTML) { it(`${testCase.name}`, async () => { diff --git a/tests/src/unit/core/clipboard/copyPaste/copyPasteTestInstances.ts b/tests/src/unit/core/clipboard/copyPaste/copyPasteTestInstances.ts index 1174599c2b..8752bcb101 100644 --- a/tests/src/unit/core/clipboard/copyPaste/copyPasteTestInstances.ts +++ b/tests/src/unit/core/clipboard/copyPaste/copyPasteTestInstances.ts @@ -7,8 +7,8 @@ import { } from "../../testSchema.js"; import { CopyPasteTestCase } from "../../../shared/clipboard/copyPaste/copyPasteTestCase.js"; import { testCopyPaste } from "../../../shared/clipboard/copyPaste/copyPasteTestExecutors.js"; +import { getPosOfTextNode } from "../../../shared/testUtil.js"; import { TestInstance } from "../../../types.js"; -import { getPosOfTextNode } from "../clipboardTestUtil.js"; export const copyPasteTestInstances: TestInstance< CopyPasteTestCase, diff --git a/tests/src/unit/core/clipboard/copyPaste/runTests.test.ts b/tests/src/unit/core/clipboard/copyPaste/runTests.test.ts index 1c55cbaf13..49863c7c49 100644 --- a/tests/src/unit/core/clipboard/copyPaste/runTests.test.ts +++ b/tests/src/unit/core/clipboard/copyPaste/runTests.test.ts @@ -1,13 +1,13 @@ import { describe, it } from "vitest"; -import { setupTestEditor } from "../../setupTestEditor.js"; +import { createTestEditor } from "../../createTestEditor.js"; import { testSchema } from "../../testSchema.js"; import { copyPasteTestInstances } from "./copyPasteTestInstances.js"; // Tests for verifying that copying and pasting content within the editor works // as expected. Used for specific cases where unexpected behaviour was noticed. describe("Copy/paste tests", () => { - const getEditor = setupTestEditor(testSchema); + const getEditor = createTestEditor(testSchema); for (const { testCase, executeTest } of copyPasteTestInstances) { it(`${testCase.name}`, async () => { diff --git a/tests/src/unit/core/clipboard/copyPasteEquality/runTests.test.ts b/tests/src/unit/core/clipboard/copyPasteEquality/runTests.test.ts index 27c4c619b0..c77dce769c 100644 --- a/tests/src/unit/core/clipboard/copyPasteEquality/runTests.test.ts +++ b/tests/src/unit/core/clipboard/copyPasteEquality/runTests.test.ts @@ -1,6 +1,6 @@ import { describe, it } from "vitest"; -import { setupTestEditor } from "../../setupTestEditor.js"; +import { createTestEditor } from "../../createTestEditor.js"; import { testSchema } from "../../testSchema.js"; import { copyPasteEqualityTestInstances } from "./copyPasteEqualityTestInstances.js"; @@ -9,7 +9,7 @@ import { copyPasteEqualityTestInstances } from "./copyPasteEqualityTestInstances // as possible to ensure that converting to and from clipboard data does not // result in any data loss. describe("Copy/paste equality tests", () => { - const getEditor = setupTestEditor(testSchema); + const getEditor = createTestEditor(testSchema); for (const { testCase, executeTest } of copyPasteEqualityTestInstances) { it(`${testCase.name}`, async () => { diff --git a/tests/src/unit/core/clipboard/paste/pasteTestInstances.ts b/tests/src/unit/core/clipboard/paste/pasteTestInstances.ts index 1df662d4f7..404cd8cb83 100644 --- a/tests/src/unit/core/clipboard/paste/pasteTestInstances.ts +++ b/tests/src/unit/core/clipboard/paste/pasteTestInstances.ts @@ -10,8 +10,8 @@ import { testPasteHTML, testPasteMarkdown, } from "../../../shared/clipboard/paste/pasteTestExecutors.js"; +import { getPosOfTextNode } from "../../../shared/testUtil.js"; import { TestInstance } from "../../../types.js"; -import { getPosOfTextNode } from "../clipboardTestUtil.js"; export const pasteTestInstancesHTML: TestInstance< PasteTestCase, diff --git a/tests/src/unit/core/clipboard/paste/runTests.test.ts b/tests/src/unit/core/clipboard/paste/runTests.test.ts index 92fba65fef..c98687b26a 100644 --- a/tests/src/unit/core/clipboard/paste/runTests.test.ts +++ b/tests/src/unit/core/clipboard/paste/runTests.test.ts @@ -1,6 +1,6 @@ import { describe, it } from "vitest"; -import { setupTestEditor } from "../../setupTestEditor.js"; +import { createTestEditor } from "../../createTestEditor.js"; import { testSchema } from "../../testSchema.js"; import { pasteTestInstancesHTML, @@ -12,7 +12,7 @@ import { // into it. This includes content from other editors, as well as content from // the web that has produced bugs in the past. describe("Paste tests (HTML)", () => { - const getEditor = setupTestEditor(testSchema); + const getEditor = createTestEditor(testSchema); for (const { testCase, executeTest } of pasteTestInstancesHTML) { it(`${testCase.name}`, async () => { @@ -22,7 +22,7 @@ describe("Paste tests (HTML)", () => { }); describe("Paste tests (Markdown)", () => { - const getEditor = setupTestEditor(testSchema); + const getEditor = createTestEditor(testSchema); for (const { testCase, executeTest } of pasteTestInstancesMarkdown) { it(`${testCase.name}`, async () => { diff --git a/tests/src/unit/core/setupTestEditor.ts b/tests/src/unit/core/createTestEditor.ts similarity index 97% rename from tests/src/unit/core/setupTestEditor.ts rename to tests/src/unit/core/createTestEditor.ts index fe9283d6a5..ad11c2111f 100644 --- a/tests/src/unit/core/setupTestEditor.ts +++ b/tests/src/unit/core/createTestEditor.ts @@ -9,7 +9,7 @@ import { } from "@blocknote/core"; import { afterAll, beforeAll } from "vitest"; -export const setupTestEditor = < +export const createTestEditor = < B extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema, diff --git a/tests/src/unit/core/formatConversion/export/runTests.test.ts b/tests/src/unit/core/formatConversion/export/runTests.test.ts index badd6638cb..7ae6316112 100644 --- a/tests/src/unit/core/formatConversion/export/runTests.test.ts +++ b/tests/src/unit/core/formatConversion/export/runTests.test.ts @@ -1,6 +1,6 @@ import { describe, it } from "vitest"; -import { setupTestEditor } from "../../setupTestEditor.js"; +import { createTestEditor } from "../../createTestEditor.js"; import { testSchema } from "../../testSchema.js"; import { exportTestInstancesBlockNoteHTML, @@ -13,7 +13,7 @@ import { // Used for as many cases as possible to ensure each block or set of blocks is // correctly converted into different formats. describe("Export tests (BlockNote HTML)", () => { - const getEditor = setupTestEditor(testSchema); + const getEditor = createTestEditor(testSchema); for (const { testCase, executeTest } of exportTestInstancesBlockNoteHTML) { it(`${testCase.name}`, async () => { @@ -23,7 +23,7 @@ describe("Export tests (BlockNote HTML)", () => { }); describe("Export tests (HTML)", () => { - const getEditor = setupTestEditor(testSchema); + const getEditor = createTestEditor(testSchema); for (const { testCase, executeTest } of exportTestInstancesHTML) { it(`${testCase.name}`, async () => { @@ -33,7 +33,7 @@ describe("Export tests (HTML)", () => { }); describe("Export tests (Markdown)", () => { - const getEditor = setupTestEditor(testSchema); + const getEditor = createTestEditor(testSchema); for (const { testCase, executeTest } of exportTestInstancesMarkdown) { it(`${testCase.name}`, async () => { @@ -43,7 +43,7 @@ describe("Export tests (Markdown)", () => { }); describe("Export tests (TipTap nodes)", () => { - const getEditor = setupTestEditor(testSchema); + const getEditor = createTestEditor(testSchema); for (const { testCase, executeTest } of exportTestInstancesNodes) { it(`${testCase.name}`, async () => { diff --git a/tests/src/unit/core/formatConversion/exportParseEquality/runTests.test.ts b/tests/src/unit/core/formatConversion/exportParseEquality/runTests.test.ts index 3970bb02d8..1e36f32c1b 100644 --- a/tests/src/unit/core/formatConversion/exportParseEquality/runTests.test.ts +++ b/tests/src/unit/core/formatConversion/exportParseEquality/runTests.test.ts @@ -1,6 +1,6 @@ import { describe, it } from "vitest"; -import { setupTestEditor } from "../../setupTestEditor.js"; +import { createTestEditor } from "../../createTestEditor.js"; import { testSchema } from "../../testSchema.js"; import { exportParseEqualityTestInstancesBlockNoteHTML } from "./exportParseEqualityTestInstances.js"; @@ -9,7 +9,7 @@ import { exportParseEqualityTestInstancesBlockNoteHTML } from "./exportParseEqua // as possible to ensure that exporting and importing blocks does not result in // any data loss. describe("Export/parse equality tests (BlockNote HTML)", () => { - const getEditor = setupTestEditor(testSchema); + const getEditor = createTestEditor(testSchema); for (const { testCase, diff --git a/tests/src/unit/core/formatConversion/parse/runTests.test.ts b/tests/src/unit/core/formatConversion/parse/runTests.test.ts index dd87c5fa03..4e4d92b82b 100644 --- a/tests/src/unit/core/formatConversion/parse/runTests.test.ts +++ b/tests/src/unit/core/formatConversion/parse/runTests.test.ts @@ -1,6 +1,6 @@ import { describe, it } from "vitest"; -import { setupTestEditor } from "../../setupTestEditor.js"; +import { createTestEditor } from "../../createTestEditor.js"; import { testSchema } from "../../testSchema.js"; import { parseTestInstancesHTML, @@ -12,7 +12,7 @@ import { // imported as blocks. This includes content from other editors, as well as // content from the web that has produced bugs in the past. describe("Parse tests (HTML)", () => { - const getEditor = setupTestEditor(testSchema); + const getEditor = createTestEditor(testSchema); for (const { testCase, executeTest } of parseTestInstancesHTML) { it(`${testCase.name}`, async () => { @@ -22,7 +22,7 @@ describe("Parse tests (HTML)", () => { }); describe("Parse tests (Markdown)", () => { - const getEditor = setupTestEditor(testSchema); + const getEditor = createTestEditor(testSchema); for (const { testCase, executeTest } of parseTestInstancesMarkdown) { it(`${testCase.name}`, async () => { diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/childBlockWithOffsets.json b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/childBlockWithOffsets.json new file mode 100644 index 0000000000..662c5a41f8 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/childBlockWithOffsets.json @@ -0,0 +1,27 @@ +{ + "_meta": { + "startPos": 19, + "endPos": 35 + }, + "blocks": [ + { + "id": "2", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ested Paragraph ", + "styles": {} + } + ], + "children": [] + } + ], + "blockCutAtStart": "2", + "blockCutAtEnd": "2" +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/childToNextParentBlockWithOffsets.json b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/childToNextParentBlockWithOffsets.json new file mode 100644 index 0000000000..6427f60508 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/childToNextParentBlockWithOffsets.json @@ -0,0 +1,44 @@ +{ + "_meta": { + "startPos": 19, + "endPos": 52 + }, + "blocks": [ + { + "id": "2", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ested Paragraph 1", + "styles": {} + } + ], + "children": [] + }, + { + "id": "3", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph ", + "styles": {} + } + ], + "children": [] + } + ], + "blockCutAtStart": "2", + "blockCutAtEnd": "3" +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/childToNextParentsChildBlockWithOffsets.json b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/childToNextParentsChildBlockWithOffsets.json new file mode 100644 index 0000000000..6526c18eea --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/childToNextParentsChildBlockWithOffsets.json @@ -0,0 +1,62 @@ +{ + "_meta": { + "startPos": 19, + "endPos": 74 + }, + "blocks": [ + { + "id": "2", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ested Paragraph 1", + "styles": {} + } + ], + "children": [] + }, + { + "id": "3", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph 2", + "styles": {} + } + ], + "children": [ + { + "id": "4", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Nested Paragraph ", + "styles": {} + } + ], + "children": [] + } + ] + } + ], + "blockCutAtStart": "2", + "blockCutAtEnd": "4" +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/multipleBlocksWithOffsets.json b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/multipleBlocksWithOffsets.json new file mode 100644 index 0000000000..9b2a53ac12 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/multipleBlocksWithOffsets.json @@ -0,0 +1,44 @@ +{ + "_meta": { + "startPos": 4, + "endPos": 28 + }, + "blocks": [ + { + "id": "1", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "aragraph 1", + "styles": {} + } + ], + "children": [] + }, + { + "id": "2", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph ", + "styles": {} + } + ], + "children": [] + } + ], + "blockCutAtStart": "1", + "blockCutAtEnd": "2" +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/multipleChildBlocksWithOffsets.json b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/multipleChildBlocksWithOffsets.json new file mode 100644 index 0000000000..d6808f220f --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/multipleChildBlocksWithOffsets.json @@ -0,0 +1,44 @@ +{ + "_meta": { + "startPos": 19, + "endPos": 57 + }, + "blocks": [ + { + "id": "2", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "ested Paragraph 1", + "styles": {} + } + ], + "children": [] + }, + { + "id": "3", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Nested Paragraph ", + "styles": {} + } + ], + "children": [] + } + ], + "blockCutAtStart": "2", + "blockCutAtEnd": "3" +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/multipleTableBlocksWithOffsets.json b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/multipleTableBlocksWithOffsets.json new file mode 100644 index 0000000000..ca471dd0bb --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/multipleTableBlocksWithOffsets.json @@ -0,0 +1,120 @@ +{ + "_meta": { + "startPos": 53, + "endPos": 143 + }, + "blocks": [ + { + "id": "1", + "type": "table", + "props": { + "textColor": "default" + }, + "content": { + "type": "tableContent", + "columnWidths": [ + null, + null + ], + "rows": [ + { + "cells": [ + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "irst Table Cell 3", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + }, + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "First Table Cell 4", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + }, + "children": [] + }, + { + "id": "2", + "type": "table", + "props": { + "textColor": "default" + }, + "content": { + "type": "tableContent", + "columnWidths": [ + null, + null + ], + "rows": [ + { + "cells": [ + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Second Table Cell 1", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + }, + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Second Table Cell ", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + }, + "children": [] + } + ], + "blockCutAtStart": "1", + "blockCutAtEnd": "2" +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/parentToChildBlockWithOffsets.json b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/parentToChildBlockWithOffsets.json new file mode 100644 index 0000000000..fc480fbd3e --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/parentToChildBlockWithOffsets.json @@ -0,0 +1,45 @@ +{ + "_meta": { + "startPos": 4, + "endPos": 35 + }, + "blocks": [ + { + "id": "1", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "aragraph 1", + "styles": {} + } + ], + "children": [ + { + "id": "2", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Nested Paragraph ", + "styles": {} + } + ], + "children": [] + } + ] + } + ], + "blockCutAtStart": "1", + "blockCutAtEnd": "2" +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/singleBlockWithOffsets.json b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/singleBlockWithOffsets.json new file mode 100644 index 0000000000..d40b69edf2 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/singleBlockWithOffsets.json @@ -0,0 +1,27 @@ +{ + "_meta": { + "startPos": 4, + "endPos": 13 + }, + "blocks": [ + { + "id": "1", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "aragraph ", + "styles": {} + } + ], + "children": [] + } + ], + "blockCutAtStart": "1", + "blockCutAtEnd": "1" +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/tableBlockWithOffsets.json b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/tableBlockWithOffsets.json new file mode 100644 index 0000000000..887ef816b9 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/cutBlocks/tableBlockWithOffsets.json @@ -0,0 +1,103 @@ +{ + "_meta": { + "startPos": 7, + "endPos": 67 + }, + "blocks": [ + { + "id": "1", + "type": "table", + "props": { + "textColor": "default" + }, + "content": { + "type": "tableContent", + "columnWidths": [ + null, + null + ], + "rows": [ + { + "cells": [ + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "able Cell 1", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + }, + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Table Cell 2", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + }, + { + "cells": [ + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Table Cell 3", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + }, + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Table Cell ", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + }, + "children": [] + } + ], + "blockCutAtStart": "1", + "blockCutAtEnd": "1" +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/regular/acrossBlockWithChildren.json b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/acrossBlockWithChildren.json new file mode 100644 index 0000000000..38a2c5b553 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/acrossBlockWithChildren.json @@ -0,0 +1,77 @@ +{ + "_meta": { + "startPos": 0, + "endPos": 71 + }, + "blocks": [ + { + "id": "1", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph 1", + "styles": {} + } + ], + "children": [] + }, + { + "id": "2", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph 2", + "styles": {} + } + ], + "children": [ + { + "id": "3", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Nested Paragraph 1", + "styles": {} + } + ], + "children": [] + } + ] + }, + { + "id": "4", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph 3", + "styles": {} + } + ], + "children": [] + } + ] +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/regular/blockWithoutContent.json b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/blockWithoutContent.json new file mode 100644 index 0000000000..7650934b21 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/blockWithoutContent.json @@ -0,0 +1,21 @@ +{ + "_meta": { + "startPos": 0, + "endPos": 5 + }, + "blocks": [ + { + "id": "1", + "type": "image", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "name": "", + "url": "https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg", + "caption": "", + "showPreview": true + }, + "children": [] + } + ] +} diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/regular/childBlock.json b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/childBlock.json new file mode 100644 index 0000000000..77b62f2602 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/childBlock.json @@ -0,0 +1,25 @@ +{ + "_meta": { + "startPos": 15, + "endPos": 41 + }, + "blocks": [ + { + "id": "2", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Nested Paragraph 1", + "styles": {} + } + ], + "children": [] + } + ] +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/regular/childToNextParentBlock.json b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/childToNextParentBlock.json new file mode 100644 index 0000000000..de6474a245 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/childToNextParentBlock.json @@ -0,0 +1,42 @@ +{ + "_meta": { + "startPos": 15, + "endPos": 56 + }, + "blocks": [ + { + "id": "2", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Nested Paragraph 1", + "styles": {} + } + ], + "children": [] + }, + { + "id": "3", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph 2", + "styles": {} + } + ], + "children": [] + } + ] +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/regular/childToNextParentsChildBlock.json b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/childToNextParentsChildBlock.json new file mode 100644 index 0000000000..17aa285579 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/childToNextParentsChildBlock.json @@ -0,0 +1,60 @@ +{ + "_meta": { + "startPos": 15, + "endPos": 80 + }, + "blocks": [ + { + "id": "2", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Nested Paragraph 1", + "styles": {} + } + ], + "children": [] + }, + { + "id": "3", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph 2", + "styles": {} + } + ], + "children": [ + { + "id": "4", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Nested Paragraph 2", + "styles": {} + } + ], + "children": [] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/regular/multipleBlocks.json b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/multipleBlocks.json new file mode 100644 index 0000000000..8feb1a3e85 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/multipleBlocks.json @@ -0,0 +1,42 @@ +{ + "_meta": { + "startPos": 0, + "endPos": 32 + }, + "blocks": [ + { + "id": "1", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph 1", + "styles": {} + } + ], + "children": [] + }, + { + "id": "2", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph 2", + "styles": {} + } + ], + "children": [] + } + ] +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/regular/multipleChildBlocks.json b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/multipleChildBlocks.json new file mode 100644 index 0000000000..0d27ebf4c1 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/multipleChildBlocks.json @@ -0,0 +1,42 @@ +{ + "_meta": { + "startPos": 15, + "endPos": 63 + }, + "blocks": [ + { + "id": "2", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Nested Paragraph 1", + "styles": {} + } + ], + "children": [] + }, + { + "id": "3", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Nested Paragraph 2", + "styles": {} + } + ], + "children": [] + } + ] +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/regular/multipleTableBlocks.json b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/multipleTableBlocks.json new file mode 100644 index 0000000000..f6afe24e1a --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/multipleTableBlocks.json @@ -0,0 +1,194 @@ +{ + "_meta": { + "startPos": 0, + "endPos": 198 + }, + "blocks": [ + { + "id": "1", + "type": "table", + "props": { + "textColor": "default" + }, + "content": { + "type": "tableContent", + "columnWidths": [ + null, + null + ], + "rows": [ + { + "cells": [ + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "First Table Cell 1", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + }, + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "First Table Cell 2", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + }, + { + "cells": [ + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "First Table Cell 3", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + }, + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "First Table Cell 4", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + }, + "children": [] + }, + { + "id": "2", + "type": "table", + "props": { + "textColor": "default" + }, + "content": { + "type": "tableContent", + "columnWidths": [ + null, + null + ], + "rows": [ + { + "cells": [ + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Second Table Cell 1", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + }, + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Second Table Cell 2", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + }, + { + "cells": [ + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Second Table Cell 3", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + }, + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Second Table Cell 4", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + }, + "children": [] + } + ] +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/regular/multipleTableCells.json b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/multipleTableCells.json new file mode 100644 index 0000000000..769f8a32da --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/multipleTableCells.json @@ -0,0 +1,46 @@ +{ + "_meta": { + "startPos": 54, + "endPos": 74 + }, + "blocks": [ + { + "id": "1", + "type": "table", + "props": { + "textColor": "default" + }, + "content": { + "type": "tableContent", + "columnWidths": [ + null + ], + "rows": [ + { + "cells": [ + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Table Cell 4", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + }, + "children": [] + } + ], + "blockCutAtStart": "1" +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/regular/parentToChildBlock.json b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/parentToChildBlock.json new file mode 100644 index 0000000000..d865232a98 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/parentToChildBlock.json @@ -0,0 +1,43 @@ +{ + "_meta": { + "startPos": 0, + "endPos": 41 + }, + "blocks": [ + { + "id": "1", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph 1", + "styles": {} + } + ], + "children": [ + { + "id": "2", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Nested Paragraph 1", + "styles": {} + } + ], + "children": [] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/regular/singleBlock.json b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/singleBlock.json new file mode 100644 index 0000000000..1b1ea02496 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/singleBlock.json @@ -0,0 +1,25 @@ +{ + "_meta": { + "startPos": 0, + "endPos": 17 + }, + "blocks": [ + { + "id": "1", + "type": "paragraph", + "props": { + "textColor": "default", + "backgroundColor": "default", + "textAlignment": "left" + }, + "content": [ + { + "type": "text", + "text": "Paragraph 1", + "styles": {} + } + ], + "children": [] + } + ] +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/regular/tableBlock.json b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/tableBlock.json new file mode 100644 index 0000000000..68997b3123 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/tableBlock.json @@ -0,0 +1,101 @@ +{ + "_meta": { + "startPos": 0, + "endPos": 74 + }, + "blocks": [ + { + "id": "1", + "type": "table", + "props": { + "textColor": "default" + }, + "content": { + "type": "tableContent", + "columnWidths": [ + null, + null + ], + "rows": [ + { + "cells": [ + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Table Cell 1", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + }, + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Table Cell 2", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + }, + { + "cells": [ + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Table Cell 3", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + }, + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Table Cell 4", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + }, + "children": [] + } + ] +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/__snapshots__/regular/tableCell.json b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/tableCell.json new file mode 100644 index 0000000000..41d5f91e5f --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/__snapshots__/regular/tableCell.json @@ -0,0 +1,46 @@ +{ + "_meta": { + "startPos": 0, + "endPos": 20 + }, + "blocks": [ + { + "id": "1", + "type": "table", + "props": { + "textColor": "default" + }, + "content": { + "type": "tableContent", + "columnWidths": [ + null + ], + "rows": [ + { + "cells": [ + { + "type": "tableCell", + "content": [ + { + "type": "text", + "text": "Table Cell 1", + "styles": {} + } + ], + "props": { + "colspan": 1, + "rowspan": 1, + "backgroundColor": "default", + "textColor": "default", + "textAlignment": "left" + } + } + ] + } + ] + }, + "children": [] + } + ], + "blockCutAtEnd": "1" +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/getSelection/getSelectionTestInstances.ts b/tests/src/unit/core/selection/getSelection/getSelectionTestInstances.ts new file mode 100644 index 0000000000..674c8976d4 --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/getSelectionTestInstances.ts @@ -0,0 +1,659 @@ +import { NodeSelection, TextSelection } from "@tiptap/pm/state"; +import { CellSelection } from "@tiptap/pm/tables"; + +import { + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema, +} from "../../testSchema.js"; +import { GetSelectionTestCase } from "../../../shared/selection/getSelection/getSelectionTestCase.js"; +import { + testGetSelectionRegular, + testGetSelectionCutBlocks, +} from "../../../shared/selection/getSelection/getSelectionTestExecutors.js"; +import { + getPosOfTableCellNode, + getPosOfTextNode, +} from "../../../shared/testUtil.js"; +import { TestInstance } from "../../../types.js"; + +export const getSelectionTestInstancesRegular: TestInstance< + GetSelectionTestCase< + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema + >, + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema +>[] = [ + { + testCase: { + name: "singleBlock", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Paragraph 1", true); + + return TextSelection.create(doc, startPos, endPos); + }, + }, + executeTest: testGetSelectionRegular, + }, + + { + testCase: { + name: "multipleBlocks", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + }, + { + type: "paragraph", + content: "Paragraph 2", + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Paragraph 2", true); + + return TextSelection.create(doc, startPos, endPos); + }, + }, + executeTest: testGetSelectionRegular, + }, + { + testCase: { + name: "childBlock", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + ], + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Nested Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Nested Paragraph 1", true); + + return TextSelection.create(doc, startPos, endPos); + }, + }, + executeTest: testGetSelectionRegular, + }, + { + testCase: { + name: "multipleChildBlocks", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + { + type: "paragraph", + content: "Nested Paragraph 2", + }, + ], + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Nested Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Nested Paragraph 2", true); + + return TextSelection.create(doc, startPos, endPos); + }, + }, + executeTest: testGetSelectionRegular, + }, + { + testCase: { + name: "parentToChildBlock", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + ], + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Nested Paragraph 1", true); + + return TextSelection.create(doc, startPos, endPos); + }, + }, + executeTest: testGetSelectionRegular, + }, + { + testCase: { + name: "childToNextParentBlock", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + ], + }, + { + type: "paragraph", + content: "Paragraph 2", + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Nested Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Paragraph 2", true); + + return TextSelection.create(doc, startPos, endPos); + }, + }, + executeTest: testGetSelectionRegular, + }, + { + testCase: { + name: "childToNextParentsChildBlock", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + ], + }, + { + type: "paragraph", + content: "Paragraph 2", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 2", + }, + ], + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Nested Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Nested Paragraph 2", true); + + return TextSelection.create(doc, startPos, endPos); + }, + }, + executeTest: testGetSelectionRegular, + }, + { + testCase: { + name: "acrossBlockWithChildren", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + }, + { + type: "paragraph", + content: "Paragraph 2", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + ], + }, + { + type: "paragraph", + content: "Paragraph 3", + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Paragraph 3", true); + + return TextSelection.create(doc, startPos, endPos); + }, + }, + executeTest: testGetSelectionRegular, + }, + { + testCase: { + name: "blockWithoutContent", + document: [ + { + type: "image", + props: { + url: "https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg", + }, + }, + ], + getSelection: (doc) => { + let startPos: number | undefined = undefined; + + doc.descendants((node, pos) => { + if (node.type.name === "image") { + startPos = pos; + } + }); + + if (startPos === undefined) { + throw new Error("Image node not found."); + } + + return NodeSelection.create(doc, startPos); + }, + }, + executeTest: testGetSelectionRegular, + }, + { + testCase: { + name: "tableCell", + document: [ + { + type: "table", + content: { + type: "tableContent", + rows: [ + { + cells: [["Table Cell 1"], ["Table Cell 2"]], + }, + { + cells: [["Table Cell 3"], ["Table Cell 4"]], + }, + ], + }, + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTableCellNode(doc, "Table Cell 1"); + + return CellSelection.create(doc, startPos); + }, + }, + executeTest: testGetSelectionRegular, + }, + { + testCase: { + name: "multipleTableCells", + document: [ + { + type: "table", + content: { + type: "tableContent", + rows: [ + { + cells: [["Table Cell 1"], ["Table Cell 2"]], + }, + { + cells: [["Table Cell 3"], ["Table Cell 4"]], + }, + ], + }, + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTableCellNode(doc, "Table Cell 1"); + const endPos = getPosOfTableCellNode(doc, "Table Cell 4"); + + return CellSelection.create(doc, startPos, endPos); + }, + }, + executeTest: testGetSelectionRegular, + }, + { + testCase: { + name: "tableBlock", + document: [ + { + type: "table", + content: { + type: "tableContent", + rows: [ + { + cells: [["Table Cell 1"], ["Table Cell 2"]], + }, + { + cells: [["Table Cell 3"], ["Table Cell 4"]], + }, + ], + }, + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Table Cell 1"); + const endPos = getPosOfTextNode(doc, "Table Cell 4", true); + + return TextSelection.create(doc, startPos, endPos); + }, + }, + executeTest: testGetSelectionRegular, + }, + { + testCase: { + name: "multipleTableBlocks", + document: [ + { + type: "table", + content: { + type: "tableContent", + rows: [ + { + cells: [["First Table Cell 1"], ["First Table Cell 2"]], + }, + { + cells: [["First Table Cell 3"], ["First Table Cell 4"]], + }, + ], + }, + }, + { + type: "table", + content: { + type: "tableContent", + rows: [ + { + cells: [["Second Table Cell 1"], ["Second Table Cell 2"]], + }, + { + cells: [["Second Table Cell 3"], ["Second Table Cell 4"]], + }, + ], + }, + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "First Table Cell 1"); + const endPos = getPosOfTextNode(doc, "Second Table Cell 4", true); + + return TextSelection.create(doc, startPos, endPos); + }, + }, + executeTest: testGetSelectionRegular, + }, +]; + +export const getSelectionTestInstancesCutblocks: TestInstance< + GetSelectionTestCase< + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema + >, + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema +>[] = [ + // ...getSelectionTestInstances.map(({ testCase }) => ({ + // testCase, + // executeTest: testGetSelection, + // })), + { + testCase: { + name: "singleBlockWithOffsets", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Paragraph 1", true); + + return TextSelection.create(doc, startPos + 1, endPos - 1); + }, + }, + executeTest: testGetSelectionCutBlocks, + }, + { + testCase: { + name: "multipleBlocksWithOffsets", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + }, + { + type: "paragraph", + content: "Paragraph 2", + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Paragraph 2", true); + + return TextSelection.create(doc, startPos + 1, endPos - 1); + }, + }, + executeTest: testGetSelectionCutBlocks, + }, + { + testCase: { + name: "childBlockWithOffsets", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + ], + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Nested Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Nested Paragraph 1", true); + + return TextSelection.create(doc, startPos + 1, endPos - 1); + }, + }, + executeTest: testGetSelectionCutBlocks, + }, + { + testCase: { + name: "multipleChildBlocksWithOffsets", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + { + type: "paragraph", + content: "Nested Paragraph 2", + }, + ], + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Nested Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Nested Paragraph 2", true); + + return TextSelection.create(doc, startPos + 1, endPos - 1); + }, + }, + executeTest: testGetSelectionCutBlocks, + }, + { + testCase: { + name: "parentToChildBlockWithOffsets", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + ], + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Nested Paragraph 1", true); + + return TextSelection.create(doc, startPos + 1, endPos - 1); + }, + }, + executeTest: testGetSelectionCutBlocks, + }, + { + testCase: { + name: "childToNextParentBlockWithOffsets", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + ], + }, + { + type: "paragraph", + content: "Paragraph 2", + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Nested Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Paragraph 2", true); + + return TextSelection.create(doc, startPos + 1, endPos - 1); + }, + }, + executeTest: testGetSelectionCutBlocks, + }, + { + testCase: { + name: "childToNextParentsChildBlockWithOffsets", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + ], + }, + { + type: "paragraph", + content: "Paragraph 2", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 2", + }, + ], + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Nested Paragraph 1"); + const endPos = getPosOfTextNode(doc, "Nested Paragraph 2", true); + + return TextSelection.create(doc, startPos + 1, endPos - 1); + }, + }, + executeTest: testGetSelectionCutBlocks, + }, + { + testCase: { + name: "tableBlockWithOffsets", + document: [ + { + type: "table", + content: { + type: "tableContent", + rows: [ + { + cells: [["Table Cell 1"], ["Table Cell 2"]], + }, + { + cells: [["Table Cell 3"], ["Table Cell 4"]], + }, + ], + }, + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "Table Cell 1"); + const endPos = getPosOfTextNode(doc, "Table Cell 4", true); + + return TextSelection.create(doc, startPos + 1, endPos - 1); + }, + }, + executeTest: testGetSelectionCutBlocks, + }, + { + testCase: { + name: "multipleTableBlocksWithOffsets", + document: [ + { + type: "table", + content: { + type: "tableContent", + rows: [ + { + cells: [["First Table Cell 1"], ["First Table Cell 2"]], + }, + { + cells: [["First Table Cell 3"], ["First Table Cell 4"]], + }, + ], + }, + }, + { + type: "table", + content: { + type: "tableContent", + rows: [ + { + cells: [["Second Table Cell 1"], ["Second Table Cell 2"]], + }, + { + cells: [["Second Table Cell 3"], ["Second Table Cell 4"]], + }, + ], + }, + }, + ], + getSelection: (doc) => { + const startPos = getPosOfTextNode(doc, "First Table Cell 3"); + const endPos = getPosOfTextNode(doc, "Second Table Cell 2", true); + + return TextSelection.create(doc, startPos + 1, endPos - 1); + }, + }, + executeTest: testGetSelectionCutBlocks, + }, +]; diff --git a/tests/src/unit/core/selection/getSelection/runTests.test.ts b/tests/src/unit/core/selection/getSelection/runTests.test.ts new file mode 100644 index 0000000000..37ae4363de --- /dev/null +++ b/tests/src/unit/core/selection/getSelection/runTests.test.ts @@ -0,0 +1,30 @@ +import { describe, it } from "vitest"; + +import { createTestEditor } from "../../createTestEditor.js"; +import { testSchema } from "../../testSchema.js"; +import { + getSelectionTestInstancesRegular, + getSelectionTestInstancesCutblocks, +} from "./getSelectionTestInstances.js"; + +// Tests for getting the BlockNote selection from a given Prosemirror +// selection. +describe("Get selection tests (regular)", () => { + const getEditor = createTestEditor(testSchema); + + for (const { testCase, executeTest } of getSelectionTestInstancesRegular) { + it(`${testCase.name}`, async () => { + await executeTest(getEditor(), testCase); + }); + } +}); + +describe("Get selection tests (cut blocks)", () => { + const getEditor = createTestEditor(testSchema); + + for (const { testCase, executeTest } of getSelectionTestInstancesCutblocks) { + it(`${testCase.name}`, async () => { + await executeTest(getEditor(), testCase); + }); + } +}); diff --git a/tests/src/unit/core/selection/incrementSelection/__snapshots__/end/basic.txt b/tests/src/unit/core/selection/incrementSelection/__snapshots__/end/basic.txt new file mode 100644 index 0000000000..6775bc977e --- /dev/null +++ b/tests/src/unit/core/selection/incrementSelection/__snapshots__/end/basic.txt @@ -0,0 +1,276 @@ +{"_meta":{"startPos":0,"endPos":0},"blocks":[]} +{"_meta":{"startPos":0,"endPos":0},"blocks":[]} +{"_meta":{"startPos":0,"endPos":0},"blocks":[]} +{"_meta":{"startPos":0,"endPos":0},"blocks":[]} +{"_meta":{"startPos":0,"endPos":4},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"H","styles":{}}],"children":[]}],"blockCutAtEnd":"1"} +{"_meta":{"startPos":0,"endPos":5},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"He","styles":{}}],"children":[]}],"blockCutAtEnd":"1"} +{"_meta":{"startPos":0,"endPos":6},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Hea","styles":{}}],"children":[]}],"blockCutAtEnd":"1"} +{"_meta":{"startPos":0,"endPos":7},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Head","styles":{}}],"children":[]}],"blockCutAtEnd":"1"} +{"_meta":{"startPos":0,"endPos":8},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Headi","styles":{}}],"children":[]}],"blockCutAtEnd":"1"} +{"_meta":{"startPos":0,"endPos":9},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Headin","styles":{}}],"children":[]}],"blockCutAtEnd":"1"} +{"_meta":{"startPos":0,"endPos":10},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading","styles":{}}],"children":[]}],"blockCutAtEnd":"1"} +{"_meta":{"startPos":0,"endPos":11},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading ","styles":{}}],"children":[]}],"blockCutAtEnd":"1"} +{"_meta":{"startPos":0,"endPos":13},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":13},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":13},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":13},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":13},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":17},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"N","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":18},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Ne","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":19},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nes","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":20},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nest","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":21},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Neste","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":22},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":23},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested ","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":24},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested P","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":25},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Pa","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":26},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Par","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":27},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Para","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":28},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Parag","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":29},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragr","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":30},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragra","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":31},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragrap","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":32},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":33},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph ","styles":{}}],"children":[]}]}],"blockCutAtEnd":"2"} +{"_meta":{"startPos":0,"endPos":36},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":36},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":36},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":36},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":36},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":39},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"N","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":40},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Ne","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":41},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nes","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":42},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nest","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":43},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Neste","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":44},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":45},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested ","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":46},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested P","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":47},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Pa","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":48},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Par","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":49},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Para","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":50},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Parag","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":51},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragr","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":52},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragra","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":53},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragrap","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":54},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":55},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph ","styles":{}}],"children":[]}]}],"blockCutAtEnd":"3"} +{"_meta":{"startPos":0,"endPos":58},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":58},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":58},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":58},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":58},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":61},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"N","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":62},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Ne","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":63},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nes","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":64},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nest","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":65},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Neste","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":66},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":67},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested ","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":68},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested P","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":69},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Pa","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":70},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Par","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":71},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Para","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":72},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Parag","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":73},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragr","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":74},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragra","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":75},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragrap","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":76},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":77},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph ","styles":{}}],"children":[]}]}],"blockCutAtEnd":"4"} +{"_meta":{"startPos":0,"endPos":82},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":82},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":82},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":82},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":82},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":82},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":82},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":85},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"H","styles":{}}],"children":[]}],"blockCutAtEnd":"5"} +{"_meta":{"startPos":0,"endPos":86},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"He","styles":{}}],"children":[]}],"blockCutAtEnd":"5"} +{"_meta":{"startPos":0,"endPos":87},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Hea","styles":{}}],"children":[]}],"blockCutAtEnd":"5"} +{"_meta":{"startPos":0,"endPos":88},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Head","styles":{}}],"children":[]}],"blockCutAtEnd":"5"} +{"_meta":{"startPos":0,"endPos":89},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Headi","styles":{}}],"children":[]}],"blockCutAtEnd":"5"} +{"_meta":{"startPos":0,"endPos":90},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Headin","styles":{}}],"children":[]}],"blockCutAtEnd":"5"} +{"_meta":{"startPos":0,"endPos":91},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading","styles":{}}],"children":[]}],"blockCutAtEnd":"5"} +{"_meta":{"startPos":0,"endPos":92},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading ","styles":{}}],"children":[]}],"blockCutAtEnd":"5"} +{"_meta":{"startPos":0,"endPos":94},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":94},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":94},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":94},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":94},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":98},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"N","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":99},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Ne","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":100},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nes","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":101},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nest","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":102},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Neste","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":103},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":104},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested ","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":105},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested P","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":106},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Pa","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":107},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Par","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":108},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Para","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":109},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Parag","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":110},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragr","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":111},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragra","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":112},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragrap","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":113},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":114},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph ","styles":{}}],"children":[]}]}],"blockCutAtEnd":"6"} +{"_meta":{"startPos":0,"endPos":117},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":117},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":117},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":117},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":117},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":120},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"N","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":121},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Ne","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":122},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nes","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":123},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nest","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":124},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Neste","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":125},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":126},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested ","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":127},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested P","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":128},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Pa","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":129},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Par","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":130},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Para","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":131},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Parag","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":132},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragr","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":133},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragra","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":134},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragrap","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":135},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":136},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph ","styles":{}}],"children":[]}]}],"blockCutAtEnd":"7"} +{"_meta":{"startPos":0,"endPos":139},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":139},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":139},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":139},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":139},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":142},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"N","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":143},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Ne","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":144},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nes","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":145},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nest","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":146},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Neste","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":147},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":148},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested ","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":149},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested P","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":150},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Pa","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":151},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Par","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":152},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Para","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":153},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Parag","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":154},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragr","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":155},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragra","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":156},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragrap","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":157},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":158},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph ","styles":{}}],"children":[]}]}],"blockCutAtEnd":"8"} +{"_meta":{"startPos":0,"endPos":163},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":163},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":163},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":163},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":163},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":163},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":163},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]}]} +{"_meta":{"startPos":0,"endPos":166},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"B","styles":{"bold":true}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":167},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bo","styles":{"bold":true}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":168},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bol","styles":{"bold":true}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":169},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":170},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"I","styles":{"italic":true}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":171},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"It","styles":{"italic":true}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":172},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Ita","styles":{"italic":true}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":173},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Ital","styles":{"italic":true}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":174},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Itali","styles":{"italic":true}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":175},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":176},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"R","styles":{}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":177},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Re","styles":{}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":178},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Reg","styles":{}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":179},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regu","styles":{}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":180},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regul","styles":{}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":181},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regula","styles":{}}],"children":[]}],"blockCutAtEnd":"9"} +{"_meta":{"startPos":0,"endPos":183},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":183},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":183},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":183},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[]}]} +{"_meta":{"startPos":0,"endPos":186},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[]}]}],"blockCutAtEnd":"10"} +{"_meta":{"startPos":0,"endPos":186},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[]}]}],"blockCutAtEnd":"10"} +{"_meta":{"startPos":0,"endPos":186},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[]}]}],"blockCutAtEnd":"10"} +{"_meta":{"startPos":0,"endPos":186},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[]}]}],"blockCutAtEnd":"10"} +{"_meta":{"startPos":0,"endPos":190},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"N","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":191},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Ne","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":192},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nes","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":193},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nest","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":194},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Neste","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":195},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":196},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested ","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":197},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested P","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":198},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Pa","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":199},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Par","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":200},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Para","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":201},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Parag","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":202},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragr","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":203},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragra","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":204},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragrap","styles":{}}],"children":[]}]}]}],"blockCutAtEnd":"11"} +{"_meta":{"startPos":0,"endPos":211},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]}]} +{"_meta":{"startPos":0,"endPos":211},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]}]} +{"_meta":{"startPos":0,"endPos":211},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]}]} +{"_meta":{"startPos":0,"endPos":211},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]}]} +{"_meta":{"startPos":0,"endPos":211},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]}]} +{"_meta":{"startPos":0,"endPos":211},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]}]} +{"_meta":{"startPos":0,"endPos":211},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]}]} +{"_meta":{"startPos":0,"endPos":211},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]}]} +{"_meta":{"startPos":0,"endPos":211},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]}]} +{"_meta":{"startPos":0,"endPos":211},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]}]} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":217},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"T","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":218},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Ta","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":219},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Tab","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":220},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Tabl","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":221},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":222},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table ","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":223},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table C","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":224},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Ce","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":225},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cel","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":228},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":228},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":228},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":231},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"T","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":232},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Ta","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":233},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Tab","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":234},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Tabl","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":235},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":236},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table ","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":237},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table C","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":238},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Ce","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":239},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cel","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":243},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":243},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":243},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":243},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":243},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":247},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"T","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":248},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Ta","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":249},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Tab","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":250},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Tabl","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":251},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":252},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table ","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":253},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table C","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":254},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Ce","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":255},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cel","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":258},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":258},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":258},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":261},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"T","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":262},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Ta","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":263},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Tab","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":264},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Tabl","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":265},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":266},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table ","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":267},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table C","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":268},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Ce","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":269},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cel","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtEnd":"12"} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} diff --git a/tests/src/unit/core/selection/incrementSelection/__snapshots__/start/basic.txt b/tests/src/unit/core/selection/incrementSelection/__snapshots__/start/basic.txt new file mode 100644 index 0000000000..1c22aab9ac --- /dev/null +++ b/tests/src/unit/core/selection/incrementSelection/__snapshots__/start/basic.txt @@ -0,0 +1,276 @@ +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":0,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":4,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"eading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"1"} +{"_meta":{"startPos":5,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"ading 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"1"} +{"_meta":{"startPos":6,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"ding 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"1"} +{"_meta":{"startPos":7,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"ing 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"1"} +{"_meta":{"startPos":8,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"ng 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"1"} +{"_meta":{"startPos":9,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"g 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"1"} +{"_meta":{"startPos":10,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":" 1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"1"} +{"_meta":{"startPos":11,"endPos":276},"blocks":[{"id":"1","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"1","styles":{}}],"children":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"1"} +{"_meta":{"startPos":13,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":13,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":13,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":13,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":13,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":17,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ested Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":18,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"sted Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":19,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ted Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":20,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ed Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":21,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"d Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":22,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":" Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":23,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Paragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":24,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":25,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ragraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":26,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"agraph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":27,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"graph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":28,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"raph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":29,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":30,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ph 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":31,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"h 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":32,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":" 1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":33,"endPos":276},"blocks":[{"id":"2","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"1","styles":{}}],"children":[]},{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"2"} +{"_meta":{"startPos":36,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":36,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":36,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":36,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":36,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":39,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ested Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":40,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"sted Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":41,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ted Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":42,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ed Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":43,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"d Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":44,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":" Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":45,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Paragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":46,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":47,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ragraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":48,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"agraph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":49,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"graph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":50,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"raph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":51,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":52,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ph 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":53,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"h 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":54,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":" 2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":55,"endPos":276},"blocks":[{"id":"3","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"2","styles":{}}],"children":[]},{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"3"} +{"_meta":{"startPos":58,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":58,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":58,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":58,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":58,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":61,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ested Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":62,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"sted Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":63,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ted Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":64,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ed Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":65,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"d Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":66,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":" Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":67,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Paragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":68,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":69,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ragraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":70,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"agraph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":71,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"graph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":72,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"raph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":73,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":74,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ph 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":75,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"h 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":76,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":" 3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":77,"endPos":276},"blocks":[{"id":"4","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"3","styles":{}}],"children":[]},{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"4"} +{"_meta":{"startPos":82,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":82,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":82,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":82,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":82,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":82,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":82,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Heading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":85,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"eading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"5"} +{"_meta":{"startPos":86,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"ading 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"5"} +{"_meta":{"startPos":87,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"ding 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"5"} +{"_meta":{"startPos":88,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"ing 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"5"} +{"_meta":{"startPos":89,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"ng 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"5"} +{"_meta":{"startPos":90,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"g 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"5"} +{"_meta":{"startPos":91,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":" 2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"5"} +{"_meta":{"startPos":92,"endPos":276},"blocks":[{"id":"5","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"2","styles":{}}],"children":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]}]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"5"} +{"_meta":{"startPos":94,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":94,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":94,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":94,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":94,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":98,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ested Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":99,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"sted Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":100,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ted Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":101,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ed Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":102,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"d Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":103,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":" Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":104,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Paragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":105,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":106,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ragraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":107,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"agraph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":108,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"graph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":109,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"raph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":110,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":111,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ph 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":112,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"h 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":113,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":" 1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":114,"endPos":276},"blocks":[{"id":"6","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"1","styles":{}}],"children":[]},{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"6"} +{"_meta":{"startPos":117,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":117,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":117,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":117,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":117,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":120,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ested Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":121,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"sted Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":122,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ted Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":123,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ed Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":124,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"d Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":125,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":" Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":126,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Paragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":127,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":128,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ragraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":129,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"agraph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":130,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"graph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":131,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"raph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":132,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":133,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ph 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":134,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"h 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":135,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":" 2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":136,"endPos":276},"blocks":[{"id":"7","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"2","styles":{}}],"children":[]},{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"7"} +{"_meta":{"startPos":139,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":139,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":139,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":139,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":139,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":142,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ested Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":143,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"sted Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":144,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ted Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":145,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ed Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":146,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"d Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":147,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":" Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":148,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Paragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":149,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":150,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ragraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":151,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"agraph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":152,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"graph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":153,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"raph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":154,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":155,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ph 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":156,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"h 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":157,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":" 3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":158,"endPos":276},"blocks":[{"id":"8","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"3","styles":{}}],"children":[]},{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"8"} +{"_meta":{"startPos":163,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":163,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":163,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":163,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":163,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":163,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":163,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Bold","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":166,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"old","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":167,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"ld","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":168,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"d","styles":{"bold":true}},{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":169,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Italic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":170,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"talic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":171,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"alic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":172,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"lic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":173,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"ic","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":174,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"c","styles":{"italic":true}},{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":175,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"Regular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":176,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"egular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":177,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"gular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":178,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"ular","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":179,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"lar","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":180,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"ar","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":181,"endPos":276},"blocks":[{"id":"9","type":"heading","props":{"textColor":"red","backgroundColor":"default","textAlignment":"left","level":2},"content":[{"type":"text","text":"r","styles":{}}],"children":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"9"} +{"_meta":{"startPos":183,"endPos":276},"blocks":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":183,"endPos":276},"blocks":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":183,"endPos":276},"blocks":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":183,"endPos":276},"blocks":[{"id":"10","type":"image","props":{"backgroundColor":"default","textAlignment":"left","name":"","url":"https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg","caption":"","showPreview":true},"children":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]}]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":186,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":186,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":186,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":186,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Nested Paragraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":190,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ested Paragraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":191,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"sted Paragraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":192,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ted Paragraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":193,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ed Paragraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":194,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"d Paragraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":195,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":" Paragraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":196,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"Paragraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":197,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aragraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":198,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ragraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":199,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"agraph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":200,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"graph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":201,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"raph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":202,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"aph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":203,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"ph","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":204,"endPos":276},"blocks":[{"id":"11","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"h","styles":{}}],"children":[]},{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"11"} +{"_meta":{"startPos":211,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":211,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":211,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":211,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":211,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":211,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":211,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":211,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":211,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":211,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":211,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":211,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}]} +{"_meta":{"startPos":217,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"able Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":218,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"ble Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":219,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"le Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":220,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"e Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":221,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":" Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":222,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":223,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"ell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":224,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"ll","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":225,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"l","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":228,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":228,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":228,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":228,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":228,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":231,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"able Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":232,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"ble Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":233,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"le Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":234,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"e Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":235,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":" Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":236,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":237,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"ell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":238,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"ll","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":239,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"l","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]},{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":243,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":243,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":243,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":243,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":243,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":243,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":243,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":247,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"able Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":248,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"ble Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":249,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"le Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":250,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"e Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":251,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":" Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":252,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":253,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"ell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":254,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"ll","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":255,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null,null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"l","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}},{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":258,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":258,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":258,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":258,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":258,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Table Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":261,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"able Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":262,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"ble Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":263,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"le Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":264,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"e Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":265,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":" Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":266,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"Cell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":267,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"ell","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":268,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"ll","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":269,"endPos":276},"blocks":[{"id":"12","type":"table","props":{"textColor":"default"},"content":{"type":"tableContent","columnWidths":[null],"rows":[{"cells":[{"type":"tableCell","content":[{"type":"text","text":"l","styles":{}}],"props":{"colspan":1,"rowspan":1,"backgroundColor":"default","textColor":"default","textAlignment":"left"}}]}]},"children":[]}],"blockCutAtStart":"12"} +{"_meta":{"startPos":276,"endPos":276},"blocks":[]} +{"_meta":{"startPos":276,"endPos":276},"blocks":[]} +{"_meta":{"startPos":276,"endPos":276},"blocks":[]} +{"_meta":{"startPos":276,"endPos":276},"blocks":[]} +{"_meta":{"startPos":276,"endPos":276},"blocks":[]} +{"_meta":{"startPos":276,"endPos":276},"blocks":[]} diff --git a/tests/src/unit/core/selection/incrementSelection/incrementSelectionTestInstances.ts b/tests/src/unit/core/selection/incrementSelection/incrementSelectionTestInstances.ts new file mode 100644 index 0000000000..bf05d22692 --- /dev/null +++ b/tests/src/unit/core/selection/incrementSelection/incrementSelectionTestInstances.ts @@ -0,0 +1,163 @@ +import { + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema, +} from "../../testSchema.js"; +import { IncrementSelectionTestCase } from "../../../shared/selection/incrementSelection/incrementSelectionTestCase.js"; +import { + testIncrementSelectionEnd, + testIncrementSelectionStart, +} from "../../../shared/selection/incrementSelection/incrementSelectionTestExecutors.js"; +import { TestInstance } from "../../../types.js"; + +export const incrementSelectionTestInstancesStart: TestInstance< + IncrementSelectionTestCase< + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema + >, + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema +>[] = [ + { + testCase: { + name: "basic", + document: [ + { + type: "heading", + props: { + level: 2, + textColor: "red", + }, + content: "Heading 1", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + { + type: "paragraph", + content: "Nested Paragraph 2", + }, + { + type: "paragraph", + content: "Nested Paragraph 3", + }, + ], + }, + { + type: "heading", + props: { + level: 2, + textColor: "red", + }, + content: "Heading 2", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + { + type: "paragraph", + content: "Nested Paragraph 2", + }, + { + type: "paragraph", + content: "Nested Paragraph 3", + }, + ], + }, + { + type: "heading", + props: { + level: 2, + textColor: "red", + }, + content: [ + { + type: "text", + text: "Bold", + styles: { + bold: true, + }, + }, + { + type: "text", + text: "Italic", + styles: { + italic: true, + }, + }, + { + type: "text", + text: "Regular", + styles: {}, + }, + ], + children: [ + { + type: "image", + props: { + url: "https://ralfvanveen.com/wp-content/uploads/2021/06/Placeholder-_-Glossary.svg", + }, + children: [ + { + type: "paragraph", + content: "Nested Paragraph", + }, + ], + }, + ], + }, + { + type: "table", + content: { + type: "tableContent", + rows: [ + { + cells: ["Table Cell", "Table Cell"], + }, + { + cells: ["Table Cell", "Table Cell"], + }, + ], + }, + // Not needed as selections starting in table cells will get snapped to + // the table boundaries. + // children: [ + // { + // type: "table", + // content: { + // type: "tableContent", + // rows: [ + // { + // cells: ["Table Cell", "Table Cell"], + // }, + // { + // cells: ["Table Cell", "Table Cell"], + // }, + // ], + // }, + // }, + // ], + }, + ], + }, + executeTest: testIncrementSelectionStart, + }, +]; + +export const incrementSelectionTestInstancesEnd: TestInstance< + IncrementSelectionTestCase< + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema + >, + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema +>[] = incrementSelectionTestInstancesStart.map(({ testCase }) => ({ + testCase, + executeTest: testIncrementSelectionEnd, +})); diff --git a/tests/src/unit/core/selection/incrementSelection/runTests.test.ts b/tests/src/unit/core/selection/incrementSelection/runTests.test.ts new file mode 100644 index 0000000000..8f03a96cfa --- /dev/null +++ b/tests/src/unit/core/selection/incrementSelection/runTests.test.ts @@ -0,0 +1,33 @@ +import { describe, it } from "vitest"; + +import { createTestEditor } from "../../createTestEditor.js"; +import { testSchema } from "../../testSchema.js"; +import { + incrementSelectionTestInstancesEnd, + incrementSelectionTestInstancesStart, +} from "./incrementSelectionTestInstances.js"; + +// Tests for getting the BlockNote selection while incrementing the ProseMirror +// selection to cover a wide range of cases. +describe("Increment selection tests (start)", () => { + const getEditor = createTestEditor(testSchema); + + for (const { + testCase, + executeTest, + } of incrementSelectionTestInstancesStart) { + it(`${testCase.name}`, async () => { + await executeTest(getEditor(), testCase); + }); + } +}); + +describe("Increment selection tests (end)", () => { + const getEditor = createTestEditor(testSchema); + + for (const { testCase, executeTest } of incrementSelectionTestInstancesEnd) { + it(`${testCase.name}`, async () => { + await executeTest(getEditor(), testCase); + }); + } +}); diff --git a/tests/src/unit/core/selection/textCursorPosition/__snapshots__/basic.json b/tests/src/unit/core/selection/textCursorPosition/__snapshots__/basic.json new file mode 100644 index 0000000000..179eecf700 --- /dev/null +++ b/tests/src/unit/core/selection/textCursorPosition/__snapshots__/basic.json @@ -0,0 +1,54 @@ +{ + "block": { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 2", + "type": "text", + }, + ], + "id": "target", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + "nextBlock": { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 3", + "type": "text", + }, + ], + "id": "2", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + "parentBlock": undefined, + "prevBlock": { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 1", + "type": "text", + }, + ], + "id": "1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/textCursorPosition/__snapshots__/nested.json b/tests/src/unit/core/selection/textCursorPosition/__snapshots__/nested.json new file mode 100644 index 0000000000..109e0d65a0 --- /dev/null +++ b/tests/src/unit/core/selection/textCursorPosition/__snapshots__/nested.json @@ -0,0 +1,122 @@ +{ + "block": { + "children": [], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 2", + "type": "text", + }, + ], + "id": "target", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + "nextBlock": { + "children": [], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 3", + "type": "text", + }, + ], + "id": "3", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + "parentBlock": { + "children": [ + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 1", + "type": "text", + }, + ], + "id": "2", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 2", + "type": "text", + }, + ], + "id": "target", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + { + "children": [], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 3", + "type": "text", + }, + ], + "id": "3", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + ], + "content": [ + { + "styles": {}, + "text": "Paragraph 1", + "type": "text", + }, + ], + "id": "1", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + "prevBlock": { + "children": [], + "content": [ + { + "styles": {}, + "text": "Nested Paragraph 1", + "type": "text", + }, + ], + "id": "2", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/textCursorPosition/__snapshots__/noSiblings.json b/tests/src/unit/core/selection/textCursorPosition/__snapshots__/noSiblings.json new file mode 100644 index 0000000000..d624ef389a --- /dev/null +++ b/tests/src/unit/core/selection/textCursorPosition/__snapshots__/noSiblings.json @@ -0,0 +1,22 @@ +{ + "block": { + "children": [], + "content": [ + { + "styles": {}, + "text": "Paragraph 1", + "type": "text", + }, + ], + "id": "target", + "props": { + "backgroundColor": "default", + "textAlignment": "left", + "textColor": "default", + }, + "type": "paragraph", + }, + "nextBlock": undefined, + "parentBlock": undefined, + "prevBlock": undefined, +} \ No newline at end of file diff --git a/tests/src/unit/core/selection/textCursorPosition/runTests.test.ts b/tests/src/unit/core/selection/textCursorPosition/runTests.test.ts new file mode 100644 index 0000000000..ca145074db --- /dev/null +++ b/tests/src/unit/core/selection/textCursorPosition/runTests.test.ts @@ -0,0 +1,49 @@ +import { describe, it } from "vitest"; + +import { createTestEditor } from "../../createTestEditor.js"; +import { testSchema } from "../../testSchema.js"; +import { + getTextCursorPositionTestInstancesEnd, + getTextCursorPositionTestInstancesGetAndSet, + getTextCursorPositionTestInstancesStart, +} from "./textCursorPositionTestInstances.js"; + +// Tests for setting and getting the position of the text cursor. +describe("Text cursor position (set and get)", () => { + const getEditor = createTestEditor(testSchema); + + for (const { + testCase, + executeTest, + } of getTextCursorPositionTestInstancesGetAndSet) { + it(`${testCase.name}`, async () => { + await executeTest(getEditor(), testCase); + }); + } +}); + +describe("Text cursor position (start)", () => { + const getEditor = createTestEditor(testSchema); + + for (const { + testCase, + executeTest, + } of getTextCursorPositionTestInstancesStart) { + it(`${testCase.name}`, async () => { + await executeTest(getEditor(), testCase); + }); + } +}); + +describe("Text cursor position (end)", () => { + const getEditor = createTestEditor(testSchema); + + for (const { + testCase, + executeTest, + } of getTextCursorPositionTestInstancesEnd) { + it(`${testCase.name}`, async () => { + await executeTest(getEditor(), testCase); + }); + } +}); diff --git a/tests/src/unit/core/selection/textCursorPosition/textCursorPositionTestInstances.ts b/tests/src/unit/core/selection/textCursorPosition/textCursorPositionTestInstances.ts new file mode 100644 index 0000000000..947e801f1b --- /dev/null +++ b/tests/src/unit/core/selection/textCursorPosition/textCursorPositionTestInstances.ts @@ -0,0 +1,121 @@ +import { + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema, +} from "../../testSchema.js"; +import { TextCursorPositionTestCase } from "../../../shared/selection/textCursorPosition/textCursorPositionTestCase.js"; +import { + testTextCursorPositionEnd, + testTextCursorPositionSetAndGet, + testTextCursorPositionStart, +} from "../../../shared/selection/textCursorPosition/textCursorPositionTestExecutors.js"; +import { TestInstance } from "../../../types.js"; + +export const getTextCursorPositionTestInstancesGetAndSet: TestInstance< + TextCursorPositionTestCase< + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema + >, + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema +>[] = [ + { + testCase: { + name: "basic", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + }, + { + id: "target", + type: "paragraph", + content: "Paragraph 2", + }, + { + type: "paragraph", + content: "Paragraph 3", + }, + ], + }, + executeTest: testTextCursorPositionSetAndGet, + }, + { + testCase: { + name: "noSiblings", + document: [ + { + id: "target", + type: "paragraph", + content: "Paragraph 1", + }, + ], + }, + executeTest: testTextCursorPositionSetAndGet, + }, + { + testCase: { + name: "nested", + document: [ + { + type: "paragraph", + content: "Paragraph 1", + children: [ + { + type: "paragraph", + content: "Nested Paragraph 1", + }, + { + id: "target", + type: "paragraph", + content: "Nested Paragraph 2", + }, + { + type: "paragraph", + content: "Nested Paragraph 3", + }, + ], + }, + ], + }, + executeTest: testTextCursorPositionSetAndGet, + }, +]; + +export const getTextCursorPositionTestInstancesStart: TestInstance< + TextCursorPositionTestCase< + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema + >, + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema +>[] = [ + { + testCase: getTextCursorPositionTestInstancesGetAndSet.find( + (test) => test.testCase.name === "basic", + )!.testCase, + executeTest: testTextCursorPositionStart, + }, +]; + +export const getTextCursorPositionTestInstancesEnd: TestInstance< + TextCursorPositionTestCase< + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema + >, + TestBlockSchema, + TestInlineContentSchema, + TestStyleSchema +>[] = [ + { + testCase: getTextCursorPositionTestInstancesGetAndSet.find( + (test) => test.testCase.name === "basic", + )!.testCase, + executeTest: testTextCursorPositionEnd, + }, +]; diff --git a/tests/src/unit/react/formatConversion/export/__snapshots__/html/basicBlockTypes.json b/tests/src/unit/react/formatConversion/export/__snapshots__/html/basicBlockTypes.json index 1a9bd562f2..9d20bd5e75 100644 --- a/tests/src/unit/react/formatConversion/export/__snapshots__/html/basicBlockTypes.json +++ b/tests/src/unit/react/formatConversion/export/__snapshots__/html/basicBlockTypes.json @@ -5,17 +5,17 @@ { "styles": {}, "text": "Heading 1", - "type": "text", - }, + "type": "text" + } ], "id": "1", "props": { "backgroundColor": "default", "level": 1, "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "heading", + "type": "heading" }, { "children": [], @@ -23,17 +23,17 @@ { "styles": {}, "text": "Heading 2", - "type": "text", - }, + "type": "text" + } ], "id": "2", "props": { "backgroundColor": "default", "level": 2, "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "heading", + "type": "heading" }, { "children": [], @@ -41,17 +41,17 @@ { "styles": {}, "text": "Heading 3", - "type": "text", - }, + "type": "text" + } ], "id": "3", "props": { "backgroundColor": "default", "level": 3, "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "heading", + "type": "heading" }, { "children": [], @@ -59,16 +59,16 @@ { "styles": {}, "text": "Paragraph", - "type": "text", - }, + "type": "text" + } ], "id": "4", "props": { "backgroundColor": "default", "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "paragraph", + "type": "paragraph" }, { "children": [], @@ -78,12 +78,11 @@ "backgroundColor": "default", "caption": "Image Caption", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", - "url": "exampleURL", + "url": "exampleURL" }, - "type": "image", + "type": "image" }, { "children": [], @@ -91,53 +90,53 @@ { "styles": {}, "text": "None ", - "type": "text", + "type": "text" }, { "styles": { - "bold": true, + "bold": true }, "text": "Bold ", - "type": "text", + "type": "text" }, { "styles": { - "italic": true, + "italic": true }, "text": "Italic ", - "type": "text", + "type": "text" }, { "styles": { - "underline": true, + "underline": true }, "text": "Underline ", - "type": "text", + "type": "text" }, { "styles": { - "strike": true, + "strike": true }, "text": "Strikethrough ", - "type": "text", + "type": "text" }, { "styles": { "bold": true, "italic": true, "strike": true, - "underline": true, + "underline": true }, "text": "All", - "type": "text", - }, + "type": "text" + } ], "id": "6", "props": { "backgroundColor": "default", "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "paragraph", - }, -] \ No newline at end of file + "type": "paragraph" + } +] diff --git a/tests/src/unit/react/formatConversion/export/__snapshots__/html/deepNestedContent.json b/tests/src/unit/react/formatConversion/export/__snapshots__/html/deepNestedContent.json index 959dbbcd5a..51437ec842 100644 --- a/tests/src/unit/react/formatConversion/export/__snapshots__/html/deepNestedContent.json +++ b/tests/src/unit/react/formatConversion/export/__snapshots__/html/deepNestedContent.json @@ -5,16 +5,16 @@ { "styles": {}, "text": "Outer 1 Div Before", - "type": "text", - }, + "type": "text" + } ], "id": "1", "props": { "backgroundColor": "default", "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "paragraph", + "type": "paragraph" }, { "children": [], @@ -22,16 +22,16 @@ { "styles": {}, "text": " Outer 2 Div Before", - "type": "text", - }, + "type": "text" + } ], "id": "2", "props": { "backgroundColor": "default", "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "paragraph", + "type": "paragraph" }, { "children": [], @@ -39,16 +39,16 @@ { "styles": {}, "text": " Outer 3 Div Before", - "type": "text", - }, + "type": "text" + } ], "id": "3", "props": { "backgroundColor": "default", "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "paragraph", + "type": "paragraph" }, { "children": [], @@ -56,16 +56,16 @@ { "styles": {}, "text": " Outer 4 Div Before", - "type": "text", - }, + "type": "text" + } ], "id": "4", "props": { "backgroundColor": "default", "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "paragraph", + "type": "paragraph" }, { "children": [], @@ -73,17 +73,17 @@ { "styles": {}, "text": "Heading 1", - "type": "text", - }, + "type": "text" + } ], "id": "5", "props": { "backgroundColor": "default", "level": 1, "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "heading", + "type": "heading" }, { "children": [], @@ -91,17 +91,17 @@ { "styles": {}, "text": "Heading 2", - "type": "text", - }, + "type": "text" + } ], "id": "6", "props": { "backgroundColor": "default", "level": 2, "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "heading", + "type": "heading" }, { "children": [], @@ -109,17 +109,17 @@ { "styles": {}, "text": "Heading 3", - "type": "text", - }, + "type": "text" + } ], "id": "7", "props": { "backgroundColor": "default", "level": 3, "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "heading", + "type": "heading" }, { "children": [], @@ -127,16 +127,16 @@ { "styles": {}, "text": "Paragraph", - "type": "text", - }, + "type": "text" + } ], "id": "8", "props": { "backgroundColor": "default", "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "paragraph", + "type": "paragraph" }, { "children": [], @@ -146,82 +146,81 @@ "backgroundColor": "default", "caption": "Image Caption", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", - "url": "exampleURL", + "url": "exampleURL" }, - "type": "image", + "type": "image" }, { "children": [], "content": [ { "styles": { - "bold": true, + "bold": true }, "text": "Bold", - "type": "text", + "type": "text" }, { "styles": {}, "text": " ", - "type": "text", + "type": "text" }, { "styles": { - "italic": true, + "italic": true }, "text": "Italic", - "type": "text", + "type": "text" }, { "styles": {}, "text": " ", - "type": "text", + "type": "text" }, { "styles": { - "underline": true, + "underline": true }, "text": "Underline", - "type": "text", + "type": "text" }, { "styles": {}, "text": " ", - "type": "text", + "type": "text" }, { "styles": { - "strike": true, + "strike": true }, "text": "Strikethrough", - "type": "text", + "type": "text" }, { "styles": {}, "text": " ", - "type": "text", + "type": "text" }, { "styles": { "bold": true, "italic": true, "strike": true, - "underline": true, + "underline": true }, "text": "All", - "type": "text", - }, + "type": "text" + } ], "id": "10", "props": { "backgroundColor": "default", "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "paragraph", + "type": "paragraph" }, { "children": [], @@ -229,15 +228,15 @@ { "styles": {}, "text": " Outer 4 Div After Outer 3 Div After Outer 2 Div After Outer 1 Div After", - "type": "text", - }, + "type": "text" + } ], "id": "11", "props": { "backgroundColor": "default", "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "paragraph", - }, -] \ No newline at end of file + "type": "paragraph" + } +] diff --git a/tests/src/unit/react/formatConversion/export/__snapshots__/html/fakeImageCaption.json b/tests/src/unit/react/formatConversion/export/__snapshots__/html/fakeImageCaption.json index 3964251638..a6c6dc1379 100644 --- a/tests/src/unit/react/formatConversion/export/__snapshots__/html/fakeImageCaption.json +++ b/tests/src/unit/react/formatConversion/export/__snapshots__/html/fakeImageCaption.json @@ -7,12 +7,11 @@ "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", - "url": "exampleURL", + "url": "exampleURL" }, - "type": "image", + "type": "image" }, { "children": [], @@ -20,15 +19,15 @@ { "styles": {}, "text": "Image Caption", - "type": "text", - }, + "type": "text" + } ], "id": "2", "props": { "backgroundColor": "default", "textAlignment": "left", - "textColor": "default", + "textColor": "default" }, - "type": "paragraph", - }, -] \ No newline at end of file + "type": "paragraph" + } +] diff --git a/tests/src/unit/react/formatConversion/export/__snapshots__/html/imageInParagraph.json b/tests/src/unit/react/formatConversion/export/__snapshots__/html/imageInParagraph.json index 28369c981f..48faecbe6d 100644 --- a/tests/src/unit/react/formatConversion/export/__snapshots__/html/imageInParagraph.json +++ b/tests/src/unit/react/formatConversion/export/__snapshots__/html/imageInParagraph.json @@ -7,11 +7,10 @@ "backgroundColor": "default", "caption": "", "name": "", - "previewWidth": 512, "showPreview": true, "textAlignment": "left", - "url": "exampleURL", + "url": "exampleURL" }, - "type": "image", - }, -] \ No newline at end of file + "type": "image" + } +] diff --git a/tests/src/unit/shared/clipboard/clipboardTestUtil.ts b/tests/src/unit/shared/clipboard/clipboardTestUtil.ts new file mode 100644 index 0000000000..99d310551d --- /dev/null +++ b/tests/src/unit/shared/clipboard/clipboardTestUtil.ts @@ -0,0 +1,46 @@ +import { Slice } from "@tiptap/pm/model"; +import { EditorView } from "@tiptap/pm/view"; +import * as pmView from "@tiptap/pm/view"; + +function sliceSingleNode(slice: Slice) { + return slice.openStart === 0 && + slice.openEnd === 0 && + slice.content.childCount === 1 + ? slice.content.firstChild + : null; +} + +// This function is a copy of the `doPaste` function from `@tiptap/pm/view`, +// but made to work in a JSDOM environment. To do this, the `tr.scrollIntoView` +// call has been removed. +// https://github.com/ProseMirror/prosemirror-view/blob/17b508f618c944c54776f8ddac45edcb49970796/src/input.ts#L624 +export function doPaste( + view: EditorView, + text: string, + html: string | null, + preferPlain: boolean, + event: ClipboardEvent, +) { + const slice = (pmView as any).__parseFromClipboard( + view, + text, + html, + preferPlain, + view.state.selection.$from, + ); + if ( + view.someProp("handlePaste", (f) => f(view, event, slice || Slice.empty)) + ) { + return true; + } + if (!slice) { + return false; + } + + const singleNode = sliceSingleNode(slice); + const tr = singleNode + ? view.state.tr.replaceSelectionWith(singleNode, preferPlain) + : view.state.tr.replaceSelection(slice); + view.dispatch(tr.setMeta("paste", true).setMeta("uiEvent", "paste")); + return true; +} diff --git a/tests/src/unit/shared/clipboard/copy/copyTestExecutors.ts b/tests/src/unit/shared/clipboard/copy/copyTestExecutors.ts index 38f3923af3..c91b58dfe4 100644 --- a/tests/src/unit/shared/clipboard/copy/copyTestExecutors.ts +++ b/tests/src/unit/shared/clipboard/copy/copyTestExecutors.ts @@ -8,7 +8,7 @@ import { StyleSchema, } from "@blocknote/core"; -import { setupClipboardTest } from "../../../core/clipboard/clipboardTestUtil.js"; +import { initTestEditor } from "../../testUtil.js"; import { CopyTestCase } from "./copyTestCase.js"; export const testCopyBlockNoteHTML = async < @@ -19,7 +19,7 @@ export const testCopyBlockNoteHTML = async < editor: BlockNoteEditor, testCase: CopyTestCase, ) => { - setupClipboardTest(editor, testCase.document, testCase.getCopySelection); + initTestEditor(editor, testCase.document, testCase.getCopySelection); const { clipboardHTML } = selectedFragmentToHTML( editor.prosemirrorView!, @@ -39,7 +39,7 @@ export const testCopyHTML = async < editor: BlockNoteEditor, testCase: CopyTestCase, ) => { - setupClipboardTest(editor, testCase.document, testCase.getCopySelection); + initTestEditor(editor, testCase.document, testCase.getCopySelection); const { externalHTML } = selectedFragmentToHTML( editor.prosemirrorView!, @@ -59,7 +59,7 @@ export const testCopyMarkdown = async < editor: BlockNoteEditor, testCase: CopyTestCase, ) => { - setupClipboardTest(editor, testCase.document, testCase.getCopySelection); + initTestEditor(editor, testCase.document, testCase.getCopySelection); const { markdown } = selectedFragmentToHTML(editor.prosemirrorView!, editor); diff --git a/tests/src/unit/shared/clipboard/copyPaste/copyPasteTestExecutors.ts b/tests/src/unit/shared/clipboard/copyPaste/copyPasteTestExecutors.ts index 2dc7963a35..dfed76fb79 100644 --- a/tests/src/unit/shared/clipboard/copyPaste/copyPasteTestExecutors.ts +++ b/tests/src/unit/shared/clipboard/copyPaste/copyPasteTestExecutors.ts @@ -7,10 +7,8 @@ import { } from "@blocknote/core"; import { expect } from "vitest"; -import { - doPaste, - setupClipboardTest, -} from "../../../core/clipboard/clipboardTestUtil.js"; +import { initTestEditor } from "../../testUtil.js"; +import { doPaste } from "../clipboardTestUtil.js"; import { CopyPasteTestCase } from "./copyPasteTestCase.js"; export const testCopyPaste = async < @@ -21,7 +19,7 @@ export const testCopyPaste = async < editor: BlockNoteEditor, testCase: CopyPasteTestCase, ) => { - setupClipboardTest(editor, testCase.document, testCase.getCopySelection); + initTestEditor(editor, testCase.document, testCase.getCopySelection); const { clipboardHTML } = selectedFragmentToHTML( editor.prosemirrorView!, diff --git a/tests/src/unit/shared/clipboard/copyPasteEquality/copyPasteEqualityTestExecutors.ts b/tests/src/unit/shared/clipboard/copyPasteEquality/copyPasteEqualityTestExecutors.ts index fde3c1172e..af18a5f4ce 100644 --- a/tests/src/unit/shared/clipboard/copyPasteEquality/copyPasteEqualityTestExecutors.ts +++ b/tests/src/unit/shared/clipboard/copyPasteEquality/copyPasteEqualityTestExecutors.ts @@ -7,10 +7,8 @@ import { } from "@blocknote/core"; import { expect } from "vitest"; -import { - doPaste, - setupClipboardTest, -} from "../../../core/clipboard/clipboardTestUtil.js"; +import { initTestEditor } from "../../testUtil.js"; +import { doPaste } from "../clipboardTestUtil.js"; import { CopyPasteEqualityTestCase } from "./copyPasteEqualityTestCase.js"; export const testCopyPasteEquality = async < @@ -21,11 +19,7 @@ export const testCopyPasteEquality = async < editor: BlockNoteEditor, testCase: CopyPasteEqualityTestCase, ) => { - setupClipboardTest( - editor, - testCase.document, - testCase.getCopyAndPasteSelection, - ); + initTestEditor(editor, testCase.document, testCase.getCopyAndPasteSelection); const { clipboardHTML } = selectedFragmentToHTML( editor.prosemirrorView!, diff --git a/tests/src/unit/shared/clipboard/paste/pasteTestExecutors.ts b/tests/src/unit/shared/clipboard/paste/pasteTestExecutors.ts index 78c7a022bb..8b9305de74 100644 --- a/tests/src/unit/shared/clipboard/paste/pasteTestExecutors.ts +++ b/tests/src/unit/shared/clipboard/paste/pasteTestExecutors.ts @@ -6,10 +6,8 @@ import { } from "@blocknote/core"; import { expect } from "vitest"; -import { - doPaste, - setupClipboardTest, -} from "../../../core/clipboard/clipboardTestUtil.js"; +import { initTestEditor } from "../../testUtil.js"; +import { doPaste } from "../clipboardTestUtil.js"; import { PasteTestCase } from "./pasteTestCase.js"; export const testPasteHTML = async < @@ -20,7 +18,7 @@ export const testPasteHTML = async < editor: BlockNoteEditor, testCase: PasteTestCase, ) => { - setupClipboardTest(editor, testCase.document, testCase.getPasteSelection); + initTestEditor(editor, testCase.document, testCase.getPasteSelection); doPaste( editor.prosemirrorView!, @@ -43,7 +41,7 @@ export const testPasteMarkdown = async < editor: BlockNoteEditor, testCase: PasteTestCase, ) => { - setupClipboardTest(editor, testCase.document, testCase.getPasteSelection); + initTestEditor(editor, testCase.document, testCase.getPasteSelection); doPaste( editor.prosemirrorView!, diff --git a/tests/src/unit/shared/formatConversion/export/exportTestExecutors.ts b/tests/src/unit/shared/formatConversion/export/exportTestExecutors.ts index 60a79911fd..055218bb22 100644 --- a/tests/src/unit/shared/formatConversion/export/exportTestExecutors.ts +++ b/tests/src/unit/shared/formatConversion/export/exportTestExecutors.ts @@ -8,7 +8,7 @@ import { import { prettify } from "htmlfy"; import { expect } from "vitest"; -import { addIdsToBlocks } from "../../../core/formatConversion/formatConversionTestUtil.js"; +import { addIdsToBlocks } from "../formatConversionTestUtil.js"; import { ExportTestCase } from "./exportTestCase.js"; export const testExportBlockNoteHTML = async < diff --git a/tests/src/unit/shared/formatConversion/exportParseEquality/exportParseEqualityTestExecutors.ts b/tests/src/unit/shared/formatConversion/exportParseEquality/exportParseEqualityTestExecutors.ts index 6bc8521d3b..87335ca8f5 100644 --- a/tests/src/unit/shared/formatConversion/exportParseEquality/exportParseEqualityTestExecutors.ts +++ b/tests/src/unit/shared/formatConversion/exportParseEquality/exportParseEqualityTestExecutors.ts @@ -8,10 +8,11 @@ import { } from "@blocknote/core"; import { expect } from "vitest"; +// TODO: fix import and add lint rule, or allow? import { addIdsToBlocks, partialBlocksToBlocksForTesting, -} from "../../../core/formatConversion/formatConversionTestUtil.js"; +} from "../formatConversionTestUtil.js"; import { ExportParseEqualityTestCase } from "./exportParseEqualityTestCase.js"; export const testExportParseEqualityBlockNoteHTML = async < diff --git a/tests/src/unit/core/formatConversion/formatConversionTestUtil.ts b/tests/src/unit/shared/formatConversion/formatConversionTestUtil.ts similarity index 99% rename from tests/src/unit/core/formatConversion/formatConversionTestUtil.ts rename to tests/src/unit/shared/formatConversion/formatConversionTestUtil.ts index 8b6b16f851..8eea1129df 100644 --- a/tests/src/unit/core/formatConversion/formatConversionTestUtil.ts +++ b/tests/src/unit/shared/formatConversion/formatConversionTestUtil.ts @@ -1,3 +1,5 @@ +// TODO: remove duplicate file + import { Block, BlockNoteSchema, diff --git a/tests/src/unit/shared/selection/getSelection/getSelectionTestCase.ts b/tests/src/unit/shared/selection/getSelection/getSelectionTestCase.ts new file mode 100644 index 0000000000..2b10819760 --- /dev/null +++ b/tests/src/unit/shared/selection/getSelection/getSelectionTestCase.ts @@ -0,0 +1,18 @@ +import { + BlockSchema, + InlineContentSchema, + PartialBlock, + StyleSchema, +} from "@blocknote/core"; +import { Node } from "@tiptap/pm/model"; +import { Selection } from "@tiptap/pm/state"; + +export type GetSelectionTestCase< + B extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +> = { + name: string; + document: PartialBlock[]; + getSelection: (pmDoc: Node) => Selection; +}; diff --git a/tests/src/unit/shared/selection/getSelection/getSelectionTestExecutors.ts b/tests/src/unit/shared/selection/getSelection/getSelectionTestExecutors.ts new file mode 100644 index 0000000000..9ff65bfbf4 --- /dev/null +++ b/tests/src/unit/shared/selection/getSelection/getSelectionTestExecutors.ts @@ -0,0 +1,44 @@ +import { expect } from "vitest"; +import { + BlockNoteEditor, + BlockSchema, + InlineContentSchema, + StyleSchema, +} from "@blocknote/core"; + +import { GetSelectionTestCase } from "./getSelectionTestCase.js"; +import { initTestEditor } from "../../testUtil.js"; + +export const testGetSelectionRegular = async < + B extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>( + editor: BlockNoteEditor, + testCase: GetSelectionTestCase, +) => { + initTestEditor(editor, testCase.document, testCase.getSelection); + + const blockNoteSelection = editor.getSelectionCutBlocks(); + + await expect( + JSON.stringify(blockNoteSelection, undefined, 2), + ).toMatchFileSnapshot(`./__snapshots__/regular/${testCase.name}.json`); +}; + +export const testGetSelectionCutBlocks = async < + B extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>( + editor: BlockNoteEditor, + testCase: GetSelectionTestCase, +) => { + initTestEditor(editor, testCase.document, testCase.getSelection); + + const blockNoteSelection = editor.getSelectionCutBlocks(); + + await expect( + JSON.stringify(blockNoteSelection, undefined, 2), + ).toMatchFileSnapshot(`./__snapshots__/cutBlocks/${testCase.name}.json`); +}; diff --git a/tests/src/unit/shared/selection/incrementSelection/incrementSelectionTestCase.ts b/tests/src/unit/shared/selection/incrementSelection/incrementSelectionTestCase.ts new file mode 100644 index 0000000000..86b3aeddfd --- /dev/null +++ b/tests/src/unit/shared/selection/incrementSelection/incrementSelectionTestCase.ts @@ -0,0 +1,15 @@ +import { + BlockSchema, + InlineContentSchema, + PartialBlock, + StyleSchema, +} from "@blocknote/core"; + +export type IncrementSelectionTestCase< + B extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +> = { + name: string; + document: PartialBlock[]; +}; diff --git a/tests/src/unit/shared/selection/incrementSelection/incrementSelectionTestExecutors.ts b/tests/src/unit/shared/selection/incrementSelection/incrementSelectionTestExecutors.ts new file mode 100644 index 0000000000..b33fe10a54 --- /dev/null +++ b/tests/src/unit/shared/selection/incrementSelection/incrementSelectionTestExecutors.ts @@ -0,0 +1,74 @@ +import { expect } from "vitest"; +import { + BlockNoteEditor, + BlockSchema, + InlineContentSchema, + StyleSchema, +} from "@blocknote/core"; +import { TextSelection } from "@tiptap/pm/state"; + +import { IncrementSelectionTestCase } from "./incrementSelectionTestCase.js"; + +export const testIncrementSelectionStart = async < + B extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>( + editor: BlockNoteEditor, + testCase: IncrementSelectionTestCase, +) => { + (window as any).__TEST_OPTIONS.mockID = 0; + editor.replaceBlocks(editor.document, testCase.document); + + const size = editor._tiptapEditor.state.doc.content.size; + let ret = ""; + + for (let i = 0; i < size; i++) { + editor.transact((tr) => + tr.setSelection( + TextSelection.create(editor._tiptapEditor.state.doc, i, size - 1), + ), + ); + + const blockNoteSelection = editor.getSelectionCutBlocks(); + const JSONString = JSON.stringify(blockNoteSelection); + + ret += JSONString + "\n"; + } + + await expect(ret).toMatchFileSnapshot( + `./__snapshots__/start/${testCase.name}.txt`, + ); +}; + +export const testIncrementSelectionEnd = async < + B extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>( + editor: BlockNoteEditor, + testCase: IncrementSelectionTestCase, +) => { + (window as any).__TEST_OPTIONS.mockID = 0; + editor.replaceBlocks(editor.document, testCase.document); + + const size = editor._tiptapEditor.state.doc.content.size; + let ret = ""; + + for (let i = 0; i < size; i++) { + editor.transact((tr) => + tr.setSelection( + TextSelection.create(editor._tiptapEditor.state.doc, 0, i), + ), + ); + + const blockNoteSelection = editor.getSelectionCutBlocks(); + const JSONString = JSON.stringify(blockNoteSelection); + + ret += JSONString + "\n"; + } + + await expect(ret).toMatchFileSnapshot( + `./__snapshots__/end/${testCase.name}.txt`, + ); +}; diff --git a/tests/src/unit/shared/selection/textCursorPosition/textCursorPositionTestCase.ts b/tests/src/unit/shared/selection/textCursorPosition/textCursorPositionTestCase.ts new file mode 100644 index 0000000000..b579971858 --- /dev/null +++ b/tests/src/unit/shared/selection/textCursorPosition/textCursorPositionTestCase.ts @@ -0,0 +1,15 @@ +import { + BlockSchema, + InlineContentSchema, + PartialBlock, + StyleSchema, +} from "@blocknote/core"; + +export type TextCursorPositionTestCase< + B extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +> = { + name: string; + document: PartialBlock[]; +}; diff --git a/tests/src/unit/shared/selection/textCursorPosition/textCursorPositionTestExecutors.ts b/tests/src/unit/shared/selection/textCursorPosition/textCursorPositionTestExecutors.ts new file mode 100644 index 0000000000..e490b2b34c --- /dev/null +++ b/tests/src/unit/shared/selection/textCursorPosition/textCursorPositionTestExecutors.ts @@ -0,0 +1,62 @@ +import { expect } from "vitest"; +import { + BlockNoteEditor, + BlockSchema, + InlineContentSchema, + StyleSchema, +} from "@blocknote/core"; + +import { TextCursorPositionTestCase } from "./textCursorPositionTestCase.js"; +import { initTestEditor } from "../../testUtil.js"; + +export const testTextCursorPositionSetAndGet = async < + B extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>( + editor: BlockNoteEditor, + testCase: TextCursorPositionTestCase, +) => { + initTestEditor(editor, testCase.document); + + editor.setTextCursorPosition("target"); + + expect(editor.getTextCursorPosition()).toMatchFileSnapshot( + `./__snapshots__/${testCase.name}.json`, + ); +}; + +export const testTextCursorPositionStart = async < + B extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>( + editor: BlockNoteEditor, + testCase: TextCursorPositionTestCase, +) => { + initTestEditor(editor, testCase.document); + + editor.setTextCursorPosition("target"); + + expect( + editor.transact((tr) => tr.selection.$from.parentOffset) === 0, + ).toBeTruthy(); +}; + +export const testTextCursorPositionEnd = async < + B extends BlockSchema, + I extends InlineContentSchema, + S extends StyleSchema, +>( + editor: BlockNoteEditor, + testCase: TextCursorPositionTestCase, +) => { + initTestEditor(editor, testCase.document); + + editor.setTextCursorPosition("target", "end"); + + expect( + editor.transact((tr) => tr.selection.$from.parentOffset) === + editor.transact((tr) => tr.selection.$from.node().firstChild!.nodeSize), + ).toBeTruthy(); +}; diff --git a/tests/src/unit/core/clipboard/clipboardTestUtil.ts b/tests/src/unit/shared/testUtil.ts similarity index 52% rename from tests/src/unit/core/clipboard/clipboardTestUtil.ts rename to tests/src/unit/shared/testUtil.ts index f926578b71..301ca6ef9d 100644 --- a/tests/src/unit/core/clipboard/clipboardTestUtil.ts +++ b/tests/src/unit/shared/testUtil.ts @@ -5,10 +5,8 @@ import { PartialBlock, StyleSchema, } from "@blocknote/core"; -import { Node, Slice } from "@tiptap/pm/model"; +import { Node } from "@tiptap/pm/model"; import { Selection } from "@tiptap/pm/state"; -import { EditorView } from "@tiptap/pm/view"; -import * as pmView from "@tiptap/pm/view"; // Helper function to get the position of a text node with given text content. // By default, returns the position just before the node, but can be just after @@ -57,14 +55,16 @@ export const getPosOfTableCellNode = (doc: Node, textContent: string) => { return ret; }; -export const setupClipboardTest = < +// Inits the test editor, resetting the mock block ID counter and optionally +// replacing the document as well as setting the selection. +export const initTestEditor = < B extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema, >( editor: BlockNoteEditor, - document: PartialBlock[], - getSelection: (pmDoc: Node) => Selection, + document?: PartialBlock[], + getSelection?: (pmDoc: Node) => Selection, ) => { if (!editor.prosemirrorView) { throw new Error("Editor view not initialized."); @@ -72,50 +72,11 @@ export const setupClipboardTest = < (window as any).__TEST_OPTIONS.mockID = 0; - editor.replaceBlocks(editor.document, document); - - editor.transact((tr) => tr.setSelection(getSelection(tr.doc))); -}; - -function sliceSingleNode(slice: Slice) { - return slice.openStart === 0 && - slice.openEnd === 0 && - slice.content.childCount === 1 - ? slice.content.firstChild - : null; -} - -// This function is a copy of the `doPaste` function from `@tiptap/pm/view`, -// but made to work in a JSDOM environment. To do this, the `tr.scrollIntoView` -// call has been removed. -// https://github.com/ProseMirror/prosemirror-view/blob/17b508f618c944c54776f8ddac45edcb49970796/src/input.ts#L624 -export function doPaste( - view: EditorView, - text: string, - html: string | null, - preferPlain: boolean, - event: ClipboardEvent, -) { - const slice = (pmView as any).__parseFromClipboard( - view, - text, - html, - preferPlain, - view.state.selection.$from, - ); - if ( - view.someProp("handlePaste", (f) => f(view, event, slice || Slice.empty)) - ) { - return true; - } - if (!slice) { - return false; + if (document) { + editor.replaceBlocks(editor.document, document); } - const singleNode = sliceSingleNode(slice); - const tr = singleNode - ? view.state.tr.replaceSelectionWith(singleNode, preferPlain) - : view.state.tr.replaceSelection(slice); - view.dispatch(tr.setMeta("paste", true).setMeta("uiEvent", "paste")); - return true; -} + if (getSelection) { + editor.transact((tr) => tr.setSelection(getSelection(tr.doc))); + } +}; diff --git a/vitest.workspace.js b/vitest.workspace.js new file mode 100644 index 0000000000..97c66e944d --- /dev/null +++ b/vitest.workspace.js @@ -0,0 +1,77 @@ +import { defineWorkspace } from "vitest/config"; + +export default defineWorkspace([ + "./packages/xl-ai/vite.config.ts", + // "./examples/03-ui-components/link-toolbar-buttons/vite.config.ts", + // "./examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/vite.config.ts", + // "./examples/03-ui-components/09-suggestion-menus-emoji-picker-component/vite.config.ts", + // "./examples/03-ui-components/01-ui-elements-remove/vite.config.ts", + // "./examples/03-ui-components/10-suggestion-menus-grid-mentions/vite.config.ts", + // "./examples/03-ui-components/12-static-formatting-toolbar/vite.config.ts", + // "./packages/xl-docx-exporter/vite.config.ts", + // "./examples/03-ui-components/03-formatting-toolbar-block-type-items/vite.config.ts", + // "./packages/react/vite.config.ts", + // "./playground/vite.config.ts", + // "./packages/server-util/vite.config.ts", + // "./packages/xl-ai-server/vite.config.ts", + // "./packages/shadcn/vite.config.ts", + // "./packages/mantine/vite.config.ts", + // "./packages/xl-pdf-exporter/vite.config.ts", + + // "./examples/03-ui-components/11-uppy-file-panel/vite.config.ts", + // "./packages/core/vite.config.ts", + // "./packages/core/vite.config.bundled.ts", + // "./examples/03-ui-components/02-formatting-toolbar-buttons/vite.config.ts", + // "./packages/ariakit/vite.config.ts", + // "./examples/03-ui-components/05-side-menu-drag-handle-items/vite.config.ts", + // "./examples/03-ui-components/14-experimental-mobile-formatting-toolbar/vite.config.ts", + // "./examples/03-ui-components/13-custom-ui/vite.config.ts", + // "./examples/03-ui-components/04-side-menu-buttons/vite.config.ts", + // "./examples/03-ui-components/06-suggestion-menus-slash-menu-items/vite.config.ts", + // "./examples/03-ui-components/07-suggestion-menus-slash-menu-component/vite.config.ts", + // "./packages/xl-multi-column/vite.config.ts", + // "./examples/06-custom-schema/04-pdf-file-block/vite.config.ts", + // "./examples/06-custom-schema/03-font-style/vite.config.ts", + // "./examples/06-custom-schema/react-custom-blocks/vite.config.ts", + // "./examples/06-custom-schema/react-custom-styles/vite.config.ts", + // "./examples/06-custom-schema/01-alert-block/vite.config.ts", + // "./examples/07-collaboration/02-liveblocks/vite.config.ts", + // "./examples/07-collaboration/03-y-sweet/vite.config.ts", + // "./examples/07-collaboration/01-partykit/vite.config.ts", + // "./examples/05-interoperability/06-converting-blocks-to-docx/vite.config.ts", + // "./examples/05-interoperability/02-converting-blocks-from-html/vite.config.ts", + // "./examples/05-interoperability/03-converting-blocks-to-md/vite.config.ts", + // "./examples/05-custom-schema/react-custom-styles/dist/vite.config.js", + // "./examples/05-interoperability/01-converting-blocks-to-html/vite.config.ts", + // "./examples/04-theming/01-theming-dom-attributes/vite.config.ts", + // "./examples/04-theming/02-changing-font/vite.config.ts", + // "./examples/04-theming/03-theming-css/vite.config.ts", + // "./examples/05-interoperability/04-converting-blocks-from-md/vite.config.ts", + // "./examples/04-theming/04-theming-css-variables/vite.config.ts", + // "./examples/05-interoperability/05-converting-blocks-to-pdf/vite.config.ts", + // "./examples/02-backend/01-file-uploading/vite.config.ts", + // "./examples/04-theming/05-theming-css-variables-code/vite.config.ts", + // "./examples/02-backend/03-s3/vite.config.ts", + // "./examples/02-backend/04-rendering-static-documents/vite.config.ts", + // "./examples/02-backend/02-saving-loading/vite.config.ts", + // "./examples/vanilla-js/react-vanilla-custom-styles/vite.config.ts", + // "./examples/vanilla-js/react-vanilla-custom-inline-content/vite.config.ts", + // "./examples/vanilla-js/react-vanilla-custom-blocks/vite.config.ts", + // "./examples/01-basic/05-removing-default-blocks/vite.config.ts", + // "./examples/01-basic/testing/vite.config.ts", + // "./examples/01-basic/09-shadcn/vite.config.ts", + // "./examples/06-custom-schema/react-custom-inline-content/vite.config.ts", + // "./examples/01-basic/11-custom-placeholder/vite.config.ts", + // "./examples/01-basic/06-block-manipulation/vite.config.ts", + // "./examples/01-basic/02-block-objects/vite.config.ts", + // "./examples/09-ai/01-minimal/vite.config.ts", + // "./examples/01-basic/01-minimal/vite.config.ts", + // "./examples/01-basic/08-ariakit/vite.config.ts", + // "./examples/01-basic/07-selection-blocks/vite.config.ts", + // "./examples/01-basic/03-multi-column/vite.config.ts", + // "./examples/01-basic/10-localization/vite.config.ts", + // "./examples/08-extensions/01-tiptap-arrow-conversion/vite.config.ts", + // "./examples/01-basic/12-multi-editor/vite.config.ts", + // "./examples/06-custom-schema/02-suggestion-menus-mentions/vite.config.ts", + // "./examples/01-basic/04-default-blocks/vite.config.ts" +]);