ai-model-integration

Community

Integrate AI models and streaming reliably.

AuthorWhaleylaw
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Provides a clear, practical workflow for integrating large language models (Claude, GPT, etc.) into applications, handling streaming responses, and preventing common API integration failures such as exposed keys, broken streams, and unhandled rate limits.

Core Features & Use Cases

  • Secure API integration: guidance to proxy provider keys through a backend and avoid exposing credentials in client code.
  • Chat state and UI patterns: patterns for message state management, loading and streaming indicators, and role-based rendering.
  • Streaming and resilience: approaches for implementing streaming responses with ReadableStreams or SSE, incremental UI updates, stream cleanup, and retry/backoff for rate limits.
  • Error handling and observability: common strategies for retries, user-friendly errors, monitoring API usage, and handling token/truncation limits.
  • Use Case: Embed a conversational AI assistant in a legal case management app that streams model responses while protecting API keys and gracefully recovering from network or rate-limit failures.

Quick Start

Proxy AI requests through your backend endpoint /api/chat and send the prompt "Summarize these case notes into key facts" to verify streaming, error handling, and secure key handling.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: ai-model-integration
Download link: https://github.com/Whaleylaw/llm-lawyer/archive/main.zip#ai-model-integration

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.