Skip to content

flavienbwk/repochat-action

Repository files navigation

Repochat Action

Deployment CI GitHub release License: MIT

Warning

This project is in early development and may contain bugs. Use with caution in production environments.

Chat with your repo in under 2 minutes using GitHub Actions on supported Cloud providers.

Features:

  • ✨ A nice web UI
  • :octocat: Available as a GitHub Action
  • 💾 Stateful ingestion mode (directory mode)
  • 🔄 Sateless ingestion via API (api mode)
  • 🔐 Optional password on web UI

RepoChat interface example

Requirements

Usage for GitHub Actions

Easily add RepoChat to your project using GitHub Actions:

jobs:
    steps:
    - name: Deploy a convenient chatbot for your repo
      id: deploy_repochat
      uses: flavienbwk/repochat-action@v0
      with:
        # All parameters not explicitly marked as "optional" are required
        dirs_to_scan: "./example,README.md"  # comma-separated glob dirs to analyze
        interface_password: ${{ secrets.INTERFACE_PASSWORD }}  # optional
        openai_api_key: ${{ secrets.OPENAI_API_KEY }}
        openai_model_type_inference: "gpt-4o-mini"
        openai_model_type_embedding : "text-embedding-3-small"
        provider_name: 'scaleway'
        provider_key_id: ${{ secrets.PROVIDER_KEY_ID }}
        provider_key_secret: ${{ secrets.PROVIDER_KEY_SECRET }}
        provider_project_id: ${{ secrets.PROVIDER_PROJECT_ID }}
        provider_default_region: 'fr-par'
        provider_default_zone: 'fr-par-2'

    - name: Get RepoChat domain
      run: echo "DOMAIN=${{ steps.deploy_repochat.outputs.domain }}" >> $GITHUB_OUTPUT
      id: repochat_domain

Get a practical implementation example with .github/workflows/deploy.yml.

Supported Cloud providers

  • Scaleway
    • Refer to Scaleway's documentation to generate API keys.

    • Additional required parameters:

      provider_name: 'scaleway'
      provider_key_id: ${{ secrets.PROVIDER_KEY_ID }}
      provider_key_secret: ${{ secrets.PROVIDER_KEY_SECRET }}
      provider_project_id: ${{ secrets.PROVIDER_PROJECT_ID }}
      provider_default_region: 'fr-par'  # example
      provider_default_zone: 'fr-par-2'  # example

Other deployments

Deploy for local directory

👉 Deploy locally for directory serving...
  1. Copy repo/documents/files to be ingested under ./api/example/

  2. Copy and update env variables

    cp .env.example .env
  3. Run the Docker container

    docker compose -f dir.docker-compose.yml up -d
  4. Access the app at http://localhost:3001

Deploy as stateless API

👉 Deploy locally as a stateless API...
  1. Copy and update env variables

    cp .env.example .env
  2. Run the Docker container

    docker compose -f api.docker-compose.yml up -d
  3. Inject data taking example on the Python or JS scripts

  4. Access the app at http://localhost:3001

Development

👉 Run RepoChat for development...
  1. Clone this repo

    [email protected]:flavienbwk/repochat-action.git
  2. Copy and update env variables

    cp .env.example .env
  3. Run the local stack

    make dev

Release Action

  1. Increase repochat's version in ./package.json

  2. Run build and commit latest edits:

    npm run build
    # git add && git commit && git push...
  3. Merge on main

    This will create a release based on package.json and push the :latest Docker image.

Features

  • Directory data chat
  • API data chat
  • GitHub Actions release
  • Secure ingestion endpoint (/api/ingest)
  • Secure RepoChat with optional password
  • Maintain state over S3 (would allow containers autoscaling)

Why not use Vercel ?

Vercel is very limited when it comes to deploying everything but JS. First, ChromaDB (and any sqlite-based library) is not supported in Vercel. Then, this project uses a FastAPI Python API that requires more storage than Vercel's 250MB bundle limit.

About

Deploy an AI-powered chatbot for your repo in under 2 minutes.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages