Repository navigation
@openuidev/server@0.6.0
Minor Changes
-
#1720
959a514Thanks @AbhinRustagi! - Add Autofix toOpenUIClient:openui.chat.createAutofix({ library })andopenui.ai.createAutofix({ library })each return{ fix, stream }. They use the client's key,baseUrlandfetch. Deprecate the standalonecreateAutofixfrom@openuidev/server/openaiand@openuidev/server/vercel; it still works.openaiandaiare now optional peers, for these types.Export
AutofixErrorand the Autofix types from the root,/openaiand/vercel. Each is one class across entries, soinstanceof AutofixErrorworks whichever entry you import it from.Autofix with a missing or empty
apiKeynow fails before sending a request, withAutofixErrorcodemissing_api_key. Before, it sentBearer undefinedand failed withhttp_error401. -
#1707
072b9d7Thanks @AbhinRustagi! - Addopenui.conversationsto manage conversations and their items with the API key:list,create,get,update,delete, anditems.list/create/get/update.createnames the owner withuserId(and the client'sappId), so the user's frontend token can read the conversation, andlisttakesuserIdto list only theirs. Calls by id act as your org: check a conversation'suserIdbefore trusting an id from the browser.Add
openui.chat.conversationsandopenui.langgraph.conversations: the same calls, with items in your SDK's messages, in and out.items.createtakes Chat Completions or LangChain messages and resolves with the turn as stored, in the same format;items.listreads the whole thread back as them. For LangGraph, both return plain{ role, content }messages thatgraph.invoketakes, anditems.createtakes those too.Deprecate
storeChatCompletionHistory,chatCompletionMessagesToItems,storeLangGraphHistoryandlangGraphMessagesToItemsin favour of those. They still work;storeChatCompletionHistoryandstoreLangGraphHistorynow throwOpenUIApiError(withcodeandstatus) instead of a plainError, and@openuidev/server/langgraphno longer loads@langchain/coreat runtime.