Streaming Chat Inference

Run streaming and non-streaming chat inference against 0G Compute providers.

Updated Jun 18, 2026
One-click install
npx skills add https://github.com/srijan399/imsy --skill streaming-chat-inference-srijan399
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Streaming Chat Inference
Source: https://github.com/srijan399/imsy/tree/main/.0g-skills/skills/compute/streaming-chat
Command: npx skills add https://github.com/srijan399/imsy --skill streaming-chat-inference-srijan399

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @0glabs/0g-serving-broker, ethers.

What problem does it solve?

It helps you run chat-based AI inference on 0G Compute providers while ensuring every request is properly settled, acknowledged, and tracked.

Core Features & Use Cases

  • Non-streaming chat completions: Send a message to a provider and receive a standard assistant reply.
  • Streaming responses: Render token output in real time while still capturing usage and chat identifiers.
  • Reliable settlement flow: Extract the chat ID from response headers first, fall back to the body when needed, and always call processResponse with the correct parameter order.
  • Resilient inference operations: Handle retries, balance checks, provider acknowledgement, and error recovery for production chat apps.

Quick Start

Use the streaming chat skill to send a message to a configured 0G Compute provider, stream the reply, and settle the request correctly afterward.

Frequently Asked Questions about Streaming Chat Inference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stream LLM chat completions with correct fee settlement?

To stream LLM chat completions with fee settlement, you connect to 0G Compute providers, render token output in real time, and finalize payment by calling processResponse with the correct parameter order.

What is the correct parameter order for settling 0G Compute inference requests?

Settling 0G Compute inference requires extracting the chat ID from response headers first, falling back to the body if needed, and passing usage data to processResponse in the exact specified parameter order.

Can I run non-streaming chat inference with DeepSeek and Qwen models on 0G Compute?

Yes, you can run non-streaming chat inference with DeepSeek, Qwen, Gemma, and GPT-OSS models on 0G Compute to send messages and receive standard assistant replies.

Do I need ethers and 0g-serving-broker to handle provider metadata and authentication?

Yes, you need the ethers and @0glabs/0g-serving-broker dependencies to perform provider metadata lookup, authenticate request headers, and manage balance checks for resilient inference operations.

Why does chat inference fail when streaming responses without proper provider acknowledgement?

Chat inference fails without provider acknowledgement because the workflow requires capturing usage data and chat identifiers during the stream to correctly acknowledge and settle the request.

How do I build resilient multi-turn assistant sessions with real-time LLM output rendering?

Build resilient multi-turn assistant sessions by handling retries, balance checks, and error recovery during real-time LLM output rendering to ensure continuous production chat app availability.