TypeScript
Build AI applications with Vercel AI SDK and StackOne tools
import { openai } from '@ai-sdk/openai'; import { generateText } from 'ai'; import { StackOneToolSet } from '@stackone/ai'; const toolset = new StackOneToolSet(); const tools = toolset.getStackOneTools('hris_get_*', accountId); const aiSdkTools = tools.toAISDK(); const { text } = await generateText({ model: openai('gpt-4o-mini'), tools: aiSdkTools, prompt: 'Get employee details for id: c28xIQaWQ6MzM5MzczMDA2NzMzMzkwNzIwNA', maxSteps: 3, });
Was this page helpful?