### Generate DB-GPT Install Command with All Dependencies (Shell) This command uses the `install_help.py` script to generate an installation command that includes all necessary dependencies for the DB-GPT OpenAI proxy model, simplifying setup. ```Shell uv run install_help.py install-cmd --all ``` -------------------------------- ### Get DB-GPT Installation Help (Shell) This command uses the `uv run` utility to execute the `install_help.py` script with the `--help` flag, providing information on available installation options and commands for DB-GPT. ```Shell uv run install_help.py --help ``` -------------------------------- ### Get Help for DB-GPT Installation This command uses the "uv" script to run the "install_help.py" utility with the "--help" flag. It provides detailed information and usage instructions for the DB-GPT installation helper tool. ```Shell uv run install_help.py --help ``` -------------------------------- ### Download DB-GPT Source Code This command clones the DB-GPT repository from GitHub, providing the necessary source files for installation and setup. It's the first step to get the project's codebase locally. ```Shell git clone https://github.com/eosphoros-ai/DB-GPT.git ``` -------------------------------- ### Generate DB-GPT Install Command with All Dependencies This command generates an installation command that includes all necessary dependencies for the OpenAI proxy model. It simplifies the setup process by ensuring all required components are included. ```Shell uv run install_help.py install-cmd --all ``` -------------------------------- ### Start DB-GPT Webserver using uv run (Shell) This command starts the DB-GPT webserver using the `uv run` utility, specifying a configuration file. It's commonly used for quick deployment with a pre-defined setup like the Ollama proxy. ```Shell uv run dbgpt start webserver --config configs/dbgpt-proxy-ollama.toml ``` -------------------------------- ### Access DB-GPT Installation Help This command executes the `install_help.py` script using `uv` to display available help options and usage instructions for DB-GPT installation. ```Shell uv run install_help.py --help ``` -------------------------------- ### Generate DB-GPT Install Command Interactively This command initiates an interactive session using "install_help.py" to guide the user through generating a customized installation command. It's useful for tailoring the installation to specific needs. ```Shell uv run install_help.py install-cmd --interactive ``` -------------------------------- ### Start DB-GPT Webserver via Python Script (Shell) This alternative command starts the DB-GPT webserver by directly executing the main Python application script. It also allows specifying a configuration file for custom setups. ```Shell uv run python packages/dbgpt-app/src/dbgpt_app/dbgpt_server.py --config configs/dbgpt-proxy-ollama.toml ``` -------------------------------- ### Start DB-GPT Webserver with Local Llama-CPP Configuration This command initiates the DB-GPT webserver using the `uv` tool. It loads the configuration from `configs/dbgpt-local-llama-cpp.toml`, which is typically used for local Llama-CPP model setups. ```Shell uv run dbgpt start webserver --config configs/dbgpt-local-llama-cpp.toml ``` -------------------------------- ### Run DB-GPT Web Front-end Separately (Shell/NPM) These commands guide users on how to set up and run the DB-GPT web front-end independently from the backend server. It involves navigating to the `web` directory, installing dependencies, configuring the environment, and starting the development server. ```Shell cd web && npm install cp .env.template .env // Set API_BASE_URL to your DB-GPT server address, usually http://localhost:5670 npm run dev ``` -------------------------------- ### Start DB-GPT Webserver with vLLM Configuration Run this command to start the DB-GPT webserver, loading the model configurations from `configs/dbgpt-local-vllm.toml`. This enables DB-GPT to operate with the specified vLLM and embedding models. ```Bash uv run dbgpt start webserver --config configs/dbgpt-local-vllm.toml ``` -------------------------------- ### Start DB-GPT Webserver with Llama.cpp Configuration Initiate the DB-GPT webserver by running this command, which loads the model configurations from `configs/dbgpt-local-llama-cpp.toml`. This starts the application with the specified Llama.cpp and embedding models. ```Bash uv run dbgpt start webserver --config configs/dbgpt-local-llama-cpp.toml ``` -------------------------------- ### Generate DB-GPT Install Command Interactively This command runs the `install_help.py` script in interactive mode to guide the user through generating a customized DB-GPT installation command. ```Shell uv run install_help.py install-cmd --interactive ``` -------------------------------- ### Generate DB-GPT Install Command with All Dependencies This command uses the `install_help.py` script to generate an installation command that includes all available dependencies and extras for DB-GPT. ```Shell uv run install_help.py install-cmd --all ``` -------------------------------- ### Install uv CLI on macOS/Linux This command downloads and executes the `uv` installation script for macOS and Linux systems. It's a quick way to get the `uv` tool for environment and package management. Ensure you have `curl` installed on your system. ```Shell curl -LsSf https://astral.sh/uv/install.sh | sh ``` -------------------------------- ### DB-GPT CLI: Start API Server Execution Example This snippet demonstrates the execution of the `dbgpt start apiserver` command without additional parameters, showing the typical output when the API server successfully starts. It includes log messages indicating component registration, server startup, and the address where the server is listening. This example illustrates a successful server launch and shutdown. ```Shell ~ dbgpt start apiserver Already connect 'dbgpt' 2023-12-07 14:35:21 B-4TMH9N3X-2120.local pilot.component[95201] INFO Register component with name dbgpt_model_registry and instance: 2023-12-07 14:35:21 B-4TMH9N3X-2120.local pilot.component[95201] INFO Register component with name dbgpt_worker_manager_factory and instance: 2023-12-07 14:35:21 B-4TMH9N3X-2120.local pilot.component[95201] INFO Register component with name dbgpt_model_api_server and instance: INFO: Started server process [95201] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8100 (Press CTRL+C to quit) INFO: 127.0.0.1:56638 - "GET /docs HTTP/1.1" 200 OK INFO: 127.0.0.1:56665 - "GET /openapi.json HTTP/1.1" 200 OK ^CINFO: Shutting down INFO: Waiting for application shutdown. INFO: Application shutdown complete. INFO: Finished server process [95201] ``` -------------------------------- ### Start DB-GPT Webserver with OpenAI Proxy Configuration This command initiates the DB-GPT webserver using uv run, directing it to load configurations from configs/dbgpt-proxy-openai.toml. This setup enables DB-GPT to interact with OpenAI models via a proxy. ```bash uv run dbgpt start webserver --config configs/dbgpt-proxy-openai.toml ``` -------------------------------- ### Run DB-GPT Web Front-end Separately These commands demonstrate how to set up and run the DB-GPT web front-end independently from the backend server. It involves navigating to the "web" directory, installing npm dependencies, configuring the API base URL, and starting the development server. ```Shell cd web && npm install cp .env.template .env // Set API_BASE_URL to your DB-GPT server address, usually http://localhost:5670 npm run dev ``` -------------------------------- ### Start DB-GPT Webserver with Local Model Configurations These commands launch the DB-GPT webserver, loading specific model configurations from TOML files. Each command corresponds to a different local model setup (Hugging Face, vLLM, llama.cpp) for the LLM and embedding providers, enabling the DB-GPT application. ```Shell uv run dbgpt start webserver --config configs/dbgpt-local-glm.toml ``` ```Shell uv run dbgpt start webserver --config configs/dbgpt-local-vllm.toml ``` ```Shell uv run dbgpt start webserver --config configs/dbgpt-local-llama-cpp.toml ``` -------------------------------- ### List DB-GPT Dependencies and Extras (Shell) This command utilizes the `install_help.py` script to display a comprehensive list of all available dependencies and extra packages for DB-GPT, useful for understanding installation options. ```Shell uv run install_help.py list ``` -------------------------------- ### Verify uv Installation This command checks if `uv` has been successfully installed and displays its version. Run this after installation to confirm `uv` is correctly set up and accessible in your environment. ```Shell uv --version ``` -------------------------------- ### Generate DB-GPT Install Command Interactively (Shell) This command initiates an interactive mode for the `install_help.py` script, allowing users to generate a customized DB-GPT installation command based on their selections. ```Shell uv run install_help.py install-cmd --interactive ``` -------------------------------- ### Start DB-GPT Webserver with OpenAI Proxy Configuration This command initiates the DB-GPT webserver, loading the `configs/dbgpt-proxy-openai.toml` file to enable integration with OpenAI proxy models and their specified API keys. ```bash uv run dbgpt start webserver --config configs/dbgpt-proxy-openai.toml ``` -------------------------------- ### Install DB-GPT and OpenAI Dependencies for AWEL This snippet provides the commands to install the necessary Python packages, `dbgpt` and `openai`, which are required to run the AWEL examples and interact with OpenAI models. Ensure you have pip installed and an active internet connection. ```Shell pip install dbgpt --upgrade pip install openai ``` -------------------------------- ### Alternative: Start DB-GPT Webserver via Python Script This command provides an alternative way to start the DB-GPT webserver, directly executing the main Python server script using `uv`. It also uses the `dbgpt-proxy-openai.toml` configuration file. This method is useful for debugging or specific deployment scenarios. ```Shell uv run python packages/dbgpt-app/src/dbgpt_app/dbgpt_server.py --config configs/dbgpt-proxy-openai.toml ``` -------------------------------- ### Install DB-GPT Dependencies with Tsinghua PyPI Index This command installs all necessary DB-GPT dependencies, including base, OpenAI proxy, RAG, ChromaDB storage, and DBGPTS components, using the Tsinghua PyPI mirror for faster downloads in China. ```bash uv sync --all-packages \ --extra "base" \ --extra "proxy_openai" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "dbgpts" \ --index-url=https://pypi.tuna.tsinghua.edu.cn/simple ``` -------------------------------- ### Start DB-GPT Webserver with Configuration This command starts the DB-GPT web server using "uv run". It specifies the configuration file "configs/dbgpt-proxy-ollama.toml" to load settings for the Ollama proxy model. This is the primary method to launch the server. ```Shell uv run dbgpt start webserver --config configs/dbgpt-proxy-ollama.toml ``` -------------------------------- ### Start DB-GPT Webserver via Python Script with OpenAI Proxy This alternative command starts the DB-GPT webserver by directly executing the Python server script, using the `configs/dbgpt-proxy-openai.toml` file for OpenAI proxy model configurations. ```bash uv run python packages/dbgpt-app/src/dbgpt_app/dbgpt_server.py --config configs/dbgpt-proxy-openai.toml ``` -------------------------------- ### Start DB-GPT Webserver with Ollama Proxy Configuration This command starts the DB-GPT webserver, specifically configured to use the Ollama proxy. It loads settings from `configs/dbgpt-proxy-ollama.toml`, enabling interaction with Ollama models. ```Shell uv run dbgpt start webserver --config configs/dbgpt-proxy-ollama.toml ``` -------------------------------- ### Install uv Package Manager via pipx This sequence of commands installs uv using pipx, a tool for installing and managing Python applications in isolated environments. It ensures uv is globally available and ready for use in your Python projects. ```Bash python -m pip install --upgrade pip python -m pip install --upgrade pipx python -m pipx ensurepath pipx install uv --global ``` -------------------------------- ### Install DB-GPT and OpenAI Python Dependencies This snippet outlines the initial setup by installing `dbgpt` and `openai` Python packages. These are essential dependencies for developing and running AWEL workflows that interact with OpenAI's LLMs. ```Shell pip install dbgpt --upgrade pip install openai ``` -------------------------------- ### Install uv with Python pipx These commands update pip, install pipx, ensure pipx is in the system path, and then globally install uv using pipx. This method provides a robust and isolated way to manage Python applications and their dependencies. ```Shell python -m pip install --upgrade pip python -m pip install --upgrade pipx python -m pipx ensurepath pipx install uv --global ``` -------------------------------- ### Install DB-GPT Dependencies for OpenAI Proxy This command installs core DB-GPT dependencies along with specific extras required for integrating with OpenAI proxy models, including base functionalities, RAG, ChromaDB storage, and DBGPTS. ```bash uv sync --all-packages \ --extra "base" \ --extra "proxy_openai" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "dbgpts" ``` -------------------------------- ### Start DB-GPT Webserver via Python Script with DeepSeek Proxy This alternative command starts the DB-GPT webserver by directly executing the Python server script, using the `configs/dbgpt-proxy-deepseek.toml` file for DeepSeek proxy model configurations. ```bash uv run python packages/dbgpt-app/src/dbgpt_app/dbgpt_server.py --config configs/dbgpt-proxy-deepseek.toml ``` -------------------------------- ### Start DB-GPT Webserver with DeepSeek Proxy Configuration This command launches the DB-GPT webserver, utilizing the `configs/dbgpt-proxy-deepseek.toml` file to enable integration with DeepSeek proxy models and their specified configurations. ```bash uv run dbgpt start webserver --config configs/dbgpt-proxy-deepseek.toml ``` -------------------------------- ### Install DB-GPT and OpenAI Python Dependencies This snippet outlines the initial setup for DB-GPT projects. It demonstrates how to install the core `dbgpt` library and the `openai` package using `pip`, which are essential for developing AWEL workflows and interacting with OpenAI models. ```Shell pip install dbgpt --upgrade pip install openai ``` -------------------------------- ### Install DB-GPT Dependencies for OpenAI Proxy This uv sync command installs the necessary dependencies for running DB-GPT with an OpenAI proxy. It includes core components, OpenAI proxy support, RAG capabilities, ChromaDB storage, and DBGPTS extensions. ```bash # Use uv to install dependencies needed for OpenAI proxy uv sync --all-packages \ --extra "base" \ --extra "proxy_openai" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "dbgpts" ``` -------------------------------- ### Run DB-GPT Web Front-end Separately These commands guide users to navigate to the `web` directory, install Node.js dependencies, configure the environment variables, and then start the front-end development server. This allows for independent development or deployment of the UI. ```Shell cd web && npm install cp .env.template .env // Set API_BASE_URL to your DB-GPT server address, usually http://localhost:5670 npm run dev ``` -------------------------------- ### Install DB-GPT Dependencies with Tsinghua PyPI Index This uv sync command installs all required DB-GPT packages, including base, OpenAI proxy, RAG, ChromaDB storage, and DBGPTS extras, while specifying the Tsinghua PyPI index for faster downloads in the China region. ```bash uv sync --all-packages \ --extra "base" \ --extra "proxy_openai" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "dbgpts" \ --index-url=https://pypi.tuna.tsinghua.edu.cn/simple ``` -------------------------------- ### List All DB-GPT Dependencies and Extras This command executes the `install_help.py` script to display a comprehensive list of all available dependencies and extra packages for DB-GPT. ```Shell uv run install_help.py list ``` -------------------------------- ### List All DB-GPT Dependencies and Extras This command uses the "install_help.py" script to list all available dependencies and extra packages for DB-GPT. It helps users understand the full range of components that can be installed. ```Shell uv run install_help.py list ``` -------------------------------- ### Install uv with Curl on macOS and Linux This command downloads and executes the uv installation script, a fast package manager for Python, suitable for macOS and Linux systems. It simplifies the setup of uv by directly running the official installation script. ```Shell curl -LsSf https://astral.sh/uv/install.sh | sh ``` -------------------------------- ### Install DB-GPT Dependencies for DeepSeek Proxy This command uses `uv` to install DB-GPT dependencies, including extras for 'base', 'proxy_openai' (as listed in the original text), 'rag', 'storage_chromadb', 'dbgpts', 'hf' (Hugging Face models), and 'cpu' (CPU-specific optimizations). This setup is tailored for running DB-GPT with DeepSeek proxy and local Hugging Face embedding models. ```Shell uv sync --all-packages \ --extra "base" \ --extra "proxy_openai" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "dbgpts" \ --extra "hf" \ --extra "cpu" ``` -------------------------------- ### Verify uv Installation This command checks the installed version of uv, confirming that the package manager has been successfully set up and is accessible in the environment. It's a quick way to verify the installation before proceeding with further steps. ```Shell uv --version ``` -------------------------------- ### Verify uv Package Manager Installation This command checks the installed version of the uv package manager. Running this command confirms that uv has been successfully installed and is accessible in your system's PATH. ```Bash uv --version ``` -------------------------------- ### Start DB-GPT Webserver with OpenAI Proxy Config This command launches the DB-GPT webserver using `uv`, specifying the `dbgpt-proxy-openai.toml` configuration file. This file contains settings for integrating with OpenAI models. Ensure the configuration file is correctly set up with your API key. ```Shell uv run dbgpt start webserver --config configs/dbgpt-proxy-openai.toml ``` -------------------------------- ### Set Up AWEL Project Directory Structure (Shell) This shell command sequence creates a dedicated `projects` directory in the user's home directory and navigates into it. This step establishes the foundational workspace for the AWEL tutorial, ensuring all project files are organized within a consistent location. ```Shell mkdir -p ~/projects cd ~/projects ``` -------------------------------- ### Start DB-GPT Webserver with Hugging Face Configuration Execute this command to launch the DB-GPT webserver, applying the model configurations defined in `configs/dbgpt-local-glm.toml`. This initiates the application with the specified local LLM and embedding models. ```Bash uv run dbgpt start webserver --config configs/dbgpt-local-glm.toml ``` -------------------------------- ### Install DB-GPT Dependencies for Llama.cpp without CUDA Use this `uv` command to install core and extended dependencies for DB-GPT with Llama.cpp when CUDA support is not required or available. This ensures the necessary packages are installed for CPU-based operations. ```Bash uv sync --all-packages \ --extra "base" \ --extra "hf" \ --extra "llama_cpp" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "quant_bnb" \ --extra "dbgpts" ``` -------------------------------- ### Alternative Command to Start DB-GPT Webserver This command provides an alternative method to launch the DB-GPT webserver by directly executing the Python server script. It also uses the `configs/dbgpt-proxy-ollama.toml` file for configuration. ```Shell uv run python packages/dbgpt-app/src/dbgpt_app/dbgpt_server.py --config configs/dbgpt-proxy-ollama.toml ``` -------------------------------- ### DB-GPT CLI: Start Webserver Command Options Detailed reference for the `dbgpt start webserver` command, used to launch the DB-GPT front-end service. This snippet outlines all available command-line options, their default values, and descriptions, enabling users to configure host, port, daemon mode, model controller, and logging settings. ```Shell ~ dbgpt start webserver --help Already connect 'dbgpt' Usage: dbgpt start webserver [OPTIONS] Start webserver(dbgpt_server.py) Options: --host TEXT Webserver deploy host [default: 0.0.0.0] --port INTEGER Webserver deploy port [default: 5000] --daemon Run Webserver in background --controller_addr TEXT The Model controller address to connect. If None, read model controller address from environment key `MODEL_SERVER`. --model_name TEXT The default model name to use. If None, read model name from environment key `LLM_MODEL`. --share Whether to create a publicly shareable link for the interface. Creates an SSH tunnel to make your UI accessible from anywhere. --remote_embedding Whether to enable remote embedding models. If it is True, you need to start a embedding model through `dbgpt start worker --worker_type text2vec --model_name xxx --model_path xxx` --log_level TEXT Logging level --light enable light mode --log_file TEXT The filename to store log [default: dbgpt_webserver.log] --tracer_file TEXT The filename to store tracer span records [default: dbgpt_webserver_tracer.jsonl] --tracer_storage_cls TEXT The storage class to storage tracer span records --disable_alembic_upgrade Whether to disable alembic to initialize and upgrade database metadata --help Show this message and exit. ``` -------------------------------- ### Explore DB-GPT Start Command Options This snippet illustrates how to view the help for the 'dbgpt start' command, which is used to initiate various DB-GPT server components. It outlines the available sub-commands like 'apiserver', 'controller', 'webserver', and 'worker', each responsible for launching a specific part of the DB-GPT ecosystem. Understanding these options is crucial for deploying and managing DB-GPT services. ```Bash dbgpt start --help Already connect 'dbgpt' Usage: dbgpt start [OPTIONS] COMMAND [ARGS]... Start specific server. Options: --help Show this message and exit. Commands: apiserver Start apiserver controller Start model controller webserver Start webserver(dbgpt_server.py) worker Start model worker ``` ```APIDOC { "command": "dbgpt start", "description": "Starts specific DB-GPT servers.", "options": [ { "name": "--help", "type": "FLAG", "description": "Show this message and exit." } ], "subcommands": [ { "name": "apiserver", "description": "Start apiserver" }, { "name": "controller", "description": "Start model controller" }, { "name": "webserver", "description": "Start webserver (dbgpt_server.py)" }, { "name": "worker", "description": "Start model worker" } ] } ``` -------------------------------- ### Install DB-GPT Dependencies for Llama.cpp Models These commands use 'uv' to install core DB-GPT dependencies and extensions for Llama.cpp integration. The first command enables CUDA support by setting CMAKE_ARGS, while the second installs dependencies without CUDA. ```Shell CMAKE_ARGS="-DGGML_CUDA=ON" uv sync --all-packages \ --extra "base" \ --extra "hf" \ --extra "cuda121" \ --extra "llama_cpp" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "quant_bnb" \ --extra "dbgpts" ``` ```Shell uv sync --all-packages \ --extra "base" \ --extra "hf" \ --extra "llama_cpp" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "quant_bnb" \ --extra "dbgpts" ``` -------------------------------- ### Alternative Method to Start DB-GPT Webserver This command provides an alternative way to start the DB-GPT web server by directly executing the Python script "dbgpt_server.py". It also uses the "--config" flag to specify the configuration file, offering flexibility in server startup. ```Shell uv run python packages/dbgpt-app/src/dbgpt_app/dbgpt_server.py --config configs/dbgpt-proxy-ollama.toml ``` -------------------------------- ### Install uv using pipx These commands install `uv` globally using `pipx`, a tool for installing and running Python applications in isolated environments. It ensures `uv` is accessible from your command line without polluting your global Python environment. This method requires `pip` and `pipx` to be installed. ```Shell python -m pip install --upgrade pip python -m pip install --upgrade pipx python -m pipx ensurepath pipx install uv --global ``` -------------------------------- ### Configure and Run DB-GPT Webserver with OpenAI Proxy This snippet demonstrates how to configure and start the DB-GPT webserver using an OpenAI proxy. It requires setting your OpenAI API key in `configs/dbgpt-proxy-openai.toml` or as an environment variable. The commands show how to launch the server and install necessary dependencies using `uv`. ```TOML # Model Configurations [models] [[models.llms]] ... api_key = "your-openai-api-key" [[models.embeddings]] ... api_key = "your-openai-api-key" ``` ```Bash uv run dbgpt start webserver --config configs/dbgpt-proxy-openai.toml ``` ```Bash uv run python packages/dbgpt-app/src/dbgpt_app/dbgpt_server.py --config configs/dbgpt-proxy-openai.toml ``` ```Bash # Use uv to install dependencies needed for OpenAI proxy uv sync --all-packages \ --extra "base" \ --extra "proxy_openai" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "dbgpts" ``` -------------------------------- ### Install uv Package Manager (macOS/Linux) This command downloads and executes the installation script for 'uv', a fast Python package installer, suitable for macOS and Linux systems. It's a quick way to get 'uv' set up for managing Python dependencies. ```Bash curl -LsSf https://astral.sh/uv/install.sh | sh ``` -------------------------------- ### Install DB-GPT AWEL Workflow Package This command installs the `awel-flow-simple-streaming-chat` package using the `dbgpt app install` command. The `-U` flag ensures the package is updated if already present, making it ready for use in DB-GPT webserver or local execution. ```Shell dbgpt app install awel-flow-simple-streaming-chat -U ``` -------------------------------- ### Install DB-GPT Dependencies for Ollama Proxy Use `uv` to install the necessary core and proxy-specific dependencies for DB-GPT when integrating with an Ollama proxy. This command ensures that all required packages for proxy-based model interactions are available. ```Bash uv sync --all-packages \ --extra "base" \ --extra "proxy_ollama" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "dbgpts" ``` -------------------------------- ### Install DB-GPT Dependencies for Ollama Proxy This `uv` command synchronizes and installs all necessary Python packages for DB-GPT, specifically including extras for base functionality, Ollama proxy, RAG, ChromaDB storage, and DB-GPT services. ```Shell uv sync --all-packages \ --extra "base" \ --extra "proxy_ollama" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "dbgpts" ``` -------------------------------- ### DB-GPT CLI: General Start Command Help This command provides the help message for the main `dbgpt start` command, listing available subcommands like `apiserver`, `controller`, `webserver`, and `worker`. It serves as an entry point to understand how to initiate different DB-GPT services. Each subcommand has its own specific options for starting the respective service. ```Shell ~ dbgpt start --help Already connect 'dbgpt' Usage: dbgpt start [OPTIONS] COMMAND [ARGS]... Start specific server. Options: --help Show this message and exit. Commands: apiserver Start apiserver controller Start model controller webserver Start webserver(dbgpt_server.py) worker Start model worker ``` -------------------------------- ### Alternative DB-GPT Webserver Startup via Python Script This command offers an alternative approach to start the DB-GPT webserver by directly executing the main Python script. It also utilizes the 'dbgpt-proxy-openai.toml' configuration file for setup. ```Shell uv run python packages/dbgpt-app/src/dbgpt_app/dbgpt_server.py --config configs/dbgpt-proxy-openai.toml ``` -------------------------------- ### DB-GPT CLI: Start Command Help and Subcommands This snippet provides the help output for the main `dbgpt start` command, outlining its available subcommands. It lists `apiserver`, `controller`, `webserver`, and `worker` as options, demonstrating how to initiate specific DB-GPT services. ```Shell ~ dbgpt start --help Already connect 'dbgpt' Usage: dbgpt start [OPTIONS] COMMAND [ARGS]... Start specific server. Options: --help Show this message and exit. Commands: apiserver Start apiserver controller Start model controller webserver Start webserver(dbgpt_server.py) worker Start model worker ``` -------------------------------- ### Start DB-GPT Webserver with DeepSeek Proxy Configuration This command starts the DB-GPT webserver using uv run, specifying the configs/dbgpt-proxy-deepseek.toml file for DeepSeek proxy model configurations. It launches the application with the defined settings for DeepSeek integration. ```bash uv run dbgpt start webserver --config configs/dbgpt-proxy-deepseek.toml ``` -------------------------------- ### Download DB-GPT Source Code This snippet downloads the DB-GPT project source code from its GitHub repository and then navigates into the newly created project directory. This is the initial step required to begin setting up the DB-GPT environment locally. ```Shell git clone https://github.com/eosphoros-ai/DB-GPT.git cd DB-GPT ``` -------------------------------- ### Install DB-GPT Financial Report Application Workflows This snippet first installs Poetry, a Python dependency management tool, and then utilizes the DB-GPT command-line interface to install the `financial-robot-app` and `financial-report-knowledge-factory` workflows, which are core components enabling the financial report chatbot's operations. ```Shell pip install poetry dbgpt app install financial-robot-app financial-report-knowledge-factory ``` -------------------------------- ### Install DB-GPT and OpenAI Python Packages This snippet provides the necessary `pip` commands to set up the DB-GPT framework, including agent and simple framework extensions, and the `openai` library. These packages are essential dependencies for building and running DB-GPT agents. ```bash pip install "dbgpt[agent,simple_framework]>=0.7.0" "dbgpt_ext>=0.7.0" pip install openai ``` -------------------------------- ### Install DB-GPT Dependencies for Local Model Providers These commands use `uv` to install the necessary Python packages and extensions for integrating different local model providers (vLLM, llama.cpp, Ollama proxy) with DB-GPT. Options for CUDA support are included for llama.cpp, ensuring all required components are installed. ```Shell uv sync --all-packages \ --extra "base" \ --extra "hf" \ --extra "cuda121" \ --extra "vllm" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "quant_bnb" \ --extra "dbgpts" ``` ```Shell CMAKE_ARGS="-DGGML_CUDA=ON" uv sync --all-packages \ --extra "base" \ --extra "hf" \ --extra "cuda121" \ --extra "llama_cpp" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "quant_bnb" \ --extra "dbgpts" ``` ```Shell uv sync --all-packages \ --extra "base" \ --extra "hf" \ --extra "llama_cpp" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "quant_bnb" \ --extra "dbgpts" ``` ```Shell uv sync --all-packages \ --extra "base" \ --extra "proxy_ollama" \ --extra "rag" \ --extra "storage_chromadb" \ --extra "dbgpts" ``` -------------------------------- ### Initialize New Python Project with Poetry (Shell) These shell commands use Poetry to initialize a new Python project named `awel-tutorial` and then change the current directory into it. Poetry is utilized for robust dependency management and virtual environment creation, providing a clean and reproducible development environment for the AWEL project. ```Shell poetry new awel-tutorial cd awel-tutorial ```