Simplify the Vercel AI SDK integration by leveraging the internal context.
threadId and parentId are now automatically handled without the need to pass them as a literalAiParent argument.
This release introduces a new, wrapper-aware method to create attachments : client.api.createAttachment. This method is a wrapper around the uploadFile method and the new Attachment constructor. It allows you to create an attachment in a single call, and attach it to the thread/step in the current context.The old method using uploadFile and new Attachment is considered obsolete, although it remains in the SDK for backward compatibility.
Revamp of the OpenAI instrumentation : instead of manually instrumenting each call result, you can now instrument OpenAI globally. Each subsequently call will be logged with no additional code.This new implementation is context-aware and will log the OpenAI calls in the right steps and threads if you use the new wrapper syntax.
If you were using the instrumentation.openai method in your code and upgrade the Literal AI SDK to 0.0.510, you will get the following error at compile time : error TS2554: Expected 0-1 arguments, but got 2..To fix this, you should move the instrumentation.openai call to the top of your code and remove the arguments apart from the optional { tags: []} argument.You can find code examples in the OpenAI Instrumentation guide.
getOrCreatePrompt(). For creating a new Prompt, use getOrCreatePrompt().
A Prompt is fully defined by its name, template_messages, settings and tools. If a prompt already exists for the given arguments, it is returned. Otherwise, a new prompt is created.
/* * @param name The name of the prompt to retrieve or create.* @param templateMessages A list of template messages for the prompt.* @param settings Optional settings for the prompt.* @returns The prompt that was retrieved or created.*/
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Literal AI Documentation","colors":{"primary":"#F80061","light":"#FFE7EB","dark":"#980039"},"favicon":"/favicon.svg","logo":{"light":"https://mintcdn.com/chainlit-5/yVkf8qhp8dsNjo0g/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=yVkf8qhp8dsNjo0g\u0026q=85\u0026s=5041057089add85f6e7b5b730962e5c1","dark":"https://mintcdn.com/chainlit-5/yVkf8qhp8dsNjo0g/logo/logo-dark.svg?fit=max\u0026auto=format\u0026n=yVkf8qhp8dsNjo0g\u0026q=85\u0026s=134f341ff227aa290b94b7c53de36a2a"},"navbar":{"links":[],"primary":{"type":"button","label":"Get Started","href":"https://cloud.getliteral.ai"}},"footer":{"socials":{"twitter":"https://twitter.com/chainlit_io","github":"https://github.com/Chainlit","linkedin":"https://www.linkedin.com/company/chainlit"}},"integrations":{"posthog":{"apiKey":"phc_B5OPGyB2PSuzWeqrrOmUIuIl7tQcroYE8jJDc56ES6Q","apiHost":"https://eu.i.posthog.com"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"chainlit-5","hasAudioNarration":false,"actualSubdomain":"chainlit-5","customDomains":["docs.literalai.com"],"gitSource":{"type":"github","owner":"chainlit","repo":"literalai-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e6138d1fcd719df030fd","collectionId":"eb832854-76a2-4ae8-97c5-a795a2002454","schemaVersion":"v2"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6a21e6138d1fcd719df030fd:success","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Documentation","count":36},{"language":"default","tag":"Integrations","count":10},{"language":"default","tag":"Python Client","count":8},{"language":"default","tag":"API Reference","count":8},{"language":"default","tag":"Get Started","count":6},{"language":"default","tag":"TypeScript Client","count":6},{"language":"default","tag":"Evaluation","count":5},{"language":"default","tag":"Application","count":5},{"language":"default","tag":"Settings","count":4},{"language":"default","tag":"More","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"typescript-client/development/changelog","slug":"/typescript-client/development/changelog","pageMetadata":{"title":"Changelog","description":null,"href":"/typescript-client/development/changelog"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(Heading,{level:`1`,id:`0-1-0-november-12th-2024`,children:[_jsx(_components.code,{children:`0.1.0`}),` (November 12th, 2024)`]}),`\n`,_jsx(Heading,{level:`3`,id:`improvements`,children:`Improvements`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Added `,_jsx(_components.code,{children:`createPromptVariant`}),` API to create `,_jsx(_components.code,{children:`Prompt`}),` variants`]}),`\n`,_jsxs(_components.li,{children:[`Modified `,_jsx(_components.code,{children:`createExperiment`}),` to take as input a `,_jsx(_components.code,{children:`promptVariantId`}),` instead of a `,_jsx(_components.code,{children:`promptId`})]}),`\n`]}),`\n`,_jsxs(Warning,{children:[`Starting with `,_jsx(_components.code,{children:`0.1.0`}),`, you need to have Literal AI version 0.1.0-beta or above to create experiments.`]}),`\n`,_jsxs(Heading,{level:`1`,id:`0-0-520-october-28th-2024`,children:[_jsx(_components.code,{children:`0.0.520`}),` (October 28th, 2024)`]}),`\n`,_jsx(Heading,{level:`3`,id:`improvements-2`,children:`Improvements`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Added fields `,_jsx(_components.code,{children:`label`}),`, `,_jsx(_components.code,{children:`status`}),` and `,_jsx(_components.code,{children:`tags`}),` to `,_jsx(_components.code,{children:`getPromptById`}),` API.`]}),`\n`]}),`\n`,_jsxs(Warning,{children:[`Starting with `,_jsx(_components.code,{children:`0.0.520`}),`, you need to have Literal AI version 0.0.629-beta or above.`]}),`\n`,_jsxs(Heading,{level:`1`,id:`0-0-519-october-21st-2024`,children:[_jsx(_components.code,{children:`0.0.519`}),` (October 21st, 2024)`]}),`\n`,_jsx(Heading,{level:`3`,id:`improvements-3`,children:`Improvements`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Added `,_jsx(_components.code,{children:`release`}),` parameter to Literal AI client constructors`]}),`\n`]}),`\n`,_jsxs(Heading,{level:`1`,id:`0-0-518-september-18th-2024`,children:[_jsx(_components.code,{children:`0.0.518`}),` (September 18th, 2024)`]}),`\n`,_jsx(Heading,{level:`3`,id:`bug-fixes`,children:`Bug fixes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Use getters to lazy load modules`}),`\n`]}),`\n`,_jsxs(Heading,{level:`1`,id:`0-0-517-september-16th-2024`,children:[_jsx(_components.code,{children:`0.0.517`}),` (September 16th, 2024)`]}),`\n`,_jsx(Heading,{level:`3`,id:`improvements-4`,children:`Improvements`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Added link to prompt as URL in the `,_jsx(_components.code,{children:`get_prompt`}),` API`]}),`\n`,_jsxs(_components.li,{children:[`Introduced decorators with `,_jsx(_components.code,{children:`metadata`}),`, `,_jsx(_components.code,{children:`tags`}),` and `,_jsx(_components.code,{children:`stepid`}),` fields`]}),`\n`,_jsxs(_components.li,{children:[`Adjusted integrations to account for `,_jsx(_components.code,{children:`metadata`}),` and `,_jsx(_components.code,{children:`tags`}),` logging`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`bug-fixes-2`,children:`Bug fixes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Made third-party dependencies optional when importing Literal AI client.`}),`\n`]}),`\n`,_jsx(Heading,{level:`1`,id:`0-0-515`,children:_jsx(_components.code,{children:`0.0.515`})}),`\n`,_jsx(Heading,{level:`3`,id:`improvements-5`,children:`Improvements`}),`\n`,_jsx(_components.p,{children:`This version improves compatibility with the LangChain ecosystem, notably with complex LangGraph flows.`}),`\n`,_jsx(Heading,{level:`1`,id:`0-0-514`,children:_jsx(_components.code,{children:`0.0.514`})}),`\n`,_jsx(Heading,{level:`3`,id:`improvements-6`,children:`Improvements`}),`\n`,_jsxs(_components.p,{children:[`Simplify the Vercel AI SDK integration by leveraging the internal context.\n`,_jsx(_components.code,{children:`threadId`}),` and `,_jsx(_components.code,{children:`parentId`}),` are now automatically handled without the need to pass them as a `,_jsx(_components.code,{children:`literalAiParent`}),` argument.`]}),`\n`,_jsx(Heading,{level:`1`,id:`0-0-513`,children:_jsx(_components.code,{children:`0.0.513`})}),`\n`,_jsx(Heading,{level:`3`,id:`improvements-7`,children:`Improvements`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Added option to send a root run ID upon creation of a `,_jsx(_components.code,{children:`Step`})]}),`\n`,_jsxs(_components.li,{children:[`The API `,_jsx(_components.code,{children:`update_prompt_ab_testing`}),` replaces the old `,_jsx(_components.code,{children:`promote_prompt`}),` and extends on it to allow for A/B testing`]}),`\n`]}),`\n`,_jsxs(Warning,{children:[`Starting with `,_jsx(_components.code,{children:`0.0.513`}),`, you need to have Literal AI version `,_jsx(_components.code,{children:`0.0.617-beta`}),` or above.`]}),`\n`,_jsx(Heading,{level:`1`,id:`0-0-512`,children:_jsx(_components.code,{children:`0.0.512`})}),`\n`,_jsx(Heading,{level:`3`,id:`breaking-changes`,children:`Breaking Changes`}),`\n`,_jsx(_components.p,{children:`Instantiation of the TypeScript client was altered to take in an object as argument:`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`>= 0.0.512`,numberOfLines:`4`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` LiteralClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`LITERAL_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiUrl:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`LITERAL_API_URL`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`\u003c 0.0.512`,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` LiteralClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`LITERAL_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`LITERAL_API_URL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`new-features`,children:`New Features`}),`\n`,_jsxs(_components.p,{children:[`This release introduces a new, wrapper-aware method to create attachments : `,_jsx(_components.code,{children:`client.api.createAttachment`}),`. This method is a wrapper around the `,_jsx(_components.code,{children:`uploadFile`}),` method and the `,_jsx(_components.code,{children:`new Attachment`}),` constructor. It allows you to create an attachment in a single call, and attach it to the thread/step in the current context.`]}),`\n`,_jsxs(_components.p,{children:[`The old method using `,_jsx(_components.code,{children:`uploadFile`}),` and `,_jsx(_components.code,{children:`new Attachment`}),` is considered obsolete, although it remains in the SDK for backward compatibility.`]}),`\n`,_jsx(Heading,{level:`3`,id:`improvements-8`,children:`Improvements`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`threadId`}),` is now optional when creating an attachment or uploading a file`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`createAttachment`}),` and `,_jsx(_components.code,{children:`uploadFile`}),` now accept file data in the following formats : ReadableStream, ReadStream, Buffer, File, Blob \u0026 ArrayBuffer`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Generation`}),` creation now supports passing `,_jsx(_components.code,{children:`tags`}),` and `,_jsx(_components.code,{children:`metadata`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Experiment`}),` become optionally linked to a `,_jsx(_components.code,{children:`Dataset`})]}),`\n`]}),`\n`,_jsxs(Warning,{children:[`Starting with `,_jsx(_components.code,{children:`0.0.512`}),`, you need to have Literal AI version 0.0.615-beta or above.`]}),`\n`,_jsx(Heading,{level:`1`,id:`0-0-510`,children:_jsx(_components.code,{children:`0.0.510`})}),`\n`,_jsx(Heading,{level:`3`,id:`breaking-changes-2`,children:`Breaking Changes`}),`\n`,_jsx(_components.p,{children:`Revamp of the OpenAI instrumentation : instead of manually instrumenting each call result, you can now instrument OpenAI globally. Each subsequently call will be logged with no additional code.`}),`\n`,_jsx(_components.p,{children:`This new implementation is context-aware and will log the OpenAI calls in the right steps and threads if you use the new wrapper syntax.`}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[`If you were using the `,_jsx(_components.code,{children:`instrumentation.openai`}),` method in your code and upgrade the Literal AI SDK to `,_jsx(_components.code,{children:`0.0.510`}),`, you will get the following error at compile time : `,_jsx(_components.code,{children:`error TS2554: Expected 0-1 arguments, but got 2.`}),`.`]}),_jsxs(_components.p,{children:[`To fix this, you should move the `,_jsx(_components.code,{children:`instrumentation.openai`}),` call to the top of your code and remove the arguments apart from the optional `,_jsx(_components.code,{children:`{ tags: []}`}),` argument.`]}),_jsxs(_components.p,{children:[`You can find code examples in the `,_jsx(_components.a,{href:`/integrations/openai`,children:`OpenAI Instrumentation`}),` guide.`]})]}),`\n`,_jsx(Heading,{level:`1`,id:`0-0-509`,children:_jsx(_components.code,{children:`0.0.509`})}),`\n`,_jsx(Heading,{level:`3`,id:`new-features-2`,children:`New Features`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`New syntax with wrappers for `,_jsx(_components.code,{children:`step`}),` and `,_jsx(_components.code,{children:`thread`}),` methods.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`1`,id:`0-0-504`,children:_jsx(_components.code,{children:`0.0.504`})}),`\n`,_jsx(Heading,{level:`3`,id:`deprecations`,children:`Deprecations`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`format`}),` is deprecated. `,_jsx(_components.code,{children:`formatMessages`}),` should be used now.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`new-features-3`,children:`New Features`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Add support for tags with OpenAI Instrumentation`}),`\n`,_jsx(_components.li,{children:`Allow thread upsert with one single object argument`}),`\n`]}),`\n`,_jsx(Heading,{level:`1`,id:`0-0-503`,children:_jsx(_components.code,{children:`0.0.503`})}),`\n`,_jsx(Heading,{level:`3`,id:`deprecations-2`,children:`Deprecations`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`createPrompt()`}),` is deprecated. `,_jsx(_components.code,{children:`getOrCreatePrompt()`}),` should now be used.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`new-features-4`,children:`New Features`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`getOrCreatePrompt()`}),`. For creating a new Prompt, use `,_jsx(_components.code,{children:`getOrCreatePrompt()`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`A Prompt is fully defined by its name, template_messages, settings and tools. If a prompt already exists for the given arguments, it is returned. Otherwise, a new prompt is created.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`/* `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`* @param name The name of the prompt to retrieve or create.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`* @param templateMessages A list of template messages for the prompt.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`* @param settings Optional settings for the prompt.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`* @returns The prompt that was retrieved or created.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`*/`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Changelog","description":null,"href":"/typescript-client/development/changelog"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"0.1.0 (November 12th, 2024)","slug":"0-1-0-november-12th-2024","depth":1,"children":[{"title":"Improvements","slug":"improvements","depth":3,"children":[]}]},{"title":"0.0.520 (October 28th, 2024)","slug":"0-0-520-october-28th-2024","depth":1,"children":[{"title":"Improvements","slug":"improvements-2","depth":3,"children":[]}]},{"title":"0.0.519 (October 21st, 2024)","slug":"0-0-519-october-21st-2024","depth":1,"children":[{"title":"Improvements","slug":"improvements-3","depth":3,"children":[]}]},{"title":"0.0.518 (September 18th, 2024)","slug":"0-0-518-september-18th-2024","depth":1,"children":[{"title":"Bug fixes","slug":"bug-fixes","depth":3,"children":[]}]},{"title":"0.0.517 (September 16th, 2024)","slug":"0-0-517-september-16th-2024","depth":1,"children":[{"title":"Improvements","slug":"improvements-4","depth":3,"children":[]},{"title":"Bug fixes","slug":"bug-fixes-2","depth":3,"children":[]}]},{"title":"0.0.515","slug":"0-0-515","depth":1,"children":[{"title":"Improvements","slug":"improvements-5","depth":3,"children":[]}]},{"title":"0.0.514","slug":"0-0-514","depth":1,"children":[{"title":"Improvements","slug":"improvements-6","depth":3,"children":[]}]},{"title":"0.0.513","slug":"0-0-513","depth":1,"children":[{"title":"Improvements","slug":"improvements-7","depth":3,"children":[]}]},{"title":"0.0.512","slug":"0-0-512","depth":1,"children":[{"title":"Breaking Changes","slug":"breaking-changes","depth":3,"children":[]},{"title":"New Features","slug":"new-features","depth":3,"children":[]},{"title":"Improvements","slug":"improvements-8","depth":3,"children":[]}]},{"title":"0.0.510","slug":"0-0-510","depth":1,"children":[{"title":"Breaking Changes","slug":"breaking-changes-2","depth":3,"children":[]}]},{"title":"0.0.509","slug":"0-0-509","depth":1,"children":[{"title":"New Features","slug":"new-features-2","depth":3,"children":[]}]},{"title":"0.0.504","slug":"0-0-504","depth":1,"children":[{"title":"Deprecations","slug":"deprecations","depth":3,"children":[]},{"title":"New Features","slug":"new-features-3","depth":3,"children":[]}]},{"title":"0.0.503","slug":"0-0-503","depth":1,"children":[{"title":"Deprecations","slug":"deprecations-2","depth":3,"children":[]},{"title":"New Features","slug":"new-features-4","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"chainlit-5","siteName":"Literal AI Documentation","title":"Changelog - Literal AI Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T00:43:31.794Z","originalFileLocation":"typescript-client/development/changelog.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Literal AI Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/chainlit-5/ME3zdq2jEWAz0RSr/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/chainlit-5/ME3zdq2jEWAz0RSr/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/chainlit-5/ME3zdq2jEWAz0RSr/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/chainlit-5/ME3zdq2jEWAz0RSr/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/chainlit-5/ME3zdq2jEWAz0RSr/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/chainlit-5/ME3zdq2jEWAz0RSr/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/chainlit-5/ME3zdq2jEWAz0RSr/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/chainlit-5/ME3zdq2jEWAz0RSr/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/chainlit-5/ME3zdq2jEWAz0RSr/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Changelog - Literal AI Documentation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Literal AI Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.literalai.com/typescript-client/development/changelog\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://chainlit-5.mintlify.app/_mintlify/api/og/v2?division=Development\u0026amp;title=Changelog\u0026amp;theme=b323e8675abdfeefc1155f40\u0026amp;signature=b58ccf7e21c993f07ea2b5f23f47b4df74443890fabb43788ed89320a4321f1d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Changelog - Literal AI Documentation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://chainlit-5.mintlify.app/_mintlify/api/og/v2?division=Development\u0026amp;title=Changelog\u0026amp;theme=b323e8675abdfeefc1155f40\u0026amp;signature=b58ccf7e21c993f07ea2b5f23f47b4df74443890fabb43788ed89320a4321f1d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/chainlit-5/ME3zdq2jEWAz0RSr/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Literal AI Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F80061\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.literalai.com/typescript-client/development/changelog\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/typescript-client/development/changelog.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.literalai.com/#organization\",\"name\":\"Literal AI Documentation\",\"url\":\"https://docs.literalai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/chainlit-5/yVkf8qhp8dsNjo0g/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=yVkf8qhp8dsNjo0g\u0026q=85\u0026s=5041057089add85f6e7b5b730962e5c1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.literalai.com#website\",\"name\":\"Literal AI Documentation\",\"url\":\"https://docs.literalai.com\",\"publisher\":{\"@id\":\"https://docs.literalai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.literalai.com/typescript-client/development/changelog#webpage\",\"url\":\"https://docs.literalai.com/typescript-client/development/changelog\",\"name\":\"Changelog\",\"dateModified\":\"2026-01-07T00:43:31.794Z\",\"isPartOf\":{\"@id\":\"https://docs.literalai.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.literalai.com/typescript-client/development/changelog#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.literalai.com/typescript-client/development/changelog#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Literal AI Documentation\",\"item\":\"https://docs.literalai.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Changelog\",\"item\":\"https://docs.literalai.com/typescript-client/development/changelog\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.literalai.com/typescript-client/development/changelog#article\",\"headline\":\"Changelog\",\"name\":\"Changelog\",\"url\":\"https://docs.literalai.com/typescript-client/development/changelog\",\"mainEntityOfPage\":{\"@id\":\"https://docs.literalai.com/typescript-client/development/changelog#webpage\"},\"dateModified\":\"2026-01-07T00:43:31.794Z\",\"publisher\":{\"@id\":\"https://docs.literalai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.literalai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Literal AI Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Literal AI Documentation","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/more/migration-guide"}]},{"anchor":"Python Client","icon":"python","pages":[{"title":"Python Client","href":"/python-client/get-started/introduction"}]},{"anchor":"TypeScript Client","icon":"js","groups":[{"group":"Get Started","pages":[{"title":"Installation","href":"/typescript-client/introduction"},{"title":"With wrappers","href":"/typescript-client/with-wrappers"},{"title":"Without wrappers","description":null,"href":"/typescript-client/without-wrappers"}]},{"group":"Development","pages":[{"title":"Changelog","href":"/typescript-client/development/changelog"}]},{"group":"API Reference","pages":[{"title":null,"description":null,"href":"/typescript-client/api-reference/api"},{"title":"Dataset","href":"/typescript-client/api-reference/dataset"}]}]},{"anchor":"Cookbooks","href":"https://github.com/Chainlit/literalai-cookbooks","icon":"github"}]},"basePath":"","title":"Changelog - Literal AI Documentation","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}