Skip to main content

Build Conversational AI.

Project description

Chainlit for Amazon Brazil Build

Brazil-compatible version of Chainlit for Amazon's internal build system.

๐Ÿš€ Quick Start

Prerequisites

  • Brazil build system access
  • uv installed (for virtual environment management)

Setup & Build

# 1. Navigate to project
cd /Volumes/workplace/Aki/src/Chainlit

# 2. Create proper virtual environment (CRITICAL for local builds)
uv venv .venv

# 3. Run Brazil build
brazil-build

Publish

  1. make sure you update the version

  2. run below command (temporarily use public PYPI, need to migrate to internal source)

uv publish build/* --token {PYPI_TOKEN}

โœ… Build Status

Production Ready - All issues resolved:

  • โœ… Remote Brazil builds: Working
  • โœ… Local Brazil builds: Working
  • โœ… Python 3.10/3.11 compatibility: Fixed
  • โœ… PeruPython integration: Complete

๐Ÿ— Architecture

Polyglot Build System:

  • Frontend: React/TypeScript (pnpm) โ†’ Build assets
  • Backend: Python package โ†’ Integrate frontend assets
  • Output: amazon_chainlit-2.6.2-py3-none-any.whl (~12MB)

๐Ÿ“ Project Structure

Chainlit/
โ”œโ”€โ”€ README.md                          # This guide
โ”œโ”€โ”€ BRAZIL_BUILD_INTEGRATION.md       # Troubleshooting FAQ
โ”œโ”€โ”€ brazil.ion                         # Peru package config
โ”œโ”€โ”€ .venv/                            # Virtual environment (create with uv)
โ”œโ”€โ”€ build-tools/bin/polyglot-build.sh # Main build script
โ”œโ”€โ”€ third-party-src/
โ”‚   โ”œโ”€โ”€ backend/                       # Python source
โ”‚   โ”œโ”€โ”€ frontend/                      # React frontend
โ”‚   โ””โ”€โ”€ libs/                         # React libraries
โ””โ”€โ”€ build/                            # Build output

๐Ÿ”ง Development

Local Development Setup

# Virtual environment (required for local Brazil builds)
uv venv .venv
source .venv/bin/activate

# Install development dependencies
cd third-party-src
pnpm install

Build Commands

# Full build (local)
brazil-build

# Clean build
brazil-build clean

# Test individual components
cd third-party-src
pnpm build        # Build all frontend components

Testing Your Changes

# 1. Local build test
brazil-build

# 2. Verify artifacts
ls -la build/
# Expected: amazon_chainlit-2.6.2-py3-none-any.whl (~12MB)

โš ๏ธ Critical Setup Requirements

1. Virtual Environment Setup

Must use uv venv .venv - not mkdir .venv

# โœ… Correct
uv venv .venv

# โŒ Wrong - will fail
mkdir .venv

PeruPython expects proper activation scripts at .venv/bin/activate.

2. Build Dependencies

Automatically handled by brazil.ion:

  • PeruPython (for virtual environment)
  • PeruNPM (for frontend builds)

3. Build Process

  1. Frontend Build: React components with pnpm
  2. Backend Build: Python package with PeruPython
  3. Asset Integration: Frontend โ†’ Python package
  4. Output: Wheel file in build/

๐Ÿงช Verification

Successful Build Output:

=== Build completed successfully! ===
Artifacts available in: /path/to/build
BUILD SUCCEEDED

Expected Artifacts:

build/
โ”œโ”€โ”€ amazon_chainlit-2.6.2-py3-none-any.whl  (~12MB)
โ””โ”€โ”€ amazon_chainlit-2.6.2.tar.gz            (~12MB)

๐Ÿ†˜ Troubleshooting

Having build issues? See BRAZIL_BUILD_INTEGRATION.md for:

  • Complete troubleshooting FAQ
  • Common error solutions
  • Debug commands
  • Environment fixes

Quick Fixes

Build failing locally?

# Fix virtual environment
rm -rf .venv
uv venv .venv
brazil-build

PeruPython issues?

# Check availability
which perupy-get-venv
# Should return: /path/to/PeruPython/bin/perupy-get-venv

๐Ÿ“š Additional Resources


Ready to build! Run brazil-build and expect BUILD SUCCEEDED โœ…

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chainlit_aki-2.9.0-py3-none-any.whl (9.8 MB view details)

Uploaded Python 3

File details

Details for the file chainlit_aki-2.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for chainlit_aki-2.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c8b5b8623fb2bbf47f0dbfc3c5c6a58d3144f9eca1e848e02f3f4c183348950
MD5 7ad6d87ccf767fcfc44fb7b203d3c49a
BLAKE2b-256 f58fed2e50d076496dcf4b597bbf11e9e15fb613d7659ada42560ed40adb49db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page