Skip to content

jstranberg/chat-ai-samples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stream Chat AI Integration Examples

Integrating Stream Chat with AI

Quick Links 🔗

Prerequisites ✅

Before you begin, you'll need:

Overview 😎

This repository showcases official Stream sample projects demonstrating Generative AI integration with Chat API and UI Kits.

Samples:

Frontend SDKs:

Backend Examples:

You can use our pre-built OpenAI/Anthropic integrations or extend the Agent class to work with any external LLM provider.

Architecture Overview 🏗️

The repository implements a modular architecture that connects Stream's Chat functionality with various LLM providers:

Stream Chat AI Integration Architecture

Key features:

  • Pre-built integrations with OpenAI and Anthropic
  • Extensible Agent class for custom LLM provider integration
  • Built-in UI components that handle:
    • Loading states
    • Code block rendering
    • Markdown formatting
    • Table displays
    • Image rendering

Getting Started 🚀

  1. Clone the repo
  2. Configure environment variables:
cp .env.example .env
  1. Add the following credentials to your .env:

Setup ⚙️

Backend

Frontend Integration

Select your preferred SDK to get started.

AI Guides 📚

These guides explore more of how AI can be used across our SDKs and products.

Contributing 🤔

We welcome contributions that improve functionality or fix issues:

  1. Fork the repository
  2. Create a feature branch
  3. Implement your changes
  4. Add tests if applicable
  5. Submit a PR with a clear description/changes

Sample App Submissions

We encourage you to try the tutorials and submit new sample apps 🥳

  • How can I submit a sample app?
    • Open a pr with a proper description and we'll review it as soon as possible.

Bug Reports 🕷

  • Open an issue with:
    • Clear steps to reproduce
    • Add screenshots/videos if possible
    • Expected behavior
    • Actual behavior
    • Platform/environment details

About

A collection of examples on integrating Stream Chat with Generative AI 💬

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 90.8%
  • CSS 4.5%
  • JavaScript 3.5%
  • HTML 1.2%