Use SearchHive tools with the Vercel AI SDK for streaming AI applications with web access.
import { generateText, tool } from 'ai'
import { createSearchHiveTools } from '@searchhive/vercel-ai'
const result = await generateText({
model: openai('gpt-4o'),
tools: {
...createSearchHiveTools({
apiKey: process.env.SEARCHHIVE_API_KEY
})
},
prompt: 'What are the top AI startups in 2024?'
})
// Or use streaming:
import { streamText } from 'ai'
const stream = streamText({
model: openai('gpt-4o'),
tools: createSearchHiveTools(),
prompt: 'Research competitors for Notion'
})