0.0.510

Breaking Changes

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.

0.0.509

New Features

  • New syntax with wrappers for step and thread methods.

0.0.504

Deprecations

  • format is deprecated. formatMessages should be used now.

New Features

  • Add support for tags with OpenAI Instrumentation
  • Allow thread upsert with one single object argument

0.0.503

Deprecations

  • createPrompt() is deprecated. getOrCreatePrompt() should now be used.

New Features

  • 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.
*/