### Azure OpenAI Configuration Example Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/model-providers.md Example environment variable setup for Azure OpenAI. Ensure to replace placeholders with your specific Azure details. ```bash AZURE_URL=https://{resource-name}.openai.azure.com/openai/deployments/{deployment-name} AZURE_API_KEY=your_azure_key AZURE_API_VERSION=2022-06-01-preview ``` -------------------------------- ### Docker Quick Start Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/quick-start-reference.md Quickly run the NextChat Docker image locally. Ensure you have Docker installed and replace placeholder API keys. ```bash # Pull the image docker pull nextchat:latest # Run the container docker run \ -e OPENAI_API_KEY=sk_xxxxx \ -e CODE=password123 \ -p 3000:3000 \ nextchat:latest ``` -------------------------------- ### JSON Configuration Example Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/documentation-structure.md This is an example of a JSON configuration. ```json // JSON config ``` -------------------------------- ### Mintlify Configuration Example Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/documentation-structure.md This JSON object shows a complete example of the mint.json configuration file. It includes settings for project name, logos, favicon, brand colors, top bar links and CTA, sidebar anchors, main navigation structure, and footer social links. ```json { "name": "NextChat", // Documentation project name "logo": { // Logo configuration "dark": "/logo/dark.svg", // Used in dark theme "light": "/logo/light.svg" // Used in light theme }, "favicon": "/favicon.svg", // Browser tab icon "colors": { "primary": "#315ef8" // Brand color (blue) }, "topbarLinks": [ // Top navigation links { "name": "Support", "url": "mailto:contact@nextchat.dev" } ], "topbarCtaButton": { // Top-right CTA button "name": "Home", "url": "https://nextchat.dev" }, "anchors": [ // Quick access links in sidebar { "name": "Quick Start", "icon": "book-open-cover", "url": "/quickstart/quickstart" }, { "name": "Community", "icon": "discord", "url": "https://discord.gg/F7avu4xV4r" } ], "navigation": [ // Main navigation structure { "group": "Get Started", "pages": [ "introduction", "quickstart/quickstart", { "group": "Selfhost", "pages": [ "quickstart/selfhost/vercel", "quickstart/selfhost/zeabur", "quickstart/selfhost/docker", "quickstart/selfhost/env" ] }, "development" ] }, { "group": "Model", "pages": [ "models/intro", { "group": "Providers", "pages": [ "models/openai", "models/gemini", "models/ollama", "models/groq" ] } ] } ], "footerSocials": { // Footer social links "twitter": "https://twitter.com/NextChatDev", "github": "https://github.com/ChatGPTNextWeb" } } ``` -------------------------------- ### Bash Command Example Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/documentation-structure.md This is an example of a bash command. ```bash # Bash commands ``` -------------------------------- ### Start LM Studio Server and Configure NextChat Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/integration-guide.md Instructions to start an LM Studio server and configure NextChat to use it, including setting API key, base URL, and custom models. Note the specific base URL format for LM Studio. ```bash # Start LM Studio server (default port 1234) # Through LM Studio GUI # NextChat configuration OPENAI_API_KEY=unused BASE_URL=http://localhost:1234/v1 CUSTOM_MODELS=+local-model ``` -------------------------------- ### Start Local Development Server Source: https://github.com/chatgptnextweb/docs/blob/main/README.md Run the Mintlify development server from the root of your documentation directory. Ensure mint.json is present. ```bash mintlify dev ``` -------------------------------- ### Install Mintlify CLI with Yarn Source: https://github.com/chatgptnextweb/docs/blob/main/development.mdx Install the Mintlify CLI globally using Yarn. Ensure Node.js version 18.10.0 or higher is installed. ```bash yarn global add mintlify ``` -------------------------------- ### Start vLLM Server and Configure NextChat Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/integration-guide.md Instructions to start a vLLM server and configure NextChat to use it, including setting API key, base URL, and custom models. ```bash # Start vLLM server python -m vllm.entrypoints.openai.api_server --model meta-llama/Llama-2-7b-hf # NextChat configuration OPENAI_API_KEY=unused BASE_URL=http://localhost:8000 CUSTOM_MODELS=+llama2-7b ``` -------------------------------- ### Install Mintlify CLI Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/development-setup.md Install the Mintlify CLI globally using npm or yarn. This tool is essential for developing and previewing documentation. ```bash npm install -g mintlify # OR using yarn yarn global add mintlify ``` -------------------------------- ### Install Mintlify CLI Source: https://github.com/chatgptnextweb/docs/blob/main/README.md Install the Mintlify CLI globally using npm. This command is used to manage and preview documentation locally. ```bash npm i -g mintlify ``` -------------------------------- ### Create New MDX Page Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/development-setup.md Create a new Markdown Extended (MDX) file for documentation content. This example shows creating a new file for an Anthropic model provider guide. ```bash # Example: Create a new model provider guide touch docs/models/anthropic.mdx Add frontmatter: ```mdx --- title: "Claude / Anthropic" description: "Integration with Anthropic's Claude models" --- # Your content here ``` ``` -------------------------------- ### Verify Mintlify Installation Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/development-setup.md Check if the Mintlify CLI has been installed correctly by running the version command. ```bash mintlify --version ``` -------------------------------- ### Python Code Example Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/documentation-structure.md This is an example of Python code. ```python # Python code ``` -------------------------------- ### Start LocalAI and Configure NextChat Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/integration-guide.md Instructions to start LocalAI using Docker and configure NextChat to use it, including setting API key, base URL, and custom models. ```bash # Start LocalAI docker run -p 8080:8080 localai/localai # NextChat configuration OPENAI_API_KEY=unused BASE_URL=http://localhost:8080 CUSTOM_MODELS=+gpt4all ``` -------------------------------- ### Docker Compose Configuration Example Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/deployment-checklist.md This is an example of a docker-compose.yml file used for deploying NextChat with Docker. It includes placeholders for environment variables that need to be configured. ```yaml version: "3.8" services: nextchat: image: "nextchat:latest" container_name: "nextchat" ports: - "3000:3000" environment: # OpenAI API Key (required) - OPENAI_API_KEY= # Access Password (optional) - CODE= # Google Gemini API Key (optional) - GOOGLE_API_KEY= # Azure OpenAI Configuration (optional) - AZURE_URL= - AZURE_API_KEY= - AZURE_API_VERSION= # Model Restrictions (optional) - DISABLE_GPT4= - HIDE_USER_API_KEY= restart: unless-stopped ``` -------------------------------- ### Vercel Quick Start Deployment Workflow Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/deployment-platforms.md Recommended workflow for deploying NextChat using Vercel's one-click deployment. Requires authorization and setting environment variables. ```text 1. Click Vercel Deploy Button ↓ 2. Authorize GitHub ↓ 3. Add OPENAI_API_KEY ↓ 4. Add CODE (optional) ↓ 5. Deploy ↓ 6. Access via Vercel URL ``` -------------------------------- ### Basic OpenAI Setup with Access Control Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/configuration.md Configure basic OpenAI API key and a single access password. Users must enter the specified password to access the application. ```shell CODE=password1 OPENAI_API_KEY=sk_xxxxx ``` -------------------------------- ### Minimal Environment Configuration Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/README.md Set the OPENAI_API_KEY environment variable for basic setup. This is the minimum required for many AI providers. ```bash OPENAI_API_KEY=sk_xxxxx ``` -------------------------------- ### List Installed Ollama Models Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/deployment-checklist.md Command to list all models that have been downloaded and installed via Ollama. This helps in verifying model availability. ```bash ollama list ``` -------------------------------- ### Check Node.js Version Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/development-setup.md Verify the installed Node.js version. Mintlify requires version 18.10.0 or higher. ```bash node --version ``` -------------------------------- ### Configure Multiple AI Providers Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/integration-guide.md Set environment variables to configure multiple AI providers. This example shows how to set up OpenAI, Google Gemini, Azure, and notes for Ollama and custom Groq endpoints. ```bash # OpenAI as primary OPENAI_API_KEY=sk_xxxxx BASE_URL=https://api.openai.com # Google Gemini as secondary GOOGLE_API_KEY=google_key_xxxxx # Azure as tertiary AZURE_URL=https://resource.openai.azure.com/openai/deployments/gpt4 AZURE_API_KEY=azure_key_xxxxx # Local Ollama for testing # Configured via UI settings panel # Custom Groq endpoint # Configured via custom endpoint in settings ``` -------------------------------- ### Re-install Dependencies Source: https://github.com/chatgptnextweb/docs/blob/main/README.md If 'mintlify dev' is not running, use this command to re-install project dependencies. This can resolve issues related to missing or corrupted installations. ```bash mintlify install ``` -------------------------------- ### Install Ollama Model Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/quick-start-reference.md Troubleshoot the 'No Models Available' error for Ollama by ensuring the desired model is installed using the ollama pull command. ```bash ollama pull llama2 ``` -------------------------------- ### Front Matter Example Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/documentation-structure.md All MDX files begin with YAML front matter to define page metadata like title and description. ```mdx --- title: "Page Title" description: "Brief description shown in metadata" --- ``` -------------------------------- ### Run Mintlify Development Server on Custom Port Source: https://github.com/chatgptnextweb/docs/blob/main/development.mdx Customize the port for the Mintlify development server using the --port flag. This example runs on port 3333. ```bash mintlify dev --port 3333 ``` -------------------------------- ### Start NextChat Docker Containers Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/deployment-checklist.md Command to start the NextChat Docker containers in detached mode using docker-compose. Ensure your docker-compose.yml is correctly configured. ```bash docker-compose up -d ``` -------------------------------- ### Mintlify Port In Use Error Source: https://github.com/chatgptnextweb/docs/blob/main/development.mdx Example of an error message when the default port (3000) is already in use. ```text Error: listen EADDRINUSE: address already in use :::3000 ``` -------------------------------- ### User Journey 1: SaaS User Navigation Flow Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/documentation-structure.md Illustrates the navigation path for a SaaS user starting from the introduction to configuring a model provider. ```markdown introduction ↓ quickstart/quickstart (links to SaaS) ↓ models/intro (choose provider) ↓ models/{provider} (configure provider) ``` -------------------------------- ### Local Model Setup with Ollama Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/quick-start-reference.md Configure NextChat to use local models via Ollama. Set the OpenAI Endpoint to your local Ollama server and specify a custom model. ```bash # In NextChat settings: # - OpenAI Endpoint: http://localhost:11434/ # - API Key: (leave empty) # - Custom Model: llama2 ``` -------------------------------- ### Integrate Custom Model Provider Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/INDEX.md Guide to integrating a custom model provider with NextChat. Ensure your endpoint is OpenAI-compatible and configure the necessary environment variables. ```text 1. Read: integration-guide.md → Custom Endpoint Integration 2. Verify custom endpoint is OpenAI-compatible 3. Read: model-providers.md → Custom Endpoints 4. Set BASE_URL to custom endpoint 5. Set CUSTOM_MODELS with provider's model names 6. Test configuration ``` -------------------------------- ### Navigate to Documentation Root Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/development-setup.md Ensure you are in the root directory of the documentation project, which contains the mint.json configuration file. ```bash cd /path/to/docs # Verify mint.json exists ls -la mint.json ``` -------------------------------- ### Development Environment Configuration Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/feature-reference.md Sets up a development environment enabling shareable URLs, allowing local models alongside GPT-4, and facilitating easy switching between local and cloud models. ```bash OPENAI_API_KEY=sk_test_xxxxx DISABLE_FAST_LINK=0 CUSTOM_MODELS=+llama2-local,+mixtral-local,gpt-4=Production GPT-4 ``` -------------------------------- ### CodeGroup Component for Multiple Languages Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/documentation-structure.md The CodeGroup component allows displaying equivalent code examples in multiple languages side-by-side. ```mdx ```bash npm npm install nextchat ``` ```bash yarn yarn add nextchat ``` ``` -------------------------------- ### Public Deployment Configuration Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/feature-reference.md Sets up a public deployment requiring a password, limiting models to GPT-3.5 for cost control, and using the server's API key. ```bash CODE=public_password OPENAI_API_KEY=sk_xxxxx DISABLE_GPT4=1 HIDE_USER_API_KEY=1 ``` -------------------------------- ### Deploy NextChat Quickly Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/INDEX.md Follow these steps to deploy NextChat using Vercel in under 5 minutes. Ensure you have your OPENAI_API_KEY ready. ```text 1. Read: quick-start-reference.md → Vercel section 2. Click Vercel deploy button 3. Add OPENAI_API_KEY environment variable 4. Click Deploy 5. Test at generated URL ``` -------------------------------- ### Pull NextChat Docker Image Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/deployment-checklist.md Command to pull the latest NextChat Docker image from a registry. This is a prerequisite before starting the containers. ```bash docker pull nextchat:latest ``` -------------------------------- ### Configure Multiple API Providers Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/model-providers.md Set environment variables to enable multiple AI model providers simultaneously. Users can then select their preferred provider in the UI. ```bash # Enable both OpenAI and Google OPENAI_API_KEY=sk_xxxxx GOOGLE_API_KEY=google_key_123456 # Also add Azure as tertiary AZURE_URL=https://resource.openai.azure.com/openai/deployments/gpt4 AZURE_API_KEY=azure_key_xxxxx AZURE_API_VERSION=2022-06-01-preview ``` -------------------------------- ### Restart Mintlify Development Server Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/development-setup.md Use these commands to reinstall dependencies and restart the development server when Mintlify Dev isn't running. ```bash mintlify install mintlify dev ``` -------------------------------- ### Mintlify Configuration File Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/MANIFEST.md The mint.json file is used to configure the Mintlify documentation site, including site structure, navigation, and other build settings. ```json { "name": "nextchat", "logo": { "light": "./public/logo/light.svg", "dark": "./public/logo/dark.svg" }, "favicon": "./public/favicon.svg", "colors": { "primary": "#0070f3", "light": "#e3f2f9", "dark": "#0a2540" }, "navigation": [ { "group": "Docs", "pages": [ "introduction", "development" ] }, { "group": "Models", "pages": [ "models/intro", "models/openai", "models/gemini", "models/azure", "models/groq", "models/ollama" ] }, { "group": "Quickstart", "pages": [ "quickstart/quickstart", "quickstart/selfhost/env", "quickstart/selfhost/vercel", "quickstart/selfhost/zeabur", "quickstart/selfhost/docker" ] }, { "group": "Contribution", "pages": [ "contribution/overview" ] } ] } ``` -------------------------------- ### Environment Configuration with Access Control Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/README.md Configure both an access control password (CODE) and an API key for enhanced security. This is useful for protecting your deployment. ```bash CODE=mypassword OPENAI_API_KEY=sk_xxxxx ``` -------------------------------- ### Basic Docker Run Command Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/deployment-platforms.md Run a NextChat Docker container with essential environment variables for API keys and access codes. Ensure the image name 'nextchat-image' is correct. ```bash docker run \ -e OPENAI_API_KEY=sk_xxxxx \ -e CODE=password123 \ -p 3000:3000 \ nextchat-image ``` -------------------------------- ### Team Deployment Configuration with Model Choice Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/feature-reference.md Configures a team deployment allowing access via multiple passwords, supporting multiple providers, enabling custom models, and allowing users to monitor their balance. ```bash CODE=team_password1,team_password2 OPENAI_API_KEY=sk_xxxxx GOOGLE_API_KEY=google_key CUSTOM_MODELS=gpt-4-turbo=GPT-4 Fast,gpt-3.5-turbo=GPT-3.5 Budget,-gpt-4=GPT-4 Standard ENABLE_BALANCE_QUERY=1 ``` -------------------------------- ### Direct API Key Authentication Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/integration-guide.md Set up direct API key authentication by providing the respective API keys in environment variables for services like OpenAI and Google. ```bash # Direct API key in environment OPENAI_API_KEY=sk_xxxxx GOOGLE_API_KEY=google_key_xxxxx ``` -------------------------------- ### Nginx Reverse Proxy Configuration for NextChat Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/deployment-checklist.md Example Nginx configuration for setting up a reverse proxy to serve NextChat over HTTPS. Ensure you replace placeholders with your actual domain and certificate paths. ```nginx server { listen 443 ssl http2; server_name your-domain.com; ssl_certificate /path/to/cert.pem; ssl_certificate_key /path/to/key.pem; location / { proxy_pass http://localhost:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } } ``` -------------------------------- ### Configure Ollama CORS and Host via Environment Variables Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/model-providers.md Set environment variables to configure Ollama's origins and host for serving. ```bash export OLLAMA_ORIGINS=*://your-domain export OLLAMA_HOST=0.0.0.0:11434 ollama serve ``` -------------------------------- ### NextChat Documentation Directory Structure Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/documentation-structure.md This snippet displays the hierarchical organization of the NextChat documentation files and directories. It includes configuration files, guides for introduction, development, contribution, and specific model providers, as well as deployment and asset directories. ```tree docs/ ├── mint.json # Mintlify configuration ├── README.md # Repository readme ├── introduction.mdx # Product introduction ├── development.mdx # Development setup guide ├── contribution/ │ └── overview.mdx # Contribution guidelines ├── models/ │ ├── intro.mdx # Model providers intro │ ├── openai.mdx # OpenAI (GPT-3.5, GPT-4) guide │ ├── gemini.mdx # Google Gemini guide │ ├── azure.mdx # Azure OpenAI guide │ ├── groq.mdx # Groq guide │ └── ollama.mdx # Ollama guide ├── quickstart/ │ ├── quickstart.mdx # Quick start guide │ └── selfhost/ │ ├── env.mdx # Environment variables reference │ ├── vercel.mdx # Vercel deployment guide │ └── (docker.mdx planned) # Docker deployment guide ├── images/ # Image assets │ ├── cover.png # Cover image │ ├── selfhost/ │ │ └── vercel-env.png # Vercel config screenshot │ └── models/ │ ├── groq/ │ │ ├── config.png # Groq configuration │ │ └── groq-api-key.png # Groq API key setup │ └── ollama/ │ └── ollama_settings.png # Ollama settings screenshot ├── logo/ │ ├── dark.svg # Dark mode logo │ └── light.svg # Light mode logo └── favicon.svg # Favicon ``` -------------------------------- ### Clone Documentation Repository Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/development-setup.md Clone the NextChat documentation repository from GitHub and navigate into the cloned directory. ```bash git clone https://github.com/ChatGPTNextWeb/docs.git cd docs ``` -------------------------------- ### Multiple API Keys and Passwords for Load Balancing Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/configuration.md Set up multiple OpenAI API keys for load balancing and configure multiple access passwords. Requests are distributed across API keys, and multiple passwords are accepted. ```shell OPENAI_API_KEY=key1,key2,key3 CODE=secure_pass1,secure_pass2 ``` -------------------------------- ### Clear Mintlify Cache and Reinstall on Windows Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/development-setup.md If you encounter file path errors on Windows, clear the Mintlify cache, clone the repository, and restart the development server. ```bash # Delete Mintlify cache rmdir /s %userprofile%\.mintlify # Clone Mintlify repository cd C:\Users\Username\.mintlify\ git clone https://github.com/mintlify/mint.git # Restart mintlify dev ``` -------------------------------- ### Mintlify Configuration Structure Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/development-setup.md Defines the overall structure and metadata for your documentation site, including project name, logos, colors, navigation, and social links. ```json { "$schema": "https://mintlify.com/schema.json", "name": "NextChat", // Project name "logo": { "dark": "/logo/dark.svg", // Dark mode logo "light": "/logo/light.svg" // Light mode logo }, "favicon": "/favicon.svg", // Browser favicon "colors": { "primary": "#315ef8" // Primary brand color }, "topbarLinks": [ { "name": "Support", "url": "mailto:contact@nextchat.dev" } ], "topbarCtaButton": { "name": "Home", "url": "https://nextchat.dev" }, "anchors": [ { "name": "Quick Start", "icon": "book-open-cover", "url": "/quickstart/quickstart" } ], "navigation": [ { "group": "Get Started", "pages": ["introduction", "quickstart/quickstart"] } ], "footerSocials": { "twitter": "https://twitter.com/NextChatDev", "github": "https://github.com/ChatGPTNextWeb" } } ``` -------------------------------- ### Google Gemini and OpenAI Provider Configuration Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/configuration.md Enable both Google Gemini and OpenAI models by configuring their respective API keys and URLs. Users can select between providers. ```shell GOOGLE_API_KEY=google_key_123456 GOOGLE_URL=https://googleapis.com/gemini/v1 OPENAI_API_KEY=sk_xxxxx ``` -------------------------------- ### Self-Hosted Deployment Workflow Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/deployment-platforms.md Workflow for self-hosting NextChat using Docker or Kubernetes. Involves cloning the repository, configuring environment variables, and setting up networking and security. ```text 1. Clone Repository (or pull Docker image) ↓ 2. Configure Environment Variables ↓ 3. Run Docker Container or Deploy to Kubernetes ↓ 4. Configure DNS/Custom Domain ↓ 5. Set up HTTPS (Let's Encrypt or manual cert) ↓ 6. Monitor and Update ``` -------------------------------- ### Enable API Balance Query Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/feature-reference.md Set the ENABLE_BALANCE_QUERY environment variable to '1' to allow users to view their OpenAI API usage balance in the UI. This feature requires an OpenAI API key with billing enabled. ```bash ENABLE_BALANCE_QUERY=1 # Enable balance display ENABLE_BALANCE_QUERY=0 # Disable balance display # Not set = default (disabled) ``` -------------------------------- ### Verify Docker Container Status Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/quick-start-reference.md Troubleshoot 'Page Won't Load' errors when using Docker by verifying that the NextChat container is running. ```bash docker ps ``` -------------------------------- ### Configure Custom OpenAI-Compatible Endpoint Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/integration-guide.md Set the API key (if required) and base URL for a custom endpoint, such as vLLM. ```bash # Custom endpoint (vLLM example) OPENAI_API_KEY=anything # Some endpoints don't require a key BASE_URL=http://localhost:8000 ``` -------------------------------- ### Configure Proxy Service Endpoint Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/integration-guide.md Set the API key and base URL for a third-party OpenAI proxy service. ```bash # Proxy service OPENAI_API_KEY=sk_xxxxx BASE_URL=https://api.proxy.com ``` -------------------------------- ### No Authentication (Local Ollama) Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/integration-guide.md Set up local Ollama for use without authentication by setting OPENAI_API_KEY to 'unused' and providing the local base URL. ```bash # Ollama (no key needed) OPENAI_API_KEY=unused BASE_URL=http://localhost:11434 ``` -------------------------------- ### No Authentication (Local LM Studio) Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/integration-guide.md Configure LM Studio for local use without authentication by setting OPENAI_API_KEY to 'unused' and specifying the local API endpoint. ```bash # LM Studio (no key needed) OPENAI_API_KEY=unused BASE_URL=http://localhost:1234/v1 ``` -------------------------------- ### Configure Custom OpenAI-Compatible Endpoints Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/model-providers.md Set the BASE_URL and OPENAI_API_KEY environment variables to point to a custom OpenAI-compatible API endpoint. ```bash BASE_URL=http://your-custom-endpoint.com:8000 OPENAI_API_KEY=your-api-key ``` -------------------------------- ### Multiple AI Provider Configuration Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/quick-start-reference.md Set up NextChat to use multiple AI providers by configuring their respective API keys and endpoints. ```bash OPENAI_API_KEY=sk_xxxxx GOOGLE_API_KEY=google_key_xxxxx AZURE_URL=https://resource.openai.azure.com/openai/deployments/gpt4 AZURE_API_KEY=azure_key_xxxxx ``` -------------------------------- ### Configure Standard OpenAI Endpoint Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/integration-guide.md Set the API key and base URL for the default OpenAI endpoint. ```bash OPENAI_API_KEY=sk_xxxxx BASE_URL=https://api.openai.com ``` -------------------------------- ### Azure OpenAI Deployment URL Format Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/model-providers.md Illustrates the required format for the Azure OpenAI deployment URL, specifying placeholders for resource and deployment names. ```text https://{resource-name}.openai.azure.com/openai/deployments/{deployment-name} ``` -------------------------------- ### Tip Component Usage Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/documentation-structure.md The Tip component is ideal for sharing helpful hints and best practices. ```mdx Helpful hints and best practices ``` -------------------------------- ### Code Blocks in MDX Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/development-setup.md Demonstrates how to embed code blocks with syntax highlighting for different languages (bash and Python) within MDX files. ```mdx ```bash npm install ``` ```python print("Hello, world!") ``` ``` -------------------------------- ### Basic Markdown Syntax in MDX Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/development-setup.md Illustrates basic Markdown elements like headings, bold, italics, and lists within MDX files. ```mdx # Heading 1 ## Heading 2 ### Heading 3 **Bold text** *Italic text* - List item 1 - List item 2 1. Numbered item 1 2. Numbered item 2 ``` -------------------------------- ### Update mint.json for Navigation Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/development-setup.md Modify the mint.json configuration file to include a newly created page in the documentation's navigation menu. ```json { "navigation": [ { "group": "Model", "pages": [ "models/intro", "models/openai", "models/gemini", "models/anthropic" // Add new page ] } ] } ``` -------------------------------- ### Push to Fork Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/development-setup.md Push your local branch to your forked repository. ```bash git push origin docs/my-feature ``` -------------------------------- ### User Journey 2: Self-Hosted User Navigation Flow Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/documentation-structure.md Details the navigation path for a self-hosted user, from introduction through deployment and AI provider configuration. ```markdown introduction ↓ quickstart/quickstart (choose deployment) ↓ quickstart/selfhost/{platform} (deployment guide) ↓ quickstart/selfhost/env (configuration) ↓ models/{provider} (choose AI provider) ``` -------------------------------- ### Update Mintlify CLI to Latest with npm Source: https://github.com/chatgptnextweb/docs/blob/main/development.mdx Update the Mintlify CLI to the latest version using npm. This ensures your local website reflects the most recent changes. ```bash npm i -g mintlify@latest ``` -------------------------------- ### Vercel Deployment URL Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/deployment-platforms.md Use this URL to initiate a one-click deployment of NextChat to Vercel. It pre-configures the repository and common environment variables. ```url https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FYidadaa%2FChatGPT-Next-Web&env=OPENAI_API_KEY&env=CODE&env=GOOGLE_API_KEY&project-name=chatgpt-next-web&repository-name=ChatGPT-Next-Web ``` -------------------------------- ### Contribute to NextChat Documentation Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/INDEX.md Instructions for contributing to the NextChat documentation. This involves setting up the development environment, writing, and submitting changes. ```text 1. Read: development-setup.md → Full guide 2. Install Mintlify CLI 3. Clone documentation repository 4. Create new .mdx file 5. Run `mintlify dev` 6. Write and test locally 7. Commit and push 8. Create pull request ``` -------------------------------- ### Configure Ollama CORS for Local Access Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/model-providers.md Run the Ollama server with specific origins allowed for local development. ```bash OLLAMA_ORIGINS=*://localhost ollama serve ``` -------------------------------- ### Check Custom Endpoint Models Source: https://github.com/chatgptnextweb/docs/blob/main/_autodocs/integration-guide.md This command queries your custom endpoint to list available models. It's useful for confirming that your endpoint is running and accessible. ```bash curl http://localhost:8000/v1/models ```