Skip to content
Back to skills

Orpc Openai Streaming

ASecurity

Combine oRPC with the OpenAI Streaming API to build a chatbot.

  • 8 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 12, 2026
ai-agentsgitapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add ali-master/skills --skill orpc-openai-streaming --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Orpc Openai Streaming?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Orpc Openai Streaming
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ali-master-orpc-openai-streaming/badge)](https://www.skillsdirectory.com/skills/ali-master-orpc-openai-streaming)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: oRPC OpenAI Streaming Example
description: Combine oRPC with the OpenAI Streaming API to build a chatbot.
license: MIT
metadata:
  author: Ali Torki
  homepage: https://github.com/ali-master
  version: "1.0.0"
---

# OpenAI Streaming Example

Integrate oRPC with the OpenAI Streaming API to build a chatbot.

## Basic Example

```ts
import { createORPCClient } from '@orpc/client'
import { RPCLink } from '@orpc/client/fetch'
import { os, RouterClient } from '@orpc/server'
import * as z from 'zod'
import OpenAI from 'openai'

const openai = new OpenAI()

const complete = os
  .input(z.object({ content: z.string() }))
  .handler(async function* ({ input }) {
    const stream = await openai.chat.completions.create({
      model: 'gpt-4o',
      messages: [{ role: 'user', content: input.content }],
      stream: true,
    })

    yield* stream
  })

const router = { complete }

// --------------- CLIENT ---------------

const link = new RPCLink({
  url: 'https://example.com/rpc',
})

const client: RouterClient<typeof router> = createORPCClient(link)

const stream = await client.complete({ content: 'Hello, world!' })

for await (const chunk of stream) {
  console.log(chunk.choices[0]?.delta?.content || '')
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.