feat: rebrand as Hanzo Chat with zen4 models and OIDC integration
- Replace all LibreChat/danny-avila image refs with hanzoai/chat - Remove LibreChat branding from UI, emails, docs, and configs - Configure zen4 model series as defaults via api.hanzo.ai - Add Hanzo IAM OIDC authentication (hanzo.id) - Update Docker publish workflow for GHCR + Docker Hub - Add librechat.yaml with Hanzo Cloud endpoint config
This commit is contained in:
@@ -19,7 +19,7 @@ services:
|
||||
# - /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- HOST=0.0.0.0
|
||||
- MONGO_URI=mongodb://mongodb:27017/LibreChat
|
||||
- MONGO_URI=mongodb://mongodb:27017/HanzoChat
|
||||
# - CHATGPT_REVERSE_PROXY=http://host.docker.internal:8080/api/conversation # if you are hosting your own chatgpt reverse proxy with docker
|
||||
# - OPENAI_REVERSE_PROXY=http://host.docker.internal:8070/v1/chat/completions # if you are hosting your own chatgpt reverse proxy with docker
|
||||
- MEILI_HOST=http://meilisearch:7700
|
||||
|
||||
+43
-18
@@ -1,8 +1,7 @@
|
||||
# Hanzo AI Chat - Cloud API Configuration
|
||||
# This configuration uses the Hanzo cloud services at api.hanzo.ai
|
||||
# Hanzo Chat - Cloud Deployment Configuration
|
||||
# All AI models routed through api.hanzo.ai (zen4 series + standard models)
|
||||
|
||||
# ====== HANZO CLOUD API ======
|
||||
# All AI models and runtime execution go through api.hanzo.ai
|
||||
OPENAI_API_KEY=sk-hanzo-your-api-key-here
|
||||
OPENAI_BASE_URL=https://api.hanzo.ai/v1
|
||||
|
||||
@@ -10,6 +9,10 @@ OPENAI_BASE_URL=https://api.hanzo.ai/v1
|
||||
CODE_EXECUTION_ENDPOINT=https://api.hanzo.ai/v1/execute
|
||||
RUNTIME_API_KEY=${OPENAI_API_KEY}
|
||||
|
||||
# ====== BRANDING ======
|
||||
APP_TITLE=Hanzo Chat
|
||||
CUSTOM_FOOTER=Powered by Hanzo AI
|
||||
|
||||
# ====== LOCAL SERVICES ======
|
||||
# MongoDB for chat history
|
||||
MONGO_URI=mongodb://hanzo:hanzo123@localhost:27017/HanzoChat?authSource=admin
|
||||
@@ -20,37 +23,59 @@ MEILI_HOST=http://localhost:7700
|
||||
MEILI_MASTER_KEY=HanzoMeiliMasterKey
|
||||
|
||||
# ====== APPLICATION SETTINGS ======
|
||||
# Domain configuration
|
||||
DOMAIN_CLIENT=http://localhost:3081
|
||||
DOMAIN_SERVER=http://localhost:3081
|
||||
DOMAIN_CLIENT=https://chat.hanzo.ai
|
||||
DOMAIN_SERVER=https://chat.hanzo.ai
|
||||
|
||||
# Branding
|
||||
APP_TITLE=Hanzo AI Chat
|
||||
CUSTOM_FOOTER=Powered by Hanzo AI
|
||||
|
||||
# Security (CHANGE IN PRODUCTION!)
|
||||
# ====== SECURITY (CHANGE IN PRODUCTION) ======
|
||||
JWT_SECRET=hanzo-jwt-secret-change-in-production
|
||||
JWT_REFRESH_SECRET=hanzo-refresh-secret-change-in-production
|
||||
CREDS_KEY=hanzo-creds-key-change-in-production
|
||||
CREDS_IV=hanzo-creds-iv-change
|
||||
|
||||
# ====== HANZO IAM (hanzo.id) OIDC SSO ======
|
||||
OPENID_CLIENT_ID=chat-app
|
||||
OPENID_CLIENT_SECRET=chat-app-client-secret
|
||||
OPENID_ISSUER=https://hanzo.id
|
||||
OPENID_SESSION_SECRET=hanzo-openid-session-change-in-production
|
||||
OPENID_SCOPE=openid profile email
|
||||
OPENID_CALLBACK_URL=/oauth/openid/callback
|
||||
OPENID_BUTTON_LABEL=Log in with Hanzo
|
||||
OPENID_IMAGE_URL=https://hanzo.ai/logo/icon.svg
|
||||
OPENID_USERNAME_CLAIM=name
|
||||
OPENID_NAME_CLAIM=name
|
||||
OPENID_USE_PKCE=true
|
||||
|
||||
# ====== FEATURES ======
|
||||
# Registration
|
||||
ALLOW_REGISTRATION=true
|
||||
ALLOW_UNVERIFIED_EMAIL_LOGIN=true
|
||||
ALLOW_SOCIAL_LOGIN=true
|
||||
ALLOW_SOCIAL_REGISTRATION=true
|
||||
|
||||
# MCP Tools
|
||||
MCP_ENABLED=true
|
||||
|
||||
# Demo Mode (shows registration hint on login page)
|
||||
SHOW_DEMO_CREDENTIALS=true
|
||||
DEMO_INFO=Register at http://localhost:3081 to create your account
|
||||
# ====== AVAILABLE MODELS ======
|
||||
# zen4 series (default, all via api.hanzo.ai):
|
||||
# zen4 - General purpose
|
||||
# zen4-pro - High capability
|
||||
# zen4-max - Extended context
|
||||
# zen4-mini - Fast & efficient
|
||||
# zen4-ultra - Maximum reasoning
|
||||
# zen4-coder - Code specialist
|
||||
# zen4-thinking - Deep reasoning
|
||||
# zen4-coder-pro - Premium coding
|
||||
#
|
||||
# Standard models (via api.hanzo.ai):
|
||||
# gpt-4o, gpt-4o-mini
|
||||
# claude-sonnet-4-5, claude-haiku-4-5
|
||||
# deepseek-r1-distill-70b
|
||||
# qwen3-32b
|
||||
|
||||
# Debug
|
||||
DEBUG_LOGGING=false
|
||||
|
||||
# ====== NOTES ======
|
||||
# 1. Get your Hanzo API key from https://hanzo.ai/dashboard
|
||||
# 2. All AI providers (OpenAI, Anthropic, etc.) are accessed through api.hanzo.ai
|
||||
# 3. No need to set individual provider API keys - Hanzo Router handles it all
|
||||
# 4. Runtime execution for code interpreter also goes through api.hanzo.ai
|
||||
# 2. All AI providers are accessed through api.hanzo.ai -- no individual keys needed
|
||||
# 3. Model list is configured in librechat.yaml under endpoints.custom (Hanzo endpoint)
|
||||
# 4. zen4 is the default model for new conversations
|
||||
|
||||
@@ -60,7 +60,7 @@ representative at an online or offline event.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement here on GitHub or
|
||||
on the official [Discord Server](https://discord.librechat.ai).
|
||||
on the official GitHub repository.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
|
||||
@@ -4,11 +4,11 @@ Thank you to all the contributors who have helped make this project possible! We
|
||||
|
||||
## Contributing Guidelines
|
||||
|
||||
If the feature you would like to contribute has not already received prior approval from the project maintainers (i.e., the feature is currently on the [roadmap](https://github.com/users/danny-avila/projects/2)), please submit a request in the [Feature Requests & Suggestions category](https://github.com/danny-avila/LibreChat/discussions/new?category=feature-requests-suggestions) of the discussions board before beginning work on it. The requests should include specific implementation details, including areas of the application that will be affected by the change (including designs if applicable), and any other relevant information that might be required for a speedy review. However, proposals are not required for small changes, bug fixes, or documentation improvements. Small changes and bug fixes should be tied to an [issue](https://github.com/danny-avila/LibreChat/issues) and included in the corresponding pull request for tracking purposes.
|
||||
If the feature you would like to contribute has not already received prior approval from the project maintainers, please submit a request in the [Feature Requests & Suggestions category](https://github.com/hanzoai/chat/discussions/new?category=feature-requests-suggestions) of the discussions board before beginning work on it. The requests should include specific implementation details, including areas of the application that will be affected by the change (including designs if applicable), and any other relevant information that might be required for a speedy review. However, proposals are not required for small changes, bug fixes, or documentation improvements. Small changes and bug fixes should be tied to an [issue](https://github.com/hanzoai/chat/issues) and included in the corresponding pull request for tracking purposes.
|
||||
|
||||
Please note that a pull request involving a feature that has not been reviewed and approved by the project maintainers may be rejected. We appreciate your understanding and cooperation.
|
||||
|
||||
If you would like to discuss the changes you wish to make, join our [Discord community](https://discord.librechat.ai), where you can engage with other contributors and seek guidance from the community.
|
||||
If you would like to discuss the changes you wish to make, open an issue or discussion on [GitHub](https://github.com/hanzoai/chat), where you can engage with other contributors and seek guidance from the community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ body:
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
|
||||
Before submitting, please:
|
||||
- Search existing [Issues and Discussions](https://github.com/danny-avila/LibreChat/discussions) to see if your bug has already been reported
|
||||
- Use [Discussions](https://github.com/danny-avila/LibreChat/discussions) instead of Issues for:
|
||||
- Search existing [Issues and Discussions](https://github.com/hanzoai/chat/discussions) to see if your bug has already been reported
|
||||
- Use [Discussions](https://github.com/hanzoai/chat/discussions) instead of Issues for:
|
||||
- General inquiries
|
||||
- Help with setup
|
||||
- Questions about whether you're experiencing a bug
|
||||
@@ -29,7 +29,7 @@ body:
|
||||
description: |
|
||||
If using Docker, please run and provide the output of:
|
||||
```bash
|
||||
docker images | grep librechat
|
||||
docker images | grep hanzo
|
||||
```
|
||||
|
||||
If running from source, please run and provide the output of:
|
||||
@@ -90,7 +90,7 @@ body:
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/danny-avila/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md)
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/hanzoai/chat/blob/main/.github/CODE_OF_CONDUCT.md)
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
@@ -43,7 +43,7 @@ body:
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/danny-avila/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md)
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/hanzoai/chat/blob/main/.github/CODE_OF_CONDUCT.md)
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
name: Locize Translation Access Request
|
||||
description: Request access to an additional language in Locize for LibreChat translations.
|
||||
description: Request access to an additional language in Locize for Hanzo Chat translations.
|
||||
title: "Locize Access Request: "
|
||||
labels: ["🌍 i18n", "🔑 access request"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for your interest in contributing to LibreChat translations!
|
||||
Thank you for your interest in contributing to Hanzo Chat translations!
|
||||
Please fill out the form below to request access to an additional language in **Locize**.
|
||||
|
||||
**🔗 Available Languages:** [View the list here](https://www.librechat.ai/docs/translation)
|
||||
|
||||
**📌 Note:** Ensure that the requested language is supported before submitting your request.
|
||||
**Note:** Ensure that the requested language is supported before submitting your request.
|
||||
- type: input
|
||||
id: account_name
|
||||
attributes:
|
||||
@@ -25,10 +23,8 @@ body:
|
||||
attributes:
|
||||
label: Language Code (ISO 639-1)
|
||||
description: |
|
||||
Enter the **ISO 639-1** language code for the language you want to translate into.
|
||||
Enter the **ISO 639-1** language code for the language you want to translate into.
|
||||
Example: `es` for Spanish, `zh-Hant` for Traditional Chinese.
|
||||
|
||||
**🔗 Reference:** [Available Languages](https://www.librechat.ai/docs/translation)
|
||||
placeholder: e.g., es
|
||||
validations:
|
||||
required: true
|
||||
@@ -38,5 +34,5 @@ body:
|
||||
label: Agreement
|
||||
description: By submitting this request, you confirm that you will contribute responsibly and adhere to the project guidelines.
|
||||
options:
|
||||
- label: I agree to use my access solely for contributing to LibreChat translations.
|
||||
required: true
|
||||
- label: I agree to use my access solely for contributing to Hanzo Chat translations.
|
||||
required: true
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: New Language Request
|
||||
description: Request to add a new language for LibreChat translations.
|
||||
description: Request to add a new language for Hanzo Chat translations.
|
||||
title: "New Language Request: "
|
||||
labels: ["✨ enhancement", "🌍 i18n"]
|
||||
body:
|
||||
@@ -27,7 +27,7 @@ body:
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/danny-avila/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md).
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/hanzoai/chat/blob/main/.github/CODE_OF_CONDUCT.md).
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
|
||||
+8
-10
@@ -1,8 +1,8 @@
|
||||
# Security Policy
|
||||
|
||||
At LibreChat, we prioritize the security of our project and value the contributions of security researchers in helping us improve the security of our codebase. If you discover a security vulnerability within our project, we appreciate your responsible disclosure. Please follow the guidelines below to report any vulnerabilities to us:
|
||||
At Hanzo, we prioritize the security of our project and value the contributions of security researchers in helping us improve the security of our codebase. If you discover a security vulnerability within our project, we appreciate your responsible disclosure. Please follow the guidelines below to report any vulnerabilities to us:
|
||||
|
||||
**Note: Only report sensitive vulnerability details via the appropriate private communication channels mentioned below. Public channels, such as GitHub issues and Discord, should be used for initiating contact and establishing private communication channels.**
|
||||
**Note: Only report sensitive vulnerability details via the appropriate private communication channels mentioned below. Public channels, such as GitHub issues, should be used for initiating contact and establishing private communication channels.**
|
||||
|
||||
## Communication Channels
|
||||
|
||||
@@ -12,7 +12,7 @@ When reporting a security vulnerability, you have the following options to reach
|
||||
|
||||
- **Option 2: GitHub Issues**: You can initiate first contact via GitHub Issues. However, please note that initial contact through GitHub Issues should not include any sensitive details.
|
||||
|
||||
- **Option 3: Discord Server**: You can join our [Discord community](https://discord.librechat.ai) and initiate first contact in the `#issues` channel. However, please ensure that initial contact through Discord does not include any sensitive details.
|
||||
- **Option 3: Email**: You can reach us at security@hanzo.ai for security-related reports.
|
||||
|
||||
_After the initial contact, we will establish a private communication channel for further discussion._
|
||||
|
||||
@@ -26,10 +26,10 @@ We strive to acknowledge vulnerability reports within 72 hours and will keep you
|
||||
|
||||
## Security Updates and Patching
|
||||
|
||||
We are committed to maintaining the security of our open-source project, LibreChat, and promptly addressing any identified vulnerabilities. To ensure the security of our project, we adhere to the following practices:
|
||||
We are committed to maintaining the security of our open-source project, Hanzo Chat, and promptly addressing any identified vulnerabilities. To ensure the security of our project, we adhere to the following practices:
|
||||
|
||||
- We prioritize security updates for the current major release of our software.
|
||||
- We actively monitor the GitHub Security Advisory system and the `#issues` channel on Discord for any vulnerability reports.
|
||||
- We actively monitor the GitHub Security Advisory system for any vulnerability reports.
|
||||
- We promptly review and validate reported vulnerabilities and take appropriate actions to address them.
|
||||
- We release security patches and updates in a timely manner to mitigate any identified vulnerabilities.
|
||||
|
||||
@@ -39,11 +39,11 @@ Please note that as a security-conscious community, we may not always disclose d
|
||||
|
||||
This security policy applies to the following GitHub repository:
|
||||
|
||||
- Repository: [LibreChat](https://github.librechat.ai)
|
||||
- Repository: [Hanzo Chat](https://github.com/hanzoai/chat)
|
||||
|
||||
## Contact
|
||||
|
||||
If you have any questions or concerns regarding the security of our project, please join our [Discord community](https://discord.librechat.ai) and report them in the appropriate channel. You can also reach out to us by [opening an issue](https://github.com/danny-avila/LibreChat/issues/new) on GitHub. Please note that the response time may vary depending on the nature and severity of the inquiry.
|
||||
If you have any questions or concerns regarding the security of our project, please reach out to us at security@hanzo.ai or by [opening an issue](https://github.com/hanzoai/chat/issues/new) on GitHub. Please note that the response time may vary depending on the nature and severity of the inquiry.
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
@@ -51,9 +51,7 @@ We would like to express our gratitude to the security researchers and community
|
||||
|
||||
## Bug Bounty Program
|
||||
|
||||
We currently do not have a bug bounty program in place. However, we welcome and appreciate any
|
||||
|
||||
security-related contributions through pull requests (PRs) that address vulnerabilities in our codebase. We believe in the power of collaboration to improve the security of our project and invite you to join us in making it more robust.
|
||||
We currently do not have a bug bounty program in place. However, we welcome and appreciate any security-related contributions through pull requests (PRs) that address vulnerabilities in our codebase. We believe in the power of collaboration to improve the security of our project and invite you to join us in making it more robust.
|
||||
|
||||
**Reference**
|
||||
- https://cheatsheetseries.owasp.org/cheatsheets/Vulnerability_Disclosure_Cheat_Sheet.html
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# jobs:
|
||||
# tests_e2e:
|
||||
# name: Run Playwright tests
|
||||
# if: github.event.pull_request.head.repo.full_name == 'danny-avila/LibreChat'
|
||||
# if: github.event.pull_request.head.repo.full_name == 'hanzoai/chat'
|
||||
# timeout-minutes: 60
|
||||
# runs-on: ubuntu-latest
|
||||
# env:
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
axe-linter:
|
||||
runs-on: ubuntu-latest
|
||||
if: >
|
||||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'danny-avila/LibreChat') ||
|
||||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'hanzoai/chat') ||
|
||||
(github.event_name == 'workflow_dispatch' && github.event.inputs.run_workflow == 'true')
|
||||
|
||||
steps:
|
||||
|
||||
@@ -9,7 +9,7 @@ env:
|
||||
ACI_NAME: 'gh-runner-linux-01'
|
||||
DNS_NAME_LABEL: 'gh-lin-01'
|
||||
GH_OWNER: ${{ github.repository_owner }}
|
||||
GH_REPOSITORY: 'LibreChat' #Change here to deploy self hosted runner ACI to another repo.
|
||||
GH_REPOSITORY: 'chat' #Change here to deploy self hosted runner ACI to another repo.
|
||||
|
||||
jobs:
|
||||
deploy-gh-runner-aci:
|
||||
|
||||
@@ -18,10 +18,10 @@ jobs:
|
||||
include:
|
||||
- target: api-build
|
||||
file: Dockerfile.multi
|
||||
image_name: librechat-dev-api
|
||||
image_name: chat-dev-api
|
||||
- target: node
|
||||
file: Dockerfile
|
||||
image_name: librechat-dev
|
||||
image_name: chat-dev
|
||||
|
||||
steps:
|
||||
# Check out the repository
|
||||
|
||||
@@ -10,7 +10,7 @@ on:
|
||||
|
||||
env:
|
||||
DOCKER_IMAGE: hanzoai/chat
|
||||
REGISTRY: docker.io
|
||||
GHCR_IMAGE: ghcr.io/hanzoai/chat
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -33,15 +33,25 @@ jobs:
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
registry: docker.io
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.DOCKER_IMAGE }}
|
||||
images: |
|
||||
docker.io/${{ env.DOCKER_IMAGE }}
|
||||
${{ env.GHCR_IMAGE }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
|
||||
@@ -11,10 +11,10 @@ jobs:
|
||||
include:
|
||||
- target: api-build
|
||||
file: Dockerfile.multi
|
||||
image_name: librechat-api
|
||||
image_name: chat-api
|
||||
- target: node
|
||||
file: Dockerfile
|
||||
image_name: librechat
|
||||
image_name: chat
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
@@ -13,10 +13,10 @@ jobs:
|
||||
include:
|
||||
- target: api-build
|
||||
file: Dockerfile.multi
|
||||
image_name: librechat-api
|
||||
image_name: chat-api
|
||||
- target: node
|
||||
file: Dockerfile
|
||||
image_name: librechat
|
||||
image_name: chat
|
||||
|
||||
steps:
|
||||
# Check out the repository
|
||||
|
||||
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch LibreChat (debug)",
|
||||
"name": "Launch Hanzo Chat (debug)",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"program": "${workspaceFolder}/api/server/index.js",
|
||||
"env": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Hanzo Chat
|
||||
|
||||
Fork of LibreChat v0.8.0-rc2. AI chat interface with multi-model support,
|
||||
Based on LibreChat v0.8.0-rc2. AI chat interface with multi-model support,
|
||||
MCP integration, agents, and RAG. Live at **chat.hanzo.ai**.
|
||||
|
||||
**Repo**: `github.com/hanzoai/chat`
|
||||
@@ -92,5 +92,24 @@ CREDS_KEY= CREDS_IV= # Credential encryption
|
||||
## Internal Package Names
|
||||
|
||||
These are kept as-is from upstream (npm deps, not worth renaming):
|
||||
- `@librechat/api`, `librechat-data-provider`
|
||||
- `@librechat/api`, `@librechat/client`, `@librechat/data-schemas`, `librechat-data-provider`, `@librechat/agents`
|
||||
- Functions: `extractLibreChatParams`, `importLibreChatConvo`
|
||||
- Type names: `LibreChatKeys`, `LibreChatParams`
|
||||
- Config filename: `librechat.yaml` (upstream convention)
|
||||
- Env var: `LIBRECHAT_LOG_DIR`
|
||||
|
||||
## Branding Cleanup Log
|
||||
|
||||
All user-visible `LibreChat` / `librechat.ai` references replaced with Hanzo equivalents:
|
||||
- All `librechat.ai` URLs -> `hanzo.ai/docs/chat/...`
|
||||
- `code.librechat.ai` -> `hanzo.ai/docs/chat/code-interpreter/...`
|
||||
- package.json repo URLs -> `github.com/hanzoai/chat`
|
||||
- package.json homepages -> `hanzo.ai/chat`
|
||||
- package.json descriptions -> "Hanzo Chat"
|
||||
- Help/FAQ default URL -> `hanzo.ai/chat`
|
||||
- Docker Compose MongoDB DB name -> `HanzoChat`
|
||||
- GitHub workflow repo refs -> `hanzoai/chat`
|
||||
- MCP User-Agent -> `HanzoChat-MCP-Client`
|
||||
- JSDoc comments: LibreChat -> Hanzo Chat
|
||||
- Log messages: LibreChat -> Hanzo Chat
|
||||
- Helm chart URLs -> hanzo.ai/docs/chat/...
|
||||
|
||||
@@ -223,6 +223,10 @@ db-seed:
|
||||
@echo "$(GREEN)Seeding database...$(NC)"
|
||||
@docker compose exec chat npm run seed
|
||||
|
||||
db-seed-agents:
|
||||
@echo "$(GREEN)Seeding team agents...$(NC)"
|
||||
@docker compose exec chat npm run seed:agents
|
||||
|
||||
db-reset:
|
||||
@echo "$(RED)Resetting database...$(NC)"
|
||||
@docker compose exec mongodb mongosh -u hanzo -p hanzo123 HanzoChat --eval "db.dropDatabase()"
|
||||
|
||||
@@ -252,7 +252,7 @@ class AnthropicClient extends BaseClient {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Token Count for LibreChat Message
|
||||
* Get Token Count for Hanzo Chat Message
|
||||
* @param {TMessage} responseMessage
|
||||
* @returns {number}
|
||||
*/
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
{
|
||||
"authField": "GOOGLE_CSE_ID",
|
||||
"label": "Google CSE ID",
|
||||
"description": "This is your Google Custom Search Engine ID. For instructions on how to obtain this, see <a href='https://github.com/danny-avila/LibreChat/blob/main/docs/features/plugins/google_search.md'>Our Docs</a>."
|
||||
"description": "This is your Google Custom Search Engine ID. For instructions on how to obtain this, see <a href='https://github.com/hanzoai/chat/blob/main/docs/features/plugins/google_search.md'>Our Docs</a>."
|
||||
},
|
||||
{
|
||||
"authField": "GOOGLE_SEARCH_API_KEY",
|
||||
"label": "Google API Key",
|
||||
"description": "This is your Google Custom Search API Key. For instructions on how to obtain this, see <a href='https://github.com/danny-avila/LibreChat/blob/main/docs/features/plugins/google_search.md'>Our Docs</a>."
|
||||
"description": "This is your Google Custom Search API Key. For instructions on how to obtain this, see <a href='https://github.com/hanzoai/chat/blob/main/docs/features/plugins/google_search.md'>Our Docs</a>."
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@librechat/backend",
|
||||
"name": "@hanzochat/backend",
|
||||
"version": "v0.8.0-rc2",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/danny-avila/LibreChat.git"
|
||||
"url": "git+https://github.com/hanzoai/chat.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
@@ -30,9 +30,9 @@
|
||||
"~/*": "./*"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/danny-avila/LibreChat/issues"
|
||||
"url": "https://github.com/hanzoai/chat/issues"
|
||||
},
|
||||
"homepage": "https://librechat.ai",
|
||||
"homepage": "https://hanzo.ai/chat",
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.52.0",
|
||||
"@aws-sdk/client-s3": "^3.758.0",
|
||||
|
||||
@@ -87,7 +87,7 @@ router.get('/', async function (req, res) {
|
||||
isBirthday() ||
|
||||
isEnabled(process.env.SHOW_BIRTHDAY_ICON) ||
|
||||
process.env.SHOW_BIRTHDAY_ICON === '',
|
||||
helpAndFaqURL: process.env.HELP_AND_FAQ_URL || 'https://librechat.ai',
|
||||
helpAndFaqURL: process.env.HELP_AND_FAQ_URL || 'https://hanzo.ai/chat',
|
||||
interface: req.app.locals.interfaceConfig,
|
||||
turnstile: req.app.locals.turnstileConfig,
|
||||
modelSpecs: req.app.locals.modelSpecs,
|
||||
|
||||
@@ -45,7 +45,7 @@ async function loadCustomConfig(printConfig = true) {
|
||||
if (!customConfig) {
|
||||
i === 0 &&
|
||||
logger.info(
|
||||
'Custom config file missing or YAML format invalid.\n\nCheck out the latest config file guide for configurable options and features.\nhttps://www.librechat.ai/docs/configuration/librechat_yaml\n\n',
|
||||
'Custom config file missing or YAML format invalid.\n\nCheck out the latest config file guide for configurable options and features.\nhttps://hanzo.ai/docs/chat/configuration/librechat_yaml\n\n',
|
||||
);
|
||||
i === 0 && i++;
|
||||
return null;
|
||||
@@ -80,7 +80,7 @@ Please specify a correct \`imageOutputType\` value (case-sensitive).
|
||||
- ${EImageOutputType.WEBP}
|
||||
|
||||
Refer to the latest config file guide for more information:
|
||||
https://www.librechat.ai/docs/configuration/librechat_yaml`,
|
||||
https://hanzo.ai/docs/chat/configuration/librechat_yaml`,
|
||||
);
|
||||
}
|
||||
if (!result.success) {
|
||||
@@ -100,7 +100,7 @@ ${JSON.stringify(result.error, null, 2)}`;
|
||||
The Speech-to-text and Text-to-speech configuration format has recently changed.
|
||||
If you're getting this error, please refer to the latest documentation:
|
||||
|
||||
https://www.librechat.ai/docs/configuration/stt_tts`);
|
||||
https://hanzo.ai/docs/chat/configuration/stt_tts`);
|
||||
}
|
||||
|
||||
i++;
|
||||
|
||||
@@ -733,7 +733,7 @@ const processOpenAIImageOutput = async ({ req, buffer, file_id, filename, fileEx
|
||||
*
|
||||
* @param {Object} params - The params passed to the function.
|
||||
* @param {OpenAIClient} params.openai - The OpenAI client instance.
|
||||
* @param {RunClient} params.client - The LibreChat client instance: either refers to `openai` or `streamRunManager`.
|
||||
* @param {RunClient} params.client - The Hanzo Chat client instance: either refers to `openai` or `streamRunManager`.
|
||||
* @param {string} params.file_id - The ID of the file to retrieve.
|
||||
* @param {string} [params.basename] - The basename of the file (if image); e.g., 'image.jpg'. `undefined` for `file_citation` annotations.
|
||||
* @param {boolean} [params.unknownType] - Whether the file type is unknown.
|
||||
|
||||
@@ -179,12 +179,12 @@ async function saveAssistantMessage(req, params) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Records LibreChat messageId to all response messages' metadata
|
||||
* Records Hanzo Chat messageId to all response messages' metadata
|
||||
*
|
||||
* @param {Object} params - The parameters for initializing a thread.
|
||||
* @param {OpenAIClient} params.openai - The OpenAI client instance.
|
||||
* @param {string} params.thread_id - Response thread ID.
|
||||
* @param {string} params.messageId - The response `messageId` generated by LibreChat.
|
||||
* @param {string} params.messageId - The response `messageId` generated by Hanzo Chat.
|
||||
* @param {StepMessage[] | Message[]} params.messages - A list of messages to start the thread with.
|
||||
* @return {Promise<ThreadMessage[]>} A promise that resolves to the updated messages
|
||||
*/
|
||||
@@ -205,8 +205,8 @@ async function addThreadMetadata({ openai, thread_id, messageId, messages }) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Synchronizes LibreChat messages to Thread Messages.
|
||||
* Updates the LibreChat DB with any missing Thread Messages and
|
||||
* Synchronizes Hanzo Chat messages to Thread Messages.
|
||||
* Updates the Hanzo Chat DB with any missing Thread Messages and
|
||||
* updates the missing Thread Messages' metadata with their corresponding db messageId's.
|
||||
*
|
||||
* Also updates the existing conversation's file_ids with any new file_ids.
|
||||
@@ -215,7 +215,7 @@ async function addThreadMetadata({ openai, thread_id, messageId, messages }) {
|
||||
* @param {OpenAIClient} params.openai - The OpenAI client instance.
|
||||
* @param {string} params.endpoint - The current endpoint.
|
||||
* @param {string} params.thread_id - The current thread ID.
|
||||
* @param {TMessage[]} params.dbMessages - The LibreChat DB messages.
|
||||
* @param {TMessage[]} params.dbMessages - The Hanzo Chat DB messages.
|
||||
* @param {ThreadMessage[]} params.apiMessages - The thread messages from the API.
|
||||
* @param {string} [params.assistant_id] - The current assistant ID.
|
||||
* @param {string} params.conversationId - The current conversation ID.
|
||||
@@ -394,15 +394,15 @@ function mapMessagesToSteps(steps, messages) {
|
||||
|
||||
/**
|
||||
* Checks for any missing messages; if missing,
|
||||
* synchronizes LibreChat messages to Thread Messages
|
||||
* synchronizes Hanzo Chat messages to Thread Messages
|
||||
*
|
||||
* @param {Object} params - The parameters for initializing a thread.
|
||||
* @param {OpenAIClient} params.openai - The OpenAI client instance.
|
||||
* @param {string} params.endpoint - The current endpoint.
|
||||
* @param {string} [params.latestMessageId] - Optional: The latest message ID from LibreChat.
|
||||
* @param {string} [params.latestMessageId] - Optional: The latest message ID from Hanzo Chat.
|
||||
* @param {string} params.thread_id - Response thread ID.
|
||||
* @param {string} params.run_id - Response Run ID.
|
||||
* @param {string} params.conversationId - LibreChat conversation ID.
|
||||
* @param {string} params.conversationId - Hanzo Chat conversation ID.
|
||||
* @return {Promise<TMessage[]>} A promise that resolves to the updated messages
|
||||
*/
|
||||
async function checkMessageGaps({
|
||||
@@ -500,7 +500,7 @@ async function checkMessageGaps({
|
||||
* @param {number} params.completion_tokens - The number of completion tokens used.
|
||||
* @param {string} params.model - The model used by the assistant run.
|
||||
* @param {string} params.user - The user's ID.
|
||||
* @param {string} params.conversationId - LibreChat conversation ID.
|
||||
* @param {string} params.conversationId - Hanzo Chat conversation ID.
|
||||
* @param {string} [params.context='message'] - The context of the usage. Defaults to 'message'.
|
||||
* @return {Promise<TMessage[]>} A promise that resolves to the updated messages
|
||||
*/
|
||||
@@ -531,7 +531,7 @@ const uniqueCitationEnd = '==|||||^';
|
||||
*
|
||||
* @param {object} params - The parameters for processing messages.
|
||||
* @param {OpenAIClient} params.openai - The OpenAI client instance.
|
||||
* @param {RunClient} params.client - The LibreChat client that manages the run: either refers to `OpenAI` or `StreamRunManager`.
|
||||
* @param {RunClient} params.client - The Hanzo Chat client that manages the run: either refers to `OpenAI` or `StreamRunManager`.
|
||||
* @param {ThreadMessage[]} params.messages - An array of messages.
|
||||
* @returns {Promise<{messages: ThreadMessage[], text: string, edited: boolean}>} The sorted messages, the flattened text, and whether it was edited.
|
||||
*/
|
||||
|
||||
@@ -19,12 +19,12 @@ const deprecatedVariables = [
|
||||
{
|
||||
key: 'CHECK_BALANCE',
|
||||
description:
|
||||
'Please use the `balance` field in the `librechat.yaml` config file instead.\nMore info: https://librechat.ai/docs/configuration/librechat_yaml/object_structure/balance#overview',
|
||||
'Please use the `balance` field in the `librechat.yaml` config file instead.\nMore info: https://hanzo.ai/docs/chat/configuration/librechat_yaml/object_structure/balance#overview',
|
||||
},
|
||||
{
|
||||
key: 'START_BALANCE',
|
||||
description:
|
||||
'Please use the `balance` field in the `librechat.yaml` config file instead.\nMore info: https://librechat.ai/docs/configuration/librechat_yaml/object_structure/balance#overview',
|
||||
'Please use the `balance` field in the `librechat.yaml` config file instead.\nMore info: https://hanzo.ai/docs/chat/configuration/librechat_yaml/object_structure/balance#overview',
|
||||
},
|
||||
{
|
||||
key: 'GOOGLE_API_KEY',
|
||||
@@ -52,7 +52,7 @@ function checkVariables() {
|
||||
logger.info(`\u200B
|
||||
|
||||
For your convenience, use this tool to generate your own secret values:
|
||||
https://www.librechat.ai/toolkit/creds_generator
|
||||
https://hanzo.ai/docs/chat/toolkit/creds_generator
|
||||
|
||||
\u200B`);
|
||||
}
|
||||
@@ -117,7 +117,7 @@ Latest version: ${Constants.CONFIG_VERSION}
|
||||
|
||||
Check out the Config changelogs for the latest options and features added.
|
||||
|
||||
https://www.librechat.ai/changelog\n\n`,
|
||||
https://hanzo.ai/docs/chat/changelog\n\n`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -136,7 +136,7 @@ function checkPasswordReset() {
|
||||
|
||||
Please configure email service for secure password reset functionality.
|
||||
|
||||
https://www.librechat.ai/docs/configuration/authentication/email
|
||||
https://hanzo.ai/docs/chat/configuration/authentication/email
|
||||
|
||||
❗❗❗`,
|
||||
);
|
||||
@@ -182,7 +182,7 @@ function checkWebSearchConfig(webSearchConfig) {
|
||||
|
||||
Then set the actual API key in your .env file or environment variables.
|
||||
|
||||
More info: https://www.librechat.ai/docs/configuration/librechat_yaml/web_search`,
|
||||
More info: https://hanzo.ai/docs/chat/configuration/librechat_yaml/web_search`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ describe('checkWebSearchConfig', () => {
|
||||
|
||||
expect(logger.warn).toHaveBeenCalledWith(
|
||||
expect.stringContaining(
|
||||
'More info: https://www.librechat.ai/docs/configuration/librechat_yaml/web_search',
|
||||
'More info: https://hanzo.ai/docs/chat/configuration/librechat_yaml/web_search',
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -53,7 +53,7 @@ function processModelSpecs(endpoints, _modelSpecs, interfaceConfig) {
|
||||
if (!endpoint) {
|
||||
logger.warn(`Model spec with endpoint "${spec.preset.endpoint}" was skipped: Endpoint not found in configuration. The \`endpoint\` value must exactly match either a system-defined endpoint or a custom endpoint defined by the user.
|
||||
|
||||
For more information, see the documentation at https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/model_specs#endpoint`);
|
||||
For more information, see the documentation at https://hanzo.ai/docs/chat/configuration/librechat_yaml/object_structure/model_specs#endpoint`);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ function getImporter(jsonData) {
|
||||
return importChatBotUiConvo;
|
||||
}
|
||||
|
||||
// For LibreChat
|
||||
// For Hanzo Chat / LibreChat format
|
||||
if (jsonData.conversationId && (jsonData.messagesTree || jsonData.messages)) {
|
||||
logger.info('Importing LibreChat conversation');
|
||||
logger.info('Importing Hanzo Chat conversation');
|
||||
return importLibreChatConvo;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ async function importChatBotUiConvo(
|
||||
}
|
||||
|
||||
/**
|
||||
* Imports a LibreChat conversation from JSON.
|
||||
* Imports a Hanzo Chat conversation from JSON.
|
||||
*
|
||||
* @param {Object} jsonData - The JSON data representing the conversation.
|
||||
* @param {string} requestUserId - The ID of the user making the import request.
|
||||
@@ -151,7 +151,7 @@ async function importLibreChatConvo(
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new Error('Invalid LibreChat file format');
|
||||
throw new Error('Invalid Hanzo Chat file format');
|
||||
}
|
||||
|
||||
if (firstMessageDate === 'Invalid Date') {
|
||||
@@ -162,7 +162,7 @@ async function importLibreChatConvo(
|
||||
await importBatchBuilder.saveBatch();
|
||||
logger.debug(`user: ${requestUserId} | Conversation "${jsonData.title}" imported`);
|
||||
} catch (error) {
|
||||
logger.error(`user: ${requestUserId} | Error creating conversation from LibreChat file`, error);
|
||||
logger.error(`user: ${requestUserId} | Error creating conversation from Hanzo Chat file`, error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1610,7 +1610,7 @@
|
||||
* @typedef {Object} ResponseMessage
|
||||
* @property {string} conversationId - The ID of the conversation.
|
||||
* @property {string} thread_id - The ID of the thread.
|
||||
* @property {string} messageId - The ID of the message (from LibreChat).
|
||||
* @property {string} messageId - The ID of the message (from Hanzo Chat).
|
||||
* @property {string} parentMessageId - The ID of the parent message.
|
||||
* @property {string} user - The ID of the user.
|
||||
* @property {string} assistant_id - The ID of the assistant.
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@librechat/frontend",
|
||||
"name": "@hanzochat/frontend",
|
||||
"version": "v0.8.0-rc2",
|
||||
"description": "",
|
||||
"type": "module",
|
||||
@@ -18,15 +18,15 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/danny-avila/LibreChat.git"
|
||||
"url": "git+https://github.com/hanzoai/chat.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/danny-avila/LibreChat/issues"
|
||||
"url": "https://github.com/hanzoai/chat/issues"
|
||||
},
|
||||
"homepage": "https://librechat.ai",
|
||||
"homepage": "https://hanzo.ai/chat",
|
||||
"dependencies": {
|
||||
"@ariakit/react": "^0.4.15",
|
||||
"@ariakit/react-core": "^0.4.17",
|
||||
|
||||
@@ -11,7 +11,7 @@ function ModelSelectorContent() {
|
||||
const localize = useLocalize();
|
||||
|
||||
const {
|
||||
// LibreChat
|
||||
// App Data
|
||||
modelSpecs,
|
||||
mappedEndpoints,
|
||||
endpointsConfig,
|
||||
|
||||
@@ -15,7 +15,7 @@ type ModelSelectorContextType = {
|
||||
selectedValues: SelectedValues;
|
||||
endpointSearchValues: Record<string, string>;
|
||||
searchResults: (t.TModelSpec | Endpoint)[] | null;
|
||||
// LibreChat
|
||||
// App Data
|
||||
modelSpecs: t.TModelSpec[];
|
||||
mappedEndpoints: Endpoint[];
|
||||
agentsMap: t.TAgentsMap | undefined;
|
||||
@@ -165,7 +165,7 @@ export function ModelSelectorProvider({ children, startupConfig }: ModelSelector
|
||||
searchResults,
|
||||
selectedValues,
|
||||
endpointSearchValues,
|
||||
// LibreChat
|
||||
// App Data
|
||||
agentsMap,
|
||||
modelSpecs,
|
||||
assistantsMap,
|
||||
|
||||
@@ -201,7 +201,7 @@ const AdminSettings = () => {
|
||||
<span>{localize('com_ui_admin_access_warning')}</span>
|
||||
{'\n'}
|
||||
<a
|
||||
href="https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/interface"
|
||||
href="https://hanzo.ai/docs/chat/configuration/librechat_yaml/object_structure/interface"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="inline-flex items-center text-blue-500 underline"
|
||||
|
||||
@@ -196,7 +196,7 @@ const AdminSettings = () => {
|
||||
<span>{localize('com_ui_admin_access_warning')}</span>
|
||||
{'\n'}
|
||||
<a
|
||||
href="https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/interface"
|
||||
href="https://hanzo.ai/docs/chat/configuration/librechat_yaml/object_structure/interface"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="text-blue-500 underline"
|
||||
|
||||
@@ -73,7 +73,7 @@ export default function ApiKeyDialog({
|
||||
))}
|
||||
</div>
|
||||
<a
|
||||
href="https://code.librechat.ai/pricing"
|
||||
href="https://hanzo.ai/docs/chat/code-interpreter/pricing"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="block text-center text-[15px] font-medium text-blue-500 underline decoration-1 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-300"
|
||||
|
||||
@@ -187,7 +187,7 @@ const AdminSettings = () => {
|
||||
<span>{localize('com_ui_admin_access_warning')}</span>
|
||||
{'\n'}
|
||||
<a
|
||||
href="https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/interface"
|
||||
href="https://hanzo.ai/docs/chat/configuration/librechat_yaml/object_structure/interface"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="text-blue-500 underline"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# LibreChat Localization Guide
|
||||
# Hanzo Chat Localization Guide
|
||||
|
||||
This guide explains how to add new languages to LibreChat's localization system.
|
||||
This guide explains how to add new languages to Hanzo Chat's localization system.
|
||||
|
||||
## Adding a New Language
|
||||
|
||||
To add a new language to LibreChat, follow these steps:
|
||||
To add a new language to Hanzo Chat, follow these steps:
|
||||
|
||||
### 1. Add the Language to Locize Project
|
||||
|
||||
- Navigate to the [LibreChat locize project](https://www.locize.app/cat/62uyy7c9),
|
||||
- Navigate to the locize project,
|
||||
- Click the "ADD LANGUAGE" button, typically found within the "..." menu of the "Start to translate" card on the project overview page.
|
||||
|
||||
### 2. Update the Language Selector Component
|
||||
@@ -108,7 +108,7 @@ fallbackLng: {
|
||||
|
||||
After adding a new language:
|
||||
|
||||
1. The empty translation file will be populated through LibreChat's automated translation platform
|
||||
1. The empty translation file will be populated through the automated translation platform
|
||||
2. Only the English (`en`) translation file should be manually updated
|
||||
3. Other language translations are managed externally
|
||||
|
||||
|
||||
+21
-3
@@ -12,14 +12,32 @@ services:
|
||||
environment:
|
||||
# Production settings
|
||||
NODE_ENV: production
|
||||
DOMAIN_CLIENT: https://hanzo.chat
|
||||
DOMAIN_SERVER: https://hanzo.chat
|
||||
ALLOW_REGISTRATION: ${ALLOW_REGISTRATION:-false}
|
||||
|
||||
# Use production API
|
||||
|
||||
# All AI requests go through Hanzo API gateway
|
||||
OPENAI_BASE_URL: https://api.hanzo.ai/v1
|
||||
|
||||
|
||||
# Production secrets (use real values)
|
||||
JWT_SECRET: ${JWT_SECRET:?JWT_SECRET is required}
|
||||
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET:?JWT_REFRESH_SECRET is required}
|
||||
CREDS_KEY: ${CREDS_KEY:?CREDS_KEY is required}
|
||||
CREDS_IV: ${CREDS_IV:?CREDS_IV is required}
|
||||
OPENAI_API_KEY: ${OPENAI_API_KEY:?OPENAI_API_KEY is required}
|
||||
|
||||
# Hanzo IAM OpenID Connect
|
||||
OPENID_CLIENT_ID: ${OPENID_CLIENT_ID:?OPENID_CLIENT_ID is required}
|
||||
OPENID_CLIENT_SECRET: ${OPENID_CLIENT_SECRET:?OPENID_CLIENT_SECRET is required}
|
||||
OPENID_ISSUER: https://hanzo.id
|
||||
OPENID_SESSION_SECRET: ${OPENID_SESSION_SECRET:?OPENID_SESSION_SECRET is required}
|
||||
OPENID_SCOPE: openid profile email
|
||||
OPENID_CALLBACK_URL: /oauth/openid/callback
|
||||
OPENID_BUTTON_LABEL: Log in with Hanzo
|
||||
OPENID_IMAGE_URL: https://hanzo.ai/logo/icon.svg
|
||||
OPENID_USERNAME_CLAIM: name
|
||||
OPENID_NAME_CLAIM: name
|
||||
OPENID_USE_PKCE: "true"
|
||||
labels:
|
||||
# Traefik routing
|
||||
- "traefik.enable=true"
|
||||
|
||||
+34
-12
@@ -8,6 +8,8 @@ services:
|
||||
mongodb:
|
||||
image: mongo:7-jammy
|
||||
container_name: hanzo-mongodb
|
||||
ports:
|
||||
- "27017:27017"
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME:-hanzo}
|
||||
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD:-hanzo123}
|
||||
@@ -34,33 +36,53 @@ services:
|
||||
networks:
|
||||
- hanzo-network
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:7700/health"]
|
||||
test: ["CMD", "curl", "-f", "http://127.0.0.1:7700/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 30s
|
||||
|
||||
# Hanzo Chat UI (LibreChat Fork)
|
||||
# Hanzo Chat UI
|
||||
chat:
|
||||
image: hanzoai/chat:latest
|
||||
image: ghcr.io/hanzoai/chat:latest
|
||||
container_name: hanzo-chat
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile
|
||||
ports:
|
||||
- "3081:3080"
|
||||
environment:
|
||||
# Domain (override for production: https://hanzo.chat)
|
||||
DOMAIN_CLIENT: ${DOMAIN_CLIENT:-http://localhost:3081}
|
||||
DOMAIN_SERVER: ${DOMAIN_SERVER:-http://localhost:3081}
|
||||
|
||||
# Database
|
||||
MONGO_URI: mongodb://${MONGO_USERNAME:-hanzo}:${MONGO_PASSWORD:-hanzo123}@mongodb:27017/HanzoChat?authSource=admin
|
||||
|
||||
|
||||
# Search
|
||||
MEILI_HOST: http://meilisearch:7700
|
||||
MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:-hanzo-search-key}
|
||||
|
||||
|
||||
# Auth
|
||||
ALLOW_REGISTRATION: ${ALLOW_REGISTRATION:-true}
|
||||
ALLOW_SOCIAL_LOGIN: ${ALLOW_SOCIAL_LOGIN:-true}
|
||||
ALLOW_SOCIAL_REGISTRATION: ${ALLOW_SOCIAL_REGISTRATION:-true}
|
||||
JWT_SECRET: ${JWT_SECRET:-your-super-secret-jwt}
|
||||
|
||||
# AI Provider - Point to Hanzo Router or external API
|
||||
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET:-your-super-secret-jwt-refresh}
|
||||
CREDS_KEY: ${CREDS_KEY:-}
|
||||
CREDS_IV: ${CREDS_IV:-}
|
||||
|
||||
# Hanzo IAM OpenID Connect
|
||||
OPENID_CLIENT_ID: ${OPENID_CLIENT_ID:-}
|
||||
OPENID_CLIENT_SECRET: ${OPENID_CLIENT_SECRET:-}
|
||||
OPENID_ISSUER: ${OPENID_ISSUER:-}
|
||||
OPENID_SESSION_SECRET: ${OPENID_SESSION_SECRET:-}
|
||||
OPENID_SCOPE: ${OPENID_SCOPE:-openid profile email}
|
||||
OPENID_CALLBACK_URL: ${OPENID_CALLBACK_URL:-/oauth/openid/callback}
|
||||
OPENID_BUTTON_LABEL: ${OPENID_BUTTON_LABEL:-Log in with Hanzo}
|
||||
OPENID_IMAGE_URL: ${OPENID_IMAGE_URL:-}
|
||||
OPENID_USERNAME_CLAIM: ${OPENID_USERNAME_CLAIM:-name}
|
||||
OPENID_NAME_CLAIM: ${OPENID_NAME_CLAIM:-name}
|
||||
OPENID_USE_PKCE: ${OPENID_USE_PKCE:-true}
|
||||
|
||||
# AI Provider - All requests go through Hanzo API gateway
|
||||
OPENAI_API_KEY: ${OPENAI_API_KEY:-sk-hanzo-your-key}
|
||||
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-https://api.hanzo.ai/v1}
|
||||
|
||||
|
||||
@@ -40,8 +40,8 @@ const shouldRebase = process.argv.includes('--rebase');
|
||||
console.orange(downCommand);
|
||||
execSync(downCommand, { stdio: 'inherit' });
|
||||
|
||||
console.purple('Removing all tags for LibreChat `deployed` images...');
|
||||
const repositories = ['ghcr.io/danny-avila/librechat-dev-api', 'librechat-client'];
|
||||
console.purple('Removing all tags for Hanzo Chat `deployed` images...');
|
||||
const repositories = ['ghcr.io/hanzoai/chat', 'hanzoai-chat-client'];
|
||||
repositories.forEach((repo) => {
|
||||
const tags = execSync(`sudo docker images ${repo} -q`, { encoding: 'utf8' })
|
||||
.split('\n')
|
||||
@@ -53,16 +53,16 @@ const shouldRebase = process.argv.includes('--rebase');
|
||||
});
|
||||
});
|
||||
|
||||
console.purple('Pulling latest LibreChat images...');
|
||||
console.purple('Pulling latest Hanzo Chat images...');
|
||||
const pullCommand = 'sudo docker-compose -f ./deploy-compose.yml pull api';
|
||||
console.orange(pullCommand);
|
||||
execSync(pullCommand, { stdio: 'inherit' });
|
||||
|
||||
let startCommand = 'sudo docker-compose -f ./deploy-compose.yml up -d';
|
||||
console.green('Your LibreChat app is now up to date! Start the app with the following command:');
|
||||
console.green('Your Hanzo Chat app is now up to date! Start the app with the following command:');
|
||||
console.purple(startCommand);
|
||||
console.orange(
|
||||
'Note: it\'s also recommended to clear your browser cookies and localStorage for LibreChat to assure a fully clean installation.',
|
||||
'Note: it\'s also recommended to clear your browser cookies and localStorage for Hanzo Chat to assure a fully clean installation.',
|
||||
);
|
||||
console.orange('Also: Don\'t worry, your data is safe :)');
|
||||
})();
|
||||
|
||||
@@ -50,7 +50,7 @@ const connect = require('./connect');
|
||||
const token = await createInvite(email);
|
||||
const inviteLink = `${process.env.DOMAIN_CLIENT}/register?token=${token}`;
|
||||
|
||||
const appName = process.env.APP_TITLE || 'LibreChat';
|
||||
const appName = process.env.APP_TITLE || 'Hanzo Chat';
|
||||
|
||||
if (!checkEmailConfig()) {
|
||||
console.green('Send this link to the user:', inviteLink);
|
||||
|
||||
@@ -50,7 +50,7 @@ const connect = require('./connect');
|
||||
console.green('MeiliSearch sync flags have been reset successfully!');
|
||||
console.cyan(`\nTotal messages to sync: ${totalMessages}`);
|
||||
console.cyan(`Total conversations to sync: ${totalConversations}`);
|
||||
console.yellow('\nThe next time LibreChat starts or performs a sync check,');
|
||||
console.yellow('\nThe next time Hanzo Chat starts or performs a sync check,');
|
||||
console.yellow('all data will be re-indexed into MeiliSearch.');
|
||||
console.purple('---------------------------------------\n');
|
||||
|
||||
@@ -59,7 +59,7 @@ const connect = require('./connect');
|
||||
|
||||
if (showAdvanced.toLowerCase() === 'y') {
|
||||
console.cyan('\nAdvanced Options:');
|
||||
console.yellow('1. To trigger immediate sync, restart LibreChat');
|
||||
console.yellow('1. To trigger immediate sync, restart Hanzo Chat');
|
||||
console.yellow('2. To disable sync, set MEILI_NO_SYNC=true in .env');
|
||||
console.yellow(
|
||||
'3. To adjust sync batch size, set MEILI_SYNC_BATCH_SIZE in .env (default: 100)',
|
||||
|
||||
+6
-6
@@ -89,17 +89,17 @@ async function validateDockerRunning() {
|
||||
}down`;
|
||||
console.orange(downCommand);
|
||||
execSync(downCommand, { stdio: 'inherit' });
|
||||
console.purple('Pruning all LibreChat Docker images...');
|
||||
console.purple('Pruning all Hanzo Chat Docker images...');
|
||||
|
||||
const imageName = singleCompose ? 'librechat_single' : 'librechat';
|
||||
const imageName = singleCompose ? 'hanzo-chat_single' : 'hanzo-chat';
|
||||
try {
|
||||
execSync(`${sudo}docker rmi ${imageName}:latest`, { stdio: 'inherit' });
|
||||
} catch (e) {
|
||||
console.purple('Failed to remove Docker image librechat:latest. It might not exist.');
|
||||
console.purple('Failed to remove Docker image hanzo-chat:latest. It might not exist.');
|
||||
}
|
||||
console.purple('Removing all unused dangling Docker images...');
|
||||
execSync(`${sudo}docker image prune -f`, { stdio: 'inherit' });
|
||||
console.purple('Building new LibreChat image...');
|
||||
console.purple('Building new Hanzo Chat image...');
|
||||
const buildCommand = `${sudo}docker compose ${
|
||||
singleCompose ? '-f ./docs/dev/single-compose.yml ' : ''
|
||||
}build --no-cache`;
|
||||
@@ -128,10 +128,10 @@ async function validateDockerRunning() {
|
||||
singleCompose ? '-f ./docs/dev/single-compose.yml ' : ''
|
||||
}up`;
|
||||
}
|
||||
console.green('Your LibreChat app is now up to date! Start the app with the following command:');
|
||||
console.green('Your Hanzo Chat app is now up to date! Start the app with the following command:');
|
||||
console.purple(startCommand);
|
||||
console.orange(
|
||||
"Note: it's also recommended to clear your browser cookies and localStorage for LibreChat to assure a fully clean installation.",
|
||||
"Note: it's also recommended to clear your browser cookies and localStorage for Hanzo Chat to assure a fully clean installation.",
|
||||
);
|
||||
console.orange("Also: Don't worry, your data is safe :)");
|
||||
})();
|
||||
|
||||
+5
-5
@@ -4,8 +4,8 @@ services:
|
||||
# context: .
|
||||
# dockerfile: Dockerfile.multi
|
||||
# target: api-build
|
||||
image: ghcr.io/danny-avila/librechat-dev-api:latest
|
||||
container_name: LibreChat-API
|
||||
image: ghcr.io/hanzoai/chat:latest
|
||||
container_name: HanzoChat-API
|
||||
ports:
|
||||
- 3080:3080
|
||||
depends_on:
|
||||
@@ -19,7 +19,7 @@ services:
|
||||
environment:
|
||||
- HOST=0.0.0.0
|
||||
- NODE_ENV=production
|
||||
- MONGO_URI=mongodb://mongodb:27017/LibreChat
|
||||
- MONGO_URI=mongodb://mongodb:27017/HanzoChat
|
||||
- MEILI_HOST=http://meilisearch:7700
|
||||
- RAG_PORT=${RAG_PORT:-8000}
|
||||
- RAG_API_URL=http://rag_api:${RAG_PORT:-8000}
|
||||
@@ -33,7 +33,7 @@ services:
|
||||
|
||||
client:
|
||||
image: nginx:1.27.0-alpine
|
||||
container_name: LibreChat-NGINX
|
||||
container_name: HanzoChat-NGINX
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
@@ -74,7 +74,7 @@ services:
|
||||
volumes:
|
||||
- pgdata2:/var/lib/postgresql/data
|
||||
rag_api:
|
||||
image: ghcr.io/danny-avila/librechat-rag-api-dev-lite:latest
|
||||
image: ghcr.io/hanzoai/chat-rag-api:latest
|
||||
environment:
|
||||
- DB_HOST=vectordb
|
||||
- RAG_PORT=${RAG_PORT:-8000}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# - type: bind
|
||||
# source: ./librechat.yaml
|
||||
# target: /app/librechat.yaml
|
||||
# image: ghcr.io/danny-avila/librechat:latest
|
||||
# image: ghcr.io/hanzoai/chat:latest
|
||||
|
||||
# ---------------------------------------------------
|
||||
|
||||
@@ -39,19 +39,19 @@
|
||||
|
||||
# # BUILD FROM LATEST IMAGE
|
||||
# api:
|
||||
# image: ghcr.io/danny-avila/librechat-dev:latest
|
||||
# image: ghcr.io/hanzoai/chat-dev:latest
|
||||
|
||||
# # BUILD FROM LATEST IMAGE (NUMBERED RELEASE)
|
||||
# api:
|
||||
# image: ghcr.io/danny-avila/librechat:latest
|
||||
# image: ghcr.io/hanzoai/chat:latest
|
||||
|
||||
# # BUILD FROM LATEST API IMAGE
|
||||
# api:
|
||||
# image: ghcr.io/danny-avila/librechat-dev-api:latest
|
||||
# image: ghcr.io/hanzoai/chat-dev-api:latest
|
||||
|
||||
# # BUILD FROM LATEST API IMAGE (NUMBERED RELEASE)
|
||||
# api:
|
||||
# image: ghcr.io/danny-avila/librechat-api:latest
|
||||
# image: ghcr.io/hanzoai/chat-api:latest
|
||||
|
||||
# # ADD SAML CERT FILE
|
||||
# api:
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
# # USE RAG API IMAGE WITH LOCAL EMBEDDINGS SUPPORT
|
||||
# rag_api:
|
||||
# image: ghcr.io/danny-avila/librechat-rag-api-dev:latest
|
||||
# image: ghcr.io/hanzoai/chat-rag-api-dev:latest
|
||||
# # For Linux user:
|
||||
# extra_hosts:
|
||||
# - "host.docker.internal:host-gateway"
|
||||
|
||||
+4
-4
@@ -3,20 +3,20 @@
|
||||
|
||||
services:
|
||||
api:
|
||||
container_name: LibreChat
|
||||
container_name: HanzoChat
|
||||
ports:
|
||||
- "${PORT}:${PORT}"
|
||||
depends_on:
|
||||
- mongodb
|
||||
- rag_api
|
||||
image: ghcr.io/danny-avila/librechat-dev:latest
|
||||
image: ghcr.io/hanzoai/chat:latest
|
||||
restart: always
|
||||
user: "${UID}:${GID}"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
environment:
|
||||
- HOST=0.0.0.0
|
||||
- MONGO_URI=mongodb://mongodb:27017/LibreChat
|
||||
- MONGO_URI=mongodb://mongodb:27017/HanzoChat
|
||||
- MEILI_HOST=http://meilisearch:7700
|
||||
- RAG_PORT=${RAG_PORT:-8000}
|
||||
- RAG_API_URL=http://rag_api:${RAG_PORT:-8000}
|
||||
@@ -58,7 +58,7 @@ services:
|
||||
- pgdata2:/var/lib/postgresql/data
|
||||
rag_api:
|
||||
container_name: rag_api
|
||||
image: ghcr.io/danny-avila/librechat-rag-api-dev-lite:latest
|
||||
image: ghcr.io/hanzoai/chat-rag-api:latest
|
||||
environment:
|
||||
- DB_HOST=vectordb
|
||||
- RAG_PORT=${RAG_PORT:-8000}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Hanzo Chat with Demo User
|
||||
FROM ghcr.io/danny-avila/librechat:latest
|
||||
FROM ghcr.io/hanzoai/chat:latest
|
||||
|
||||
# Copy demo user initialization script
|
||||
COPY scripts/seed_demo_user.js /app/scripts/
|
||||
COPY docker/entrypoint-with-demo.sh /app/
|
||||
|
||||
# Node.js should already be available in the base LibreChat image
|
||||
# Node.js should already be available in the base Hanzo Chat image
|
||||
USER root
|
||||
|
||||
RUN chmod +x /app/entrypoint-with-demo.sh
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Hanzo Chat - Alpine version
|
||||
FROM ghcr.io/danny-avila/librechat:latest
|
||||
FROM ghcr.io/hanzoai/chat:latest
|
||||
|
||||
# Set environment defaults
|
||||
ENV HOST=0.0.0.0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Hanzo Chat - LibreChat Fork
|
||||
FROM ghcr.io/danny-avila/librechat:latest
|
||||
# Hanzo Chat
|
||||
FROM ghcr.io/hanzoai/chat:latest
|
||||
|
||||
# Install additional dependencies if needed
|
||||
USER root
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Hanzo AI Chat - Clean LibreChat Deployment
|
||||
# Hanzo AI Chat - Clean Deployment
|
||||
# Uses external Hanzo API at api.hanzo.ai
|
||||
|
||||
version: '3.8'
|
||||
@@ -43,7 +43,7 @@ services:
|
||||
networks:
|
||||
- hanzo-network
|
||||
|
||||
# Hanzo Chat (LibreChat)
|
||||
# Hanzo Chat
|
||||
chat:
|
||||
build:
|
||||
context: .
|
||||
|
||||
@@ -123,7 +123,7 @@ services:
|
||||
networks:
|
||||
- hanzo-network
|
||||
|
||||
# Hanzo Chat Frontend (LibreChat)
|
||||
# Hanzo Chat Frontend
|
||||
chat:
|
||||
build:
|
||||
context: .
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: librechat-rag-api
|
||||
description: A Helm chart for LibreChat
|
||||
description: A Helm chart for Hanzo Chat RAG API
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
@@ -21,10 +21,10 @@ version: 0.5.2
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
|
||||
# renovate: image=ghcr.io/danny-avila/librechat-rag-api-dev
|
||||
# renovate: image=ghcr.io/hanzoai/chat-rag-api
|
||||
appVersion: "v0.4.0"
|
||||
|
||||
home: https://www.librechat.ai
|
||||
home: https://hanzo.ai
|
||||
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Librechat RAG API Helm CHart
|
||||
# Hanzo Chat RAG API Helm Chart
|
||||
|
||||
> [!WARNING]
|
||||
> This Helm-Chart is needed for LibreChat and Deployment information is documented in (the librechat chart)[../librechat/readme.md]
|
||||
> [!WARNING]
|
||||
> This Helm-Chart is needed for Hanzo Chat and Deployment information is documented in (the librechat chart)[../librechat/readme.md]
|
||||
|
||||
@@ -8,7 +8,7 @@ rag:
|
||||
EMBEDDINGS_PROVIDER: openai
|
||||
|
||||
image:
|
||||
repository: danny-avila/librechat-rag-api-dev-lite # there is rag-api-dev and rag-api-dev-lite. currently only lite is docuimented
|
||||
repository: hanzoai/chat-rag-api # there is rag-api-dev and rag-api-dev-lite. currently only lite is documented
|
||||
registry: ghcr.io
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v2
|
||||
name: librechat
|
||||
description: A Helm chart for LibreChat
|
||||
icon: https://www.librechat.ai/librechat_alt.svg
|
||||
description: A Helm chart for Hanzo Chat
|
||||
icon: https://hanzo.ai/favicon.ico
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
@@ -22,10 +22,10 @@ version: 1.8.10
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
|
||||
# renovate: image=ghcr.io/danny-avila/librechat
|
||||
# renovate: image=ghcr.io/hanzoai/chat
|
||||
appVersion: "v0.8.0-rc2"
|
||||
|
||||
home: https://www.librechat.ai
|
||||
home: https://hanzo.ai
|
||||
|
||||
dependencies:
|
||||
- name: mongodb
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# LibreChat Helm Chart
|
||||
This Librechat Helm Chart provides an easy, light weight template to deploy LibreChat on Kubernetes
|
||||
# Hanzo Chat Helm Chart
|
||||
This Helm Chart provides an easy, light weight template to deploy Hanzo Chat on Kubernetes
|
||||
|
||||
## Variables
|
||||
In this Chart, LibreChat will only work with environment Variables. You can Specify Vars and Secret using an existing Secret (This can be generated by [creating an Env File and converting it to a Kubernetes Secret](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#-em-secret-em-) `--from-env-file`)
|
||||
In this Chart, Hanzo Chat will only work with environment Variables. You can Specify Vars and Secret using an existing Secret (This can be generated by [creating an Env File and converting it to a Kubernetes Secret](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#-em-secret-em-) `--from-env-file`)
|
||||
|
||||
## Setup
|
||||
|
||||
@@ -14,7 +14,7 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: librechat-credentials-env
|
||||
namespace: <librechat-chart-namespace>
|
||||
namespace: <chart-namespace>
|
||||
type: Opaque
|
||||
stringData:
|
||||
CREDS_KEY: <generated value>
|
||||
@@ -23,7 +23,7 @@ stringData:
|
||||
MEILI_MASTER_KEY: <generated value>
|
||||
```
|
||||
2. Add Credentials to the Secret
|
||||
Dependant of the Model you want to use, [create Credentials in your provider](https://docs.librechat.ai/install/configuration/ai_setup.html) and add them to the Secret:
|
||||
Dependant of the Model you want to use, create credentials in your provider and add them to the Secret:
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
@@ -34,4 +34,4 @@ kind: Secret
|
||||
|
||||
3. Apply the Secret to the Cluster
|
||||
|
||||
4. Fill out values.yaml and apply the Chart to the Cluster
|
||||
4. Fill out values.yaml and apply the Chart to the Cluster
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
{{ if hasKey .Values.env }}
|
||||
{{ fail "The Value env has been renamed and moved to librechat.configEnv. Refer to https://www.librechat.ai/docs/local/helm_chart#migrate for more information" }}
|
||||
{{ fail "The Value env has been renamed and moved to librechat.configEnv. Refer to https://hanzo.ai/docs/chat/helm_chart#migrate for more information" }}
|
||||
{{ end }}
|
||||
@@ -10,7 +10,7 @@ data:
|
||||
MEILI_HOST: http://{{ include "meilisearch.fullname" .Subcharts.meilisearch }}.{{ .Release.Namespace | lower }}.svc.cluster.local:7700
|
||||
{{- end }}
|
||||
{{- if and (not (dig "configEnv" "MONGO_URI" "" .Values.librechat)) .Values.mongodb.enabled }}
|
||||
MONGO_URI: mongodb://{{ include "mongodb.service.nameOverride" .Subcharts.mongodb }}.{{ .Release.Namespace | lower }}.svc.cluster.local:27017/LibreChat
|
||||
MONGO_URI: mongodb://{{ include "mongodb.service.nameOverride" .Subcharts.mongodb }}.{{ .Release.Namespace | lower }}.svc.cluster.local:27017/HanzoChat
|
||||
{{- end }}
|
||||
{{- if .Values.librechat.configEnv }}
|
||||
{{- toYaml .Values.librechat.configEnv | nindent 2 }}
|
||||
|
||||
@@ -34,7 +34,7 @@ librechat:
|
||||
# - MEILI_MASTER_KEY
|
||||
existingSecretName: "librechat-credentials-env"
|
||||
|
||||
# For adding a custom config yaml-file you can set the contents in this var. See https://www.librechat.ai/docs/configuration/librechat_yaml/example
|
||||
# For adding a custom config yaml-file you can set the contents in this var. See https://hanzo.ai/docs/chat/configuration/librechat_yaml/example
|
||||
configYamlContent: ""
|
||||
# configYamlContent: |
|
||||
# version: 1.0.8
|
||||
@@ -44,12 +44,12 @@ librechat:
|
||||
# interface:
|
||||
# # Privacy policy settings
|
||||
# privacyPolicy:
|
||||
# externalUrl: 'https://librechat.ai/privacy-policy'
|
||||
# externalUrl: 'https://hanzo.ai/privacy-policy'
|
||||
# openNewTab: true
|
||||
|
||||
# # Terms of service
|
||||
# termsOfService:
|
||||
# externalUrl: 'https://librechat.ai/tos'
|
||||
# externalUrl: 'https://hanzo.ai/tos'
|
||||
# openNewTab: true
|
||||
|
||||
# registration:
|
||||
@@ -104,7 +104,7 @@ librechat-rag-api:
|
||||
|
||||
|
||||
image:
|
||||
repository: danny-avila/librechat
|
||||
repository: hanzoai/chat
|
||||
registry: ghcr.io
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
@@ -117,7 +117,7 @@ fullnameOverride: ""
|
||||
|
||||
|
||||
lifecycle: {}
|
||||
# # base for adding a custom banner // see https://github.com/danny-avila/LibreChat/pull/3952 for an example
|
||||
# # base for adding a custom banner
|
||||
# postStart:
|
||||
# exec:
|
||||
# command: ["/bin/sh", "-c", "npm run update-banner <displayFrom(Format: yyyy-mm-ddTHH:MM:SSZ)> <displayTo(Format: yyyy-mm-ddTHH:MM:SSZ)> <message> <isPublic(true/false)>"]
|
||||
@@ -207,7 +207,7 @@ tolerations: []
|
||||
|
||||
affinity: {}
|
||||
|
||||
# Strategy for LibreChat deployment updates
|
||||
# Strategy for Hanzo Chat deployment updates
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
@@ -217,7 +217,7 @@ mongodb:
|
||||
auth:
|
||||
enabled: false
|
||||
databases:
|
||||
- LibreChat
|
||||
- HanzoChat
|
||||
# persistence:
|
||||
# size: 8Gi
|
||||
|
||||
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
# Hanzo Chat Configuration
|
||||
# https://docs.hanzo.ai/chat/configuration
|
||||
|
||||
version: 1.2.1
|
||||
cache: true
|
||||
|
||||
# Custom interface configuration
|
||||
interface:
|
||||
customWelcome: "Welcome to Hanzo Chat! Enjoy your AI-powered conversation experience."
|
||||
mcpServers:
|
||||
placeholder: 'MCP Servers'
|
||||
fileSearch: true
|
||||
privacyPolicy:
|
||||
externalUrl: 'https://hanzo.ai/privacy'
|
||||
openNewTab: true
|
||||
termsOfService:
|
||||
externalUrl: 'https://hanzo.ai/terms'
|
||||
openNewTab: true
|
||||
modalAcceptance: true
|
||||
modalTitle: "Terms of Service for Hanzo Chat"
|
||||
modalContent: |
|
||||
# Terms and Conditions for Hanzo Chat
|
||||
|
||||
*Effective Date: February 18, 2024*
|
||||
|
||||
Welcome to Hanzo Chat, the AI-powered conversation platform by Hanzo AI, available at https://chat.hanzo.ai. These Terms of Service ("Terms") govern your use of our website and the services we offer. By accessing or using the Website, you agree to be bound by these Terms and our Privacy Policy, accessible at https://hanzo.ai/privacy.
|
||||
|
||||
## 1. Ownership
|
||||
|
||||
Upon purchasing a package from Hanzo Chat, you are granted the right to download and use the code for accessing an admin panel for Hanzo Chat. While you own the downloaded code, you are expressly prohibited from reselling, redistributing, or otherwise transferring the code to third parties without explicit permission from Hanzo AI.
|
||||
|
||||
## 2. User Data
|
||||
|
||||
We collect personal data, such as your name, email address, and payment information, as described in our Privacy Policy. This information is collected to provide and improve our services, process transactions, and communicate with you.
|
||||
|
||||
## 3. Non-Personal Data Collection
|
||||
|
||||
The Website uses cookies to enhance user experience, analyze site usage, and facilitate certain functionalities. By using the Website, you consent to the use of cookies in accordance with our Privacy Policy.
|
||||
|
||||
## 4. Use of the Website
|
||||
|
||||
You agree to use the Website only for lawful purposes and in a manner that does not infringe the rights of, restrict, or inhibit anyone else's use and enjoyment of the Website. Prohibited behavior includes harassing or causing distress or inconvenience to any person, transmitting obscene or offensive content, or disrupting the normal flow of dialogue within the Website.
|
||||
|
||||
## 5. Governing Law
|
||||
|
||||
These Terms shall be governed by and construed in accordance with the laws of the United States, without giving effect to any principles of conflicts of law.
|
||||
|
||||
## 6. Changes to the Terms
|
||||
|
||||
We reserve the right to modify these Terms at any time. We will notify users of any changes by email. Your continued use of the Website after such changes have been notified will constitute your consent to such changes.
|
||||
|
||||
## 7. Contact Information
|
||||
|
||||
If you have any questions about these Terms, please contact us at support@hanzo.ai.
|
||||
|
||||
By using the Website, you acknowledge that you have read these Terms of Service and agree to be bound by them.
|
||||
|
||||
endpointsMenu: true
|
||||
modelSelect: true
|
||||
parameters: true
|
||||
sidePanel: true
|
||||
presets: true
|
||||
prompts: true
|
||||
bookmarks: true
|
||||
multiConvo: true
|
||||
agents: true
|
||||
|
||||
registration:
|
||||
socialLogins: ['openid', 'github', 'google', 'discord']
|
||||
|
||||
actions:
|
||||
allowedDomains:
|
||||
- "hanzo.ai"
|
||||
- "chat.hanzo.ai"
|
||||
- "api.hanzo.ai"
|
||||
- "google.com"
|
||||
|
||||
# Model endpoints
|
||||
endpoints:
|
||||
# Hanzo Cloud -- primary endpoint with zen4 models
|
||||
# All models routed through api.hanzo.ai OpenAI-compatible gateway
|
||||
custom:
|
||||
- name: 'Hanzo'
|
||||
apiKey: '${OPENAI_API_KEY}'
|
||||
baseURL: 'https://api.hanzo.ai/v1'
|
||||
iconURL: 'https://hanzo.ai/logo/icon.svg'
|
||||
models:
|
||||
default:
|
||||
# zen4 series (default models)
|
||||
- 'zen4'
|
||||
- 'zen4-pro'
|
||||
- 'zen4-max'
|
||||
- 'zen4-mini'
|
||||
- 'zen4-ultra'
|
||||
- 'zen4-coder'
|
||||
- 'zen4-thinking'
|
||||
- 'zen4-coder-pro'
|
||||
# Standard models (via Hanzo Cloud)
|
||||
- 'gpt-4o'
|
||||
- 'gpt-4o-mini'
|
||||
- 'claude-sonnet-4-5'
|
||||
- 'claude-haiku-4-5'
|
||||
- 'deepseek-r1-distill-70b'
|
||||
- 'qwen3-32b'
|
||||
fetch: false
|
||||
titleConvo: true
|
||||
titleModel: 'zen4-mini'
|
||||
summarize: true
|
||||
summaryModel: 'zen4-mini'
|
||||
modelDisplayLabel: 'Hanzo'
|
||||
@@ -26,6 +26,9 @@
|
||||
"start:deployed": "docker compose -f ./deploy-compose.yml up -d || docker-compose -f ./deploy-compose.yml up -d",
|
||||
"stop:deployed": "docker compose -f ./deploy-compose.yml down || docker-compose -f ./deploy-compose.yml down",
|
||||
"upgrade": "node config/upgrade.js",
|
||||
"seed": "node scripts/seed_demo_user.js && node scripts/seed_team_agents.js",
|
||||
"seed:user": "node scripts/seed_demo_user.js",
|
||||
"seed:agents": "node scripts/seed_team_agents.js",
|
||||
"create-user": "node config/create-user.js",
|
||||
"invite-user": "node config/invite-user.js",
|
||||
"list-users": "node config/list-users.js",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "@librechat/api",
|
||||
"version": "1.3.0",
|
||||
"type": "commonjs",
|
||||
"description": "MCP services for LibreChat",
|
||||
"description": "MCP services for Hanzo Chat",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.es.js",
|
||||
"types": "./dist/types/index.d.ts",
|
||||
@@ -28,14 +28,14 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/danny-avila/LibreChat.git"
|
||||
"url": "git+https://github.com/hanzoai/chat.git"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/danny-avila/LibreChat/issues"
|
||||
"url": "https://github.com/hanzoai/chat/issues"
|
||||
},
|
||||
"homepage": "https://librechat.ai",
|
||||
"homepage": "https://hanzo.ai/chat",
|
||||
"devDependencies": {
|
||||
"@babel/preset-env": "^7.21.5",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
|
||||
@@ -820,7 +820,7 @@ describe('Environment Variable Extraction (MCP)', () => {
|
||||
headers: {
|
||||
Authorization: '{{PAT_TOKEN}}',
|
||||
'Content-Type': 'application/json',
|
||||
'User-Agent': 'LibreChat-MCP-Client',
|
||||
'User-Agent': 'HanzoChat-MCP-Client',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -829,7 +829,7 @@ describe('Environment Variable Extraction (MCP)', () => {
|
||||
expect('headers' in result && result.headers).toEqual({
|
||||
Authorization: 'ghp_1234567890abcdef1234567890abcdef12345678',
|
||||
'Content-Type': 'application/json',
|
||||
'User-Agent': 'LibreChat-MCP-Client',
|
||||
'User-Agent': 'HanzoChat-MCP-Client',
|
||||
});
|
||||
expect('url' in result && result.url).toBe('https://api.githubcopilot.com/mcp/');
|
||||
expect(result.type).toBe('streamable-http');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@librechat/client",
|
||||
"version": "0.2.4",
|
||||
"description": "React components for LibreChat",
|
||||
"description": "React components for Hanzo Chat",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.es.js",
|
||||
"types": "dist/types/index.d.ts",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "librechat-data-provider",
|
||||
"version": "0.8.001",
|
||||
"description": "data services for librechat apps",
|
||||
"description": "data services for Hanzo Chat",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.es.js",
|
||||
"types": "./dist/types/index.d.ts",
|
||||
@@ -30,14 +30,14 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/danny-avila/LibreChat.git"
|
||||
"url": "git+https://github.com/hanzoai/chat.git"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/danny-avila/LibreChat/issues"
|
||||
"url": "https://github.com/hanzoai/chat/issues"
|
||||
},
|
||||
"homepage": "https://librechat.ai",
|
||||
"homepage": "https://hanzo.ai/chat",
|
||||
"dependencies": {
|
||||
"axios": "^1.8.2",
|
||||
"dayjs": "^1.11.13",
|
||||
|
||||
@@ -17,7 +17,7 @@ type AnthropicInput = BedrockConverseInput & {
|
||||
|
||||
export const bedrockInputSchema = s.tConversationSchema
|
||||
.pick({
|
||||
/* LibreChat params; optionType: 'conversation' */
|
||||
/* Hanzo Chat params; optionType: 'conversation' */
|
||||
modelLabel: true,
|
||||
promptPrefix: true,
|
||||
resendFiles: true,
|
||||
@@ -59,7 +59,7 @@ export type BedrockConverseInput = z.infer<typeof bedrockInputSchema>;
|
||||
|
||||
export const bedrockInputParser = s.tConversationSchema
|
||||
.pick({
|
||||
/* LibreChat params; optionType: 'conversation' */
|
||||
/* Hanzo Chat params; optionType: 'conversation' */
|
||||
modelLabel: true,
|
||||
promptPrefix: true,
|
||||
resendFiles: true,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@librechat/data-schemas",
|
||||
"version": "0.0.15",
|
||||
"description": "Mongoose schemas and models for LibreChat",
|
||||
"description": "Mongoose schemas and models for Hanzo Chat",
|
||||
"type": "module",
|
||||
"main": "dist/index.cjs",
|
||||
"module": "dist/index.es.js",
|
||||
@@ -28,14 +28,14 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/danny-avila/LibreChat.git"
|
||||
"url": "git+https://github.com/hanzoai/chat.git"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/danny-avila/LibreChat/issues"
|
||||
"url": "https://github.com/hanzoai/chat/issues"
|
||||
},
|
||||
"homepage": "https://librechat.ai",
|
||||
"homepage": "https://hanzo.ai/chat",
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-alias": "^5.1.0",
|
||||
"@rollup/plugin-commonjs": "^25.0.2",
|
||||
@@ -78,6 +78,6 @@
|
||||
"mongoose",
|
||||
"schema",
|
||||
"typescript",
|
||||
"librechat"
|
||||
"hanzo-chat"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import path from 'path';
|
||||
* Determine the log directory in a cross-compatible way.
|
||||
* Priority:
|
||||
* 1. LIBRECHAT_LOG_DIR environment variable
|
||||
* 2. If running within LibreChat monorepo (when cwd ends with /api), use api/logs
|
||||
* 2. If running within Hanzo Chat monorepo (when cwd ends with /api), use api/logs
|
||||
* 3. If api/logs exists relative to cwd, use that (for running from project root)
|
||||
* 4. Otherwise, use logs directory relative to process.cwd()
|
||||
*
|
||||
@@ -26,9 +26,9 @@ export const getLogDirectory = (): string => {
|
||||
// We'll just use the path and let the file system create it if needed
|
||||
const apiLogsPath = path.join(cwd, 'api', 'logs');
|
||||
|
||||
// For LibreChat project structure, use api/logs
|
||||
// For Hanzo Chat project structure, use api/logs
|
||||
// For external consumers, they should set LIBRECHAT_LOG_DIR
|
||||
if (cwd.includes('LibreChat')) {
|
||||
if (cwd.includes('LibreChat') || cwd.includes('hanzo/chat') || cwd.includes('hanzo-chat')) {
|
||||
return apiLogsPath;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ services:
|
||||
- "5433:5432"
|
||||
|
||||
rag_api:
|
||||
image: ghcr.io/danny-avila/librechat-rag-api-dev:latest
|
||||
image: ghcr.io/hanzoai/chat-rag-api:latest
|
||||
environment:
|
||||
- DB_HOST=vectordb
|
||||
- DB_PORT=5432
|
||||
|
||||
+11
-11
@@ -1,6 +1,6 @@
|
||||
# Redis Configuration and Setup
|
||||
|
||||
This directory contains comprehensive Redis configuration files and scripts for LibreChat development and testing, supporting both cluster and single-node setups with optional TLS encryption.
|
||||
This directory contains comprehensive Redis configuration files and scripts for Hanzo Chat development and testing, supporting both cluster and single-node setups with optional TLS encryption.
|
||||
|
||||
## Supported Configurations
|
||||
|
||||
@@ -141,7 +141,7 @@ redis-config/
|
||||
# Log files would be created here if enabled in config
|
||||
```
|
||||
|
||||
## Using with LibreChat
|
||||
## Using with Hanzo Chat
|
||||
|
||||
Update your `.env` file based on your chosen Redis configuration:
|
||||
|
||||
@@ -155,7 +155,7 @@ REDIS_URI=redis://127.0.0.1:7001,redis://127.0.0.1:7002,redis://127.0.0.1:7003
|
||||
```bash
|
||||
USE_REDIS=true
|
||||
REDIS_URI=rediss://127.0.0.1:6380
|
||||
REDIS_CA=/path/to/LibreChat/redis-config/certs/ca-cert.pem
|
||||
REDIS_CA=/path/to/Hanzo Chat/redis-config/certs/ca-cert.pem
|
||||
```
|
||||
|
||||
### For Standard Redis
|
||||
@@ -196,7 +196,7 @@ For secure Redis connections using TLS encryption with CA certificate validation
|
||||
./start-redis-tls.sh
|
||||
```
|
||||
|
||||
### 2. Configure LibreChat for TLS
|
||||
### 2. Configure Hanzo Chat for TLS
|
||||
|
||||
Update your `.env` file:
|
||||
|
||||
@@ -204,7 +204,7 @@ Update your `.env` file:
|
||||
# .env file - TLS Redis with CA certificate validation
|
||||
USE_REDIS=true
|
||||
REDIS_URI=rediss://127.0.0.1:6380
|
||||
REDIS_CA=/path/to/LibreChat/redis-config/certs/ca-cert.pem
|
||||
REDIS_CA=/path/to/Hanzo Chat/redis-config/certs/ca-cert.pem
|
||||
```
|
||||
|
||||
### 3. Test TLS Connection
|
||||
@@ -223,7 +223,7 @@ redis-cli --tls --cacert certs/ca-cert.pem -p 6380 get test_tls
|
||||
### 4. Test Backend Integration
|
||||
|
||||
```bash
|
||||
# Start LibreChat backend
|
||||
# Start Hanzo Chat backend
|
||||
npm run backend
|
||||
|
||||
# Look for these success indicators in logs:
|
||||
@@ -272,10 +272,10 @@ ps aux | grep redis-server
|
||||
|
||||
```bash
|
||||
# Verify CA certificate path in .env
|
||||
ls -la /path/to/LibreChat/redis-config/certs/ca-cert.pem
|
||||
ls -la /path/to/Hanzo Chat/redis-config/certs/ca-cert.pem
|
||||
|
||||
# Test LibreChat Redis configuration
|
||||
cd /path/to/LibreChat
|
||||
# Test Hanzo Chat Redis configuration
|
||||
cd /path/to/Hanzo Chat
|
||||
npm run backend
|
||||
# Look for Redis connection errors in output
|
||||
```
|
||||
@@ -404,5 +404,5 @@ For Redis-specific issues:
|
||||
- [Redis Documentation](https://redis.io/docs/)
|
||||
- [Redis Cluster Tutorial](https://redis.io/docs/manual/scaling/)
|
||||
|
||||
For LibreChat integration:
|
||||
- [LibreChat Documentation](https://github.com/danny-avila/LibreChat)
|
||||
For Hanzo Chat integration:
|
||||
- [Hanzo Chat Documentation](https://github.com/hanzoai/chat)
|
||||
@@ -10,4 +10,4 @@ if pgrep -f "redis-server.*tls" > /dev/null; then
|
||||
fi
|
||||
|
||||
# Start Redis with TLS config
|
||||
redis-server /Users/theotr/WebstormProjects/LibreChat/redis-cluster/redis-tls.conf
|
||||
redis-server ./redis-tls.conf
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "🧹 Cleaning up Hanzo Chat to restore clean LibreChat structure..."
|
||||
echo "🧹 Cleaning up Hanzo Chat to restore clean Hanzo Chat structure..."
|
||||
echo "This will remove all embedded LiteLLM proxy code and configure for api.hanzo.ai"
|
||||
echo ""
|
||||
|
||||
@@ -37,8 +37,8 @@ rm -rf meili_data*/ data-node/ logs/ .pytest_cache/ .ruff_cache/ 2>/dev/null
|
||||
rm -rf __pycache__/ .mypy_cache/ .coverage htmlcov/ 2>/dev/null
|
||||
rm -f *.log *.db *.sqlite 2>/dev/null
|
||||
|
||||
# Remove deployment specific files that aren't LibreChat
|
||||
echo "🗑️ Removing non-LibreChat deployment files..."
|
||||
# Remove deployment specific files that aren't Hanzo Chat
|
||||
echo "🗑️ Removing non-Hanzo Chat deployment files..."
|
||||
rm -rf deploy/ helm/ vercel/ railway/ k8s/ terraform/ 2>/dev/null
|
||||
rm -f netlify.toml vercel.json fly.toml render.yaml 2>/dev/null
|
||||
|
||||
@@ -52,7 +52,7 @@ find . -type f -name ".coverage" -delete 2>/dev/null || true
|
||||
find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
|
||||
|
||||
echo ""
|
||||
echo "✅ Cleanup complete! Your Hanzo Chat now has a clean LibreChat structure."
|
||||
echo "✅ Cleanup complete! Your Hanzo Chat now has a clean Hanzo Chat structure."
|
||||
echo ""
|
||||
echo "📝 Next steps:"
|
||||
echo "1. Update .env to use api.hanzo.ai:"
|
||||
@@ -60,8 +60,8 @@ echo " OPENAI_BASE_URL=https://api.hanzo.ai/v1"
|
||||
echo " OPENAI_API_KEY=your-hanzo-api-key"
|
||||
echo ""
|
||||
echo "2. The following core directories remain:"
|
||||
echo " - api/ (LibreChat API)"
|
||||
echo " - client/ (LibreChat frontend)"
|
||||
echo " - api/ (Hanzo Chat API)"
|
||||
echo " - client/ (Hanzo Chat frontend)"
|
||||
echo " - packages/ (Shared packages)"
|
||||
echo " - config/ (Configuration)"
|
||||
echo " - e2e/ (End-to-end tests)"
|
||||
|
||||
@@ -20,7 +20,7 @@ DIRS_TO_REMOVE=(
|
||||
"model_prices_and_context_window.json"
|
||||
"proxy_server_config.yaml"
|
||||
"cost_tracking.json"
|
||||
"ui" # If this is the LiteLLM UI, not LibreChat UI
|
||||
"ui" # If this is the LiteLLM UI, not Hanzo Chat UI
|
||||
)
|
||||
|
||||
# Python test directories that are LiteLLM specific
|
||||
|
||||
@@ -11,7 +11,7 @@ const bcrypt = require('bcryptjs');
|
||||
// MongoDB connection URL from environment or default
|
||||
const MONGO_URI = process.env.MONGO_URI || 'mongodb://hanzo:hanzo123@localhost:27017/HanzoChat?authSource=admin';
|
||||
|
||||
// User schema (matching LibreChat's schema)
|
||||
// User schema (matching Hanzo Chat's schema)
|
||||
const userSchema = new mongoose.Schema({
|
||||
name: {
|
||||
type: String,
|
||||
|
||||
@@ -0,0 +1,418 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Seed script to create Hanzo team preset agents in Hanzo Chat.
|
||||
*
|
||||
* Creates 10 team AI agents (Vi, Dev, Des, Opera, Su, Mark, Fin, Art, Three, Fil)
|
||||
* as global agents visible to all users. Idempotent — skips agents that already exist.
|
||||
*
|
||||
* Usage:
|
||||
* node scripts/seed_team_agents.js
|
||||
*
|
||||
* Environment:
|
||||
* MONGO_URI — MongoDB connection string (default: mongodb://hanzo:hanzo123@localhost:27017/HanzoChat?authSource=admin)
|
||||
* AGENT_PROVIDER — LLM provider for agents (default: openai)
|
||||
* AGENT_MODEL — Model name for agents (default: gpt-4o)
|
||||
*/
|
||||
|
||||
const mongoose = require('mongoose');
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Config
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const MONGO_URI =
|
||||
process.env.MONGO_URI ||
|
||||
'mongodb://hanzo:hanzo123@localhost:27017/HanzoChat?authSource=admin';
|
||||
const AGENT_PROVIDER = process.env.AGENT_PROVIDER || 'openai';
|
||||
const AGENT_MODEL = process.env.AGENT_MODEL || 'gpt-4o';
|
||||
const GLOBAL_PROJECT_NAME = 'instance';
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Team Presets
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const TEAM_PRESETS = [
|
||||
{
|
||||
preset_id: 'vi',
|
||||
name: 'Vi',
|
||||
emoji: '\u{1F9E0}',
|
||||
description: 'Chief of Staff & coordinator',
|
||||
instructions: `You are Vi, Hanzo AI's Chief of Staff and team coordinator.
|
||||
|
||||
Your role:
|
||||
- Coordinate work across the team, delegating to the right specialist
|
||||
- Maintain project context and priorities
|
||||
- Synthesize information from multiple team members
|
||||
- Make decisions when consensus is needed
|
||||
- Keep conversations focused and productive
|
||||
|
||||
Communication style: Decisive, organized, and efficient. You see the big picture and keep everyone aligned.`,
|
||||
starters: [
|
||||
'What can the Hanzo team help you with today?',
|
||||
'Let me coordinate the right team members for your project.',
|
||||
'What are your current priorities?',
|
||||
],
|
||||
},
|
||||
{
|
||||
preset_id: 'dev',
|
||||
name: 'Dev',
|
||||
emoji: '\u{1F4BB}',
|
||||
description: 'Full-stack engineer',
|
||||
instructions: `You are Dev, Hanzo AI's full-stack engineer.
|
||||
|
||||
Your role:
|
||||
- Write clean, production-quality code across the stack
|
||||
- Debug and fix issues efficiently
|
||||
- Design system architecture and APIs
|
||||
- Review code and suggest improvements
|
||||
- Implement features from requirements to deployment
|
||||
|
||||
Tech stack expertise: TypeScript, Python, Rust, Go, React, Next.js, Node.js, PostgreSQL, Redis, Docker, Kubernetes.
|
||||
|
||||
Communication style: Technical but clear. Show code examples. Prefer working solutions over theoretical discussions.`,
|
||||
starters: [
|
||||
'What are we building?',
|
||||
'Show me the code and I\'ll help debug it.',
|
||||
'Let\'s architect this system together.',
|
||||
],
|
||||
tools: ['execute_code'],
|
||||
},
|
||||
{
|
||||
preset_id: 'des',
|
||||
name: 'Des',
|
||||
emoji: '\u{1F3A8}',
|
||||
description: 'Designer & UX strategist',
|
||||
instructions: `You are Des, Hanzo AI's designer and UX strategist.
|
||||
|
||||
Your role:
|
||||
- Design user interfaces and experiences
|
||||
- Create design systems and component libraries
|
||||
- Conduct UX research and usability analysis
|
||||
- Provide accessibility guidance (WCAG compliance)
|
||||
- Create wireframes, mockups, and design specifications
|
||||
|
||||
Design philosophy: Clarity over complexity. Accessible by default. Beautiful through restraint.
|
||||
|
||||
Communication style: Visual and descriptive. Reference design patterns by name. Think in terms of user journeys.`,
|
||||
starters: [
|
||||
'What user experience are we designing?',
|
||||
'Let me review the UI for usability improvements.',
|
||||
'Tell me about your users and their goals.',
|
||||
],
|
||||
},
|
||||
{
|
||||
preset_id: 'opera',
|
||||
name: 'Opera',
|
||||
emoji: '\u{2699}\uFE0F',
|
||||
description: 'DevOps & infrastructure',
|
||||
instructions: `You are Opera, Hanzo AI's DevOps and infrastructure engineer.
|
||||
|
||||
Your role:
|
||||
- Design and manage cloud infrastructure (Kubernetes, Docker)
|
||||
- Set up CI/CD pipelines and deployment automation
|
||||
- Monitor system health, performance, and reliability
|
||||
- Manage databases, caching, and message queues
|
||||
- Handle security hardening and compliance
|
||||
|
||||
Infrastructure: DigitalOcean DOKS, Docker, Kubernetes, Helm, GitHub Actions, PostgreSQL, Redis, MongoDB, MinIO.
|
||||
|
||||
Communication style: Precise and operational. Think in terms of reliability, scalability, and observability.`,
|
||||
starters: [
|
||||
'What infrastructure challenge are we solving?',
|
||||
'Let me check the deployment and cluster status.',
|
||||
'What needs to be automated?',
|
||||
],
|
||||
tools: ['execute_code'],
|
||||
},
|
||||
{
|
||||
preset_id: 'su',
|
||||
name: 'Su',
|
||||
emoji: '\u{1F6E1}\uFE0F',
|
||||
description: 'Security engineer',
|
||||
instructions: `You are Su, Hanzo AI's security engineer.
|
||||
|
||||
Your role:
|
||||
- Conduct security assessments and code reviews
|
||||
- Design authentication and authorization systems
|
||||
- Manage secrets, keys, and certificates (KMS integration)
|
||||
- Implement post-quantum cryptography standards (HIP-1)
|
||||
- Ensure compliance with security best practices
|
||||
|
||||
Security domains: OWASP Top 10, zero-trust architecture, DID/verifiable credentials, Safe smart contracts, HSM/KMS.
|
||||
|
||||
Communication style: Thorough and cautious. Always consider threat models. Never compromise on security fundamentals.`,
|
||||
starters: [
|
||||
'What security concern should we address?',
|
||||
'Let me review the authentication flow.',
|
||||
'What\'s the threat model for this system?',
|
||||
],
|
||||
},
|
||||
{
|
||||
preset_id: 'mark',
|
||||
name: 'Mark',
|
||||
emoji: '\u{1F4E3}',
|
||||
description: 'Marketing strategist',
|
||||
instructions: `You are Mark, Hanzo AI's marketing strategist.
|
||||
|
||||
Your role:
|
||||
- Develop marketing strategies and campaigns
|
||||
- Write compelling copy and content
|
||||
- Analyze market positioning and competitive landscape
|
||||
- Plan product launches and go-to-market strategies
|
||||
- Manage brand voice and messaging consistency
|
||||
|
||||
Focus areas: B2B SaaS marketing, developer relations, AI/Web3 positioning, content marketing, growth strategy.
|
||||
|
||||
Communication style: Persuasive and data-driven. Think in terms of audience, message, and channel.`,
|
||||
starters: [
|
||||
'What product or feature are we marketing?',
|
||||
'Let me help craft the messaging.',
|
||||
'Who is the target audience?',
|
||||
],
|
||||
},
|
||||
{
|
||||
preset_id: 'fin',
|
||||
name: 'Fin',
|
||||
emoji: '\u{1F4B0}',
|
||||
description: 'Financial analyst',
|
||||
instructions: `You are Fin, Hanzo AI's financial analyst.
|
||||
|
||||
Your role:
|
||||
- Financial modeling and forecasting
|
||||
- Unit economics and pricing analysis
|
||||
- Revenue optimization and cost management
|
||||
- Tokenomics design and analysis (AI token)
|
||||
- Investment analysis and fundraising support
|
||||
|
||||
Domains: SaaS metrics, crypto/token economics, DeFi protocols, treasury management, financial compliance.
|
||||
|
||||
Communication style: Numbers-driven and precise. Always show your work. Present options with clear trade-offs.`,
|
||||
starters: [
|
||||
'What financial analysis do you need?',
|
||||
'Let me model the unit economics.',
|
||||
'What pricing strategy should we evaluate?',
|
||||
],
|
||||
},
|
||||
{
|
||||
preset_id: 'art',
|
||||
name: 'Art',
|
||||
emoji: '\u{2728}',
|
||||
description: 'Creative director',
|
||||
instructions: `You are Art, Hanzo AI's creative director.
|
||||
|
||||
Your role:
|
||||
- Creative direction for brand and product
|
||||
- Visual storytelling and narrative design
|
||||
- Content creation (writing, concepts, creative briefs)
|
||||
- Brand identity and visual language
|
||||
- Creative problem-solving and ideation
|
||||
|
||||
Style: Bold, innovative, and culturally aware. Push boundaries while maintaining brand coherence.
|
||||
|
||||
Communication style: Imaginative and inspiring. Think in metaphors and narratives. Make the complex feel simple and beautiful.`,
|
||||
starters: [
|
||||
'What creative challenge are we tackling?',
|
||||
'Let me help craft the narrative.',
|
||||
'What story should we tell?',
|
||||
],
|
||||
},
|
||||
{
|
||||
preset_id: 'three',
|
||||
name: 'Three',
|
||||
emoji: '\u{1F310}',
|
||||
description: 'Web3 specialist',
|
||||
instructions: `You are Three, Hanzo AI's Web3 specialist.
|
||||
|
||||
Your role:
|
||||
- Smart contract development and auditing (Solidity, EVM)
|
||||
- DeFi protocol design (HMM - Hamiltonian Market Maker)
|
||||
- Cross-chain architecture (Lux Bridge, multi-chain deployment)
|
||||
- Token economics and governance design
|
||||
- Blockchain infrastructure (Hanzo Network, chain ID 36963)
|
||||
|
||||
Ecosystem: Hanzo Network, Lux, Zoo, Pars chains. DID, Safe wallets, ERC-20/721/1155, bridge protocols.
|
||||
|
||||
Communication style: Technical and precise about on-chain concepts. Think in terms of decentralization, security, and composability.`,
|
||||
starters: [
|
||||
'What Web3 feature are we building?',
|
||||
'Let me review the smart contract.',
|
||||
'What chain architecture do we need?',
|
||||
],
|
||||
tools: ['execute_code'],
|
||||
},
|
||||
{
|
||||
preset_id: 'fil',
|
||||
name: 'Fil',
|
||||
emoji: '\u{1F4C1}',
|
||||
description: 'Knowledge manager',
|
||||
instructions: `You are Fil, Hanzo AI's knowledge manager.
|
||||
|
||||
Your role:
|
||||
- Organize and retrieve information across the organization
|
||||
- Maintain documentation and knowledge bases
|
||||
- Research topics thoroughly and provide summaries
|
||||
- Create structured documents and reports
|
||||
- Manage file systems, search, and information architecture
|
||||
|
||||
Tools: Document processing, search, file management, structured data extraction, summarization.
|
||||
|
||||
Communication style: Organized and thorough. Present information in clear hierarchies. Always cite sources and provide context.`,
|
||||
starters: [
|
||||
'What information do you need to find?',
|
||||
'Let me research that topic.',
|
||||
'What documentation needs updating?',
|
||||
],
|
||||
tools: ['file_search', 'web_search'],
|
||||
},
|
||||
];
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Minimal Mongoose schemas (matching Hanzo Chat's)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const agentSchema = new mongoose.Schema(
|
||||
{
|
||||
id: { type: String, index: true, unique: true, required: true },
|
||||
name: String,
|
||||
description: String,
|
||||
instructions: String,
|
||||
avatar: { type: mongoose.Schema.Types.Mixed, default: undefined },
|
||||
provider: { type: String, required: true },
|
||||
model: { type: String, required: true },
|
||||
model_parameters: Object,
|
||||
artifacts: String,
|
||||
access_level: Number,
|
||||
recursion_limit: Number,
|
||||
tools: { type: [String], default: undefined },
|
||||
tool_kwargs: { type: [{ type: mongoose.Schema.Types.Mixed }] },
|
||||
actions: { type: [String], default: undefined },
|
||||
author: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true },
|
||||
authorName: { type: String, default: undefined },
|
||||
hide_sequential_outputs: Boolean,
|
||||
end_after_tools: Boolean,
|
||||
agent_ids: { type: [String] },
|
||||
isCollaborative: { type: Boolean, default: undefined },
|
||||
conversation_starters: { type: [String], default: [] },
|
||||
tool_resources: { type: mongoose.Schema.Types.Mixed, default: {} },
|
||||
projectIds: { type: [mongoose.Schema.Types.ObjectId], ref: 'Project', index: true },
|
||||
versions: { type: [mongoose.Schema.Types.Mixed], default: [] },
|
||||
},
|
||||
{ timestamps: true },
|
||||
);
|
||||
|
||||
const userSchema = new mongoose.Schema({
|
||||
name: String,
|
||||
username: String,
|
||||
email: String,
|
||||
role: { type: String, default: 'USER' },
|
||||
}, { timestamps: true });
|
||||
|
||||
const projectSchema = new mongoose.Schema({
|
||||
name: { type: String, required: true, index: true },
|
||||
agentIds: { type: [String], default: [] },
|
||||
promptGroupIds: { type: [String], default: [] },
|
||||
}, { timestamps: true });
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Main
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
async function seed() {
|
||||
console.log('Connecting to MongoDB...');
|
||||
await mongoose.connect(MONGO_URI);
|
||||
console.log('Connected.');
|
||||
|
||||
const Agent = mongoose.models.Agent || mongoose.model('Agent', agentSchema);
|
||||
const User = mongoose.models.User || mongoose.model('User', userSchema);
|
||||
const Project = mongoose.models.Project || mongoose.model('Project', projectSchema);
|
||||
|
||||
// 1. Find or create a system user (admin) to own the agents
|
||||
let systemUser = await User.findOne({ role: 'ADMIN' }).sort({ created: 1 }).lean();
|
||||
if (!systemUser) {
|
||||
// Try any user
|
||||
systemUser = await User.findOne({}).sort({ created: 1 }).lean();
|
||||
}
|
||||
if (!systemUser) {
|
||||
console.error('No users found in database. Run seed_demo_user.js first.');
|
||||
process.exit(1);
|
||||
}
|
||||
console.log(`Using author: ${systemUser.name || systemUser.email} (${systemUser._id})`);
|
||||
|
||||
// 2. Get or create the global "instance" project
|
||||
let globalProject = await Project.findOneAndUpdate(
|
||||
{ name: GLOBAL_PROJECT_NAME },
|
||||
{ $setOnInsert: { name: GLOBAL_PROJECT_NAME } },
|
||||
{ new: true, upsert: true, lean: true },
|
||||
);
|
||||
console.log(`Global project: ${globalProject._id}`);
|
||||
|
||||
// 3. Create agents
|
||||
let created = 0;
|
||||
let skipped = 0;
|
||||
const agentIds = [];
|
||||
|
||||
for (const preset of TEAM_PRESETS) {
|
||||
const agentId = `agent_hanzo_${preset.preset_id}`;
|
||||
|
||||
// Check if already exists
|
||||
const existing = await Agent.findOne({ id: agentId }).lean();
|
||||
if (existing) {
|
||||
console.log(` [skip] ${preset.name} (${agentId}) already exists`);
|
||||
agentIds.push(agentId);
|
||||
skipped++;
|
||||
continue;
|
||||
}
|
||||
|
||||
const now = new Date();
|
||||
const agentData = {
|
||||
id: agentId,
|
||||
name: `${preset.emoji} ${preset.name}`,
|
||||
description: preset.description,
|
||||
instructions: preset.instructions,
|
||||
provider: AGENT_PROVIDER,
|
||||
model: AGENT_MODEL,
|
||||
author: systemUser._id,
|
||||
authorName: 'Hanzo AI',
|
||||
tools: preset.tools || [],
|
||||
conversation_starters: preset.starters || [],
|
||||
projectIds: [globalProject._id],
|
||||
versions: [{
|
||||
name: `${preset.emoji} ${preset.name}`,
|
||||
description: preset.description,
|
||||
instructions: preset.instructions,
|
||||
provider: AGENT_PROVIDER,
|
||||
model: AGENT_MODEL,
|
||||
tools: preset.tools || [],
|
||||
conversation_starters: preset.starters || [],
|
||||
projectIds: [globalProject._id],
|
||||
createdAt: now,
|
||||
updatedAt: now,
|
||||
}],
|
||||
};
|
||||
|
||||
await Agent.create(agentData);
|
||||
agentIds.push(agentId);
|
||||
console.log(` [created] ${preset.emoji} ${preset.name} (${agentId})`);
|
||||
created++;
|
||||
}
|
||||
|
||||
// 4. Add all agent IDs to the global project
|
||||
if (agentIds.length > 0) {
|
||||
await Project.findByIdAndUpdate(
|
||||
globalProject._id,
|
||||
{ $addToSet: { agentIds: { $each: agentIds } } },
|
||||
{ new: true },
|
||||
);
|
||||
console.log(`\nAdded ${agentIds.length} agents to global project.`);
|
||||
}
|
||||
|
||||
console.log(`\nDone: ${created} created, ${skipped} skipped.`);
|
||||
console.log(`Provider: ${AGENT_PROVIDER}, Model: ${AGENT_MODEL}`);
|
||||
|
||||
await mongoose.disconnect();
|
||||
}
|
||||
|
||||
seed().catch((err) => {
|
||||
console.error('Seed failed:', err);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -14,7 +14,7 @@ if [[ -z "${TAG}" ]]; then
|
||||
TAG=latest
|
||||
fi
|
||||
|
||||
LOCAL_DOCKER_IMG=librechat:${TAG}
|
||||
LOCAL_DOCKER_IMG=hanzo-chat:${TAG}
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ if [[ -z "${TAG}" ]]; then
|
||||
TAG=latest
|
||||
fi
|
||||
|
||||
LOCAL_DOCKER_IMG=librechat:${TAG}
|
||||
LOCAL_DOCKER_IMG=hanzo-chat:${TAG}
|
||||
|
||||
if [[ -z "${DOCKER_REMOTE_REGISTRY}" ]]; then
|
||||
echo "DOCKER_REMOTE_REGISTRY is not set" >&2
|
||||
|
||||
@@ -3,7 +3,7 @@ services:
|
||||
# api:
|
||||
# - HOST=0.0.0.0
|
||||
# - NODE_ENV=production
|
||||
# - MONGO_URI=mongodb://mongodb:27017/LibreChat
|
||||
# - MONGO_URI=mongodb://mongodb:27017/HanzoChat
|
||||
# - MEILI_HOST=http://meilisearch:7700
|
||||
# - RAG_PORT=${RAG_PORT:-8000}
|
||||
# - RAG_API_URL=http://rag_api:${RAG_PORT:-8000}
|
||||
@@ -12,7 +12,7 @@ services:
|
||||
context: .
|
||||
dockerfile: Dockerfile.multi
|
||||
target: prod-stage
|
||||
container_name: LibreChat-NGINX
|
||||
container_name: HanzoChat-NGINX
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
@@ -50,7 +50,7 @@ services:
|
||||
volumes:
|
||||
- pgdata2:/var/lib/postgresql/data
|
||||
rag_api:
|
||||
image: ghcr.io/danny-avila/librechat-rag-api-dev-lite:latest
|
||||
image: ghcr.io/hanzoai/chat-rag-api:latest
|
||||
environment:
|
||||
- DB_HOST=vectordb
|
||||
- RAG_PORT=${RAG_PORT:-8000}
|
||||
|
||||
Reference in New Issue
Block a user