Releases: LangbaseInc/langbase-sdk
Releases · LangbaseInc/langbase-sdk
1.0.0
All changes documented in the changelog here.
Major Changes
-
📦 NEW: Chat support in both both
generateText()
andstreamText()
-
👌 IMPROVE: Example updates for Node, browser, Next.js, React, etc.
-
👌 IMPROVE: ⌘ Langbase SDK Docs and API reference for both
generateText()
andstreamText()
-
‼️ BREAKING:ChoiceNonStream
type is now renamed toChoiceGenerate
. -
‼️ BREAKING:generateText()
now doesn't return raw instead all properties are included in the main response.BEFORE
interface GenerateNonStreamResponse { completion: string; raw: { id: string; object: string; created: number; model: string; choices: ChoiceNonStream[]; usage: Usage; system_fingerprint: string | null; }; }
NOW
interface GenerateResponse { completion: string; threadId?: string; id: string; object: string; created: number; model: string; system_fingerprint: string | null; choices: ChoiceGenerate[]; usage: Usage; }
-
‼️ BREAKING:streamText()
now returns a threadId and stream as an object instead of returning stream alone.BEFORE
const stream = await pipe.streamText({ messages: [{role: 'user', content: 'Who is an AI Engineer?'}], });
NOW
const {threadId, stream} = await pipe.streamText({ messages: [{role: 'user', content: 'Who is an AI Engineer?'}], });