oRPC AI SDK Integration
Installation
SKILL.md
AI SDK Integration
AI SDK is a free open-source library for building AI-powered products. You can seamlessly integrate it with oRPC without any extra overhead.
Requires AI SDK v5.0.0 or later.
Server
Use streamToEventIterator to convert AI SDK streams to oRPC Event Iterators.
import { os, streamToEventIterator, type } from '@orpc/server'
import { convertToModelMessages, streamText, UIMessage } from 'ai'
import { google } from '@ai-sdk/google'
Related skills
More from ali-master/skills
orpc ecosystem
Community resources, starter kits, tools, and libraries for oRPC.
2orpc event iterator (sse)
Streaming responses, real-time updates, and server-sent events using oRPC.
2orpc comparison
How oRPC differs from tRPC, ts-rest, and Hono.
2orpc openapilink
Use OpenAPILink in oRPC clients to communicate with OpenAPI-compliant APIs.
2orpc middleware
Middleware enables reusable and extensible procedures in oRPC.
2orpc metadata
Enhance your procedures with metadata.
2