feat: add smooth stream (#722)
This commit is contained in:
parent
3f9d379a6a
commit
5e8cddc886
5 changed files with 52 additions and 20 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import {
|
||||
DataStreamWriter,
|
||||
experimental_generateImage,
|
||||
smoothStream,
|
||||
streamObject,
|
||||
streamText,
|
||||
tool,
|
||||
|
|
@ -52,6 +53,7 @@ export const updateDocument = ({
|
|||
const { fullStream } = streamText({
|
||||
model: customModel(model.apiIdentifier),
|
||||
system: updateDocumentPrompt(currentContent, 'text'),
|
||||
experimental_transform: smoothStream({ chunking: 'word' }),
|
||||
prompt: description,
|
||||
experimental_providerMetadata: {
|
||||
openai: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue