This release is a pre-release and may not be stable for production use.
GoChat 🚀
GoChat is a modern, responsive Python chat application framework built on FastAPI, HTMX, Tailwind CSS, and Google GenAI (Gemini / Vertex AI). It allows you to instantly instantiate premium interactive web interfaces, terminal chat loops, and full-stack chat integrations with zero-config default settings, or fully customize providers and storage backends.
- GitHub Repository: https://github.com/yuichi110/gochat
- API Documentation & Guides: Explore the full documentation, architecture guides, and tutorials on the GitHub Repository.
✨ Key Features
- Zero-Config Standalone Mode: Spin up a premium chat web application in two lines of code.
- Unified GenAI Interface: Easily swap between API Key (AI Studio), Vertex AI (Google Cloud Platform), or Mock generation models.
- Interactive UI Partial Renders: Implemented with FastAPI + HTMX for lightning-fast responses without page refreshes.
- Responsive & Premium Aesthetics: Modern responsive design with HSL-curated custom styles.
- Multi-Modal Support: Direct file uploads (images and text documents) natively supported.
- Built-in Terminal Chat Loop: Instantly run interactive AI testing sessions directly from your command-line interface.
📦 Installation
GoChat is highly modular and supports optional installation packages (extras) to keep your dependency footprint minimal:
1. Minimal Installation (FastAPI + Presenters Core)
Recommended if you are embedding GoChat and writing custom providers or repositories:
pip install gochat-python
2. Standard Full-Suite Installation
Installs the standard pre-configured package (includes DuckDB database repositories, Mock adapters, Google Gemini SDK, Redis support, and PostgreSQL binary adapters):
pip install gochat-python[standard]
3. Feature-Specific Installations
You can install only the specific components your application uses to keep production environments lean:
- Google Gemini / Vertex AI Support:
pip install gochat-python[gemini]
- DuckDB database + Mock/Test Adapters:
pip install gochat-python[mock]
- PostgreSQL Database Support:
pip install gochat-python[postgres]
- Redis Stream Buffer / Caching Support:
pip install gochat-python[redis]
You can also combine multiple extras together:
pip install gochat-python[gemini,redis]
🚀 Quick Start
1. Start the Web UI Application (Zero-Config Standalone)
Start a premium local chat web interface using pre-configured in-memory Mock adapters:
from gochat import GoChat
# Create and launch the application server
app = GoChat()
app.start(host="127.0.0.1", port=8080)
Open your browser to http://127.0.0.1:8080 to interact with your new chat interface.
2. Launch a Terminal-Based Chat Loop
Start a live interactive console chat session with a Gemini model using a Google AI Studio API key:
import os
from gochat import GoChat
from gochat.genai_providers import GeminiProvider
# Initialize Gemini GenAI Provider
gemini_provider = GeminiProvider(
name="gemini",
description="Gemini via API Key",
model="gemini-2.5-flash",
api_key=os.environ["GEMINI_API_KEY"],
use_vertexai=False,
)
# Launch interactive console loop
GoChat.start_chat(gemini_provider)
🛠️ Customization Guide
GoChat follows a clean, multi-layered architecture (Controller, Service, Presenter, GenAI Provider, Repository) with dependency injection. You can inject custom implementations or configurations during instantiation:
Registering Custom AI Providers
You can register multiple AI models or custom wrappers for the user to choose from in the UI dropdown:
from gochat import GoChat
from gochat.genai_providers import GeminiProvider, ImagenProvider
# Define your models
main_provider = GeminiProvider(
name="gemini-pro",
model="gemini-2.5-flash",
api_key="YOUR_API_KEY",
)
image_provider = ImagenProvider(
name="imagen",
model="imagen-3.0-generate-002",
project_id="my-gcp-project-id",
region="us-central1",
use_vertexai=True,
)
# Inject providers into GoChat
chat_app = GoChat(
genai_providers=[main_provider, image_provider],
title_genai_provider=main_provider,
)
chat_app.start(host="127.0.0.1", port=8080)
Setting Configurations & Feature Flags
Inject customized configurations via typed Pydantic settings:
from gochat import GoChat
from gochat.settings import FeatureSettings, CookieSettings
# Enable/disable application features
features = FeatureSettings(
signin=True,
signup=True,
streaming=True,
file_upload=True,
)
# Custom cookie configurations
cookies = CookieSettings(
access_token_cookie_name="my_access_token",
chat_id_cookie_name="my_chat_id",
)
chat_app = GoChat(
feature_settings=features,
cookie_settings=cookies,
)
📖 License
Licensed under the Apache License, Version 2.0. See the LICENSE file on GitHub for details.
Metadata
Release files for gochat-python 0.1.0.dev2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gochat_python-0.1.0.dev2.tar.gz | 571.0 kB | Without provenance | Details for gochat_python-0.1.0.dev2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gochat_python-0.1.0.dev2-py3-none-any.whl | Python 3 | none | any | Details for gochat_python-0.1.0.dev2-py3-none-any.whl |
Total release size: 1.2 MB
Release files / gochat_python-0.1.0.dev2.tar.gz
| Download URL | gochat_python-0.1.0.dev2.tar.gz |
|---|---|
| Size | 571.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25f4b25b33d07ad6eb148cf314e6bc60ac9a4e85256d698b4f674c4f12668683
|
|
BLAKE2b-256 checksum How to use checksums |
963bd2d10d38191e34738e616ec98c56ce89346d03de9c59704edf659d0851a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux rodete","version":null,"id":"rodete","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / gochat_python-0.1.0.dev2-py3-none-any.whl
| Download URL | gochat_python-0.1.0.dev2-py3-none-any.whl |
|---|---|
| Size | 660.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98786a6a51003c6792185c5bd8aeea4568e988047729d00809f7245e01f2fff5
|
|
BLAKE2b-256 checksum How to use checksums |
751a5219746d737cd5f158ee16a1555151e6299183e3fd2ab1e3cf7ad37140d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux rodete","version":null,"id":"rodete","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for gochat-python 0.1.0.dev2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.