Skip to content

An AI-powered search engine with a generative UI

feat: Add experimental_transform option to researcher configuration

Yoshiki Miuraec18d3fc5147
diff --git a/lib/agents/researcher.ts b/lib/agents/researcher.ts
index 56ba189a..b1ff21c4 100644
--- a/lib/agents/researcher.ts
+++ b/lib/agents/researcher.ts
@@ -1,4 +1,4 @@
-import { CoreMessage, streamText } from 'ai'
+import { CoreMessage, smoothStream, streamText } from 'ai'
import { retrieveTool } from '../tools/retrieve'
import { searchTool } from '../tools/search'
import { videoSearchTool } from '../tools/video-search'
@@ -45,7 +45,8 @@ export function researcher({
retrieve: retrieveTool,
videoSearch: videoSearchTool
},
- maxSteps: 5
+ maxSteps: 5,
+ experimental_transform: smoothStream()
}
} catch (error) {
console.error('Error in chatResearcher:', error)