Skip to content

@openuidev/server@0.6.0

Choose a tag to compare

@thesys-pr-creator thesys-pr-creator released this 29 Nov 16:54
· 24 commits to main since this release
Immutable release. Only release title and notes can be modified.
990a24f

Minor Changes

  • #1720 959a514 Thanks @AbhinRustagi! - Add Autofix to OpenUIClient: openui.chat.createAutofix({ library }) and openui.ai.createAutofix({ library }) each return { fix, stream }. They use the client's key, baseUrl and fetch. Deprecate the standalone createAutofix from @openuidev/server/openai and @openuidev/server/vercel; it still works. openai and ai are now optional peers, for these types.

    Export AutofixError and the Autofix types from the root, /openai and /vercel. Each is one class across entries, so instanceof AutofixError works whichever entry you import it from.

    Autofix with a missing or empty apiKey now fails before sending a request, with AutofixError code missing_api_key. Before, it sent Bearer undefined and failed with http_error 401.

  • #1707 072b9d7 Thanks @AbhinRustagi! - Add openui.conversations to manage conversations and their items with the API key: list, create, get, update, delete, and items.list / create / get / update. create names the owner with userId (and the client's appId), so the user's frontend token can read the conversation, and list takes userId to list only theirs. Calls by id act as your org: check a conversation's userId before trusting an id from the browser.

    Add openui.chat.conversations and openui.langgraph.conversations: the same calls, with items in your SDK's messages, in and out. items.create takes Chat Completions or LangChain messages and resolves with the turn as stored, in the same format; items.list reads the whole thread back as them. For LangGraph, both return plain { role, content } messages that graph.invoke takes, and items.create takes those too.

    Deprecate storeChatCompletionHistory, chatCompletionMessagesToItems, storeLangGraphHistory and langGraphMessagesToItems in favour of those. They still work; storeChatCompletionHistory and storeLangGraphHistory now throw OpenUIApiError (with code and status) instead of a plain Error, and @openuidev/server/langgraph no longer loads @langchain/core at runtime.