### Install Frontend Dependencies and Run Dev Server Source: https://github.com/arc53/docsgpt/blob/main/AGENTS.md Navigates to the frontend directory, installs development dependencies, and starts the frontend development server. ```bash cd frontend npm install --include=dev npm run dev ``` -------------------------------- ### Run macOS/Linux Setup Script Source: https://github.com/arc53/docsgpt/blob/main/README.md Execute the setup script on macOS or Linux systems. This script automates the configuration and installation process. ```bash ./setup.sh ``` -------------------------------- ### Start Local Development Server Source: https://github.com/arc53/docsgpt/blob/main/docs/README.md Start the local development server to view the documentation in your browser. Access it at http://localhost:3000. ```bash yarn dev ``` -------------------------------- ### Run Docker Compose for PostgreSQL Setup Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Postgres-Migration.mdx Use this command to start the application with the bundled PostgreSQL service using Docker Compose. Assumes Postgres 13+ and default environment variables for auto-migration and database creation. ```bash cd deployment && docker compose up ``` -------------------------------- ### Install Frontend Dependencies Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Development-Environment.mdx Install all frontend dependencies, including development dependencies, by running this command in the 'frontend' directory. It reads the package.json file. ```bash npm install --include=dev ``` -------------------------------- ### Example .env File Structure Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/DocsGPT-Settings.mdx This is an example of how to structure your .env file to configure basic DocsGPT settings. Place this file in the root directory of your project. ```dotenv LLM_PROVIDER=openai API_KEY=YOUR_OPENAI_API_KEY LLM_NAME=gpt-4o ``` -------------------------------- ### Install Docs Site Dependencies Source: https://github.com/arc53/docsgpt/blob/main/AGENTS.md Navigates to the docs directory and installs the necessary npm packages for the documentation site. ```bash cd docs npm install ``` -------------------------------- ### Install Docker and Docker Compose Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Amazon-Lightsail.mdx Install Docker and Docker Compose on your instance. These are required for running the containerized DocsGPT application. ```bash sudo apt install docker.io ``` ```bash sudo apt install docker-compose ``` -------------------------------- ### Install Backend Dependencies Source: https://github.com/arc53/docsgpt/blob/main/AGENTS.md Installs backend Python dependencies from the requirements file. Use this after activating the virtual environment. ```bash uv pip install -r application/requirements.txt # or: pip install -r application/requirements.txt ``` -------------------------------- ### Start the Chatwoot Extension Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Extensions/Chatwoot-extension.mdx Use this command to run the Chatwoot extension after configuring your environment variables. This command assumes you have Flask installed and configured. ```bash flask run ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/arc53/docsgpt/blob/main/docs/README.md Install all the necessary project dependencies using Yarn. ```bash yarn install ``` -------------------------------- ### Install Backend Dependencies Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Development-Environment.mdx Installs all necessary Python packages for the DocsGPT backend from the requirements file. Run this from the root of your DocsGPT repository. ```bash pip install -r application/requirements.txt ``` -------------------------------- ### Install DocsGPT Daemon as a Service Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Tools/remote-device.mdx Install the DocsGPT daemon as a system service to ensure it runs across reboots. The command varies slightly by operating system. Use --system and --user flags for specific system-wide or user-level installations. ```bash # Linux (systemd). As root this installs a system service; otherwise a user service. docsgpt-cli host install-service # macOS (launchd). The default is a per-user LaunchAgent that starts on login. docsgpt-cli host install-service # Always-on machine that starts at boot (Linux example): sudo docsgpt-cli host install-service --system --user $USER ``` -------------------------------- ### Install Global Packages (Husky and Vite) Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Development-Environment.mdx Install husky and vite globally using npm. This step is optional if you already have these packages installed globally or prefer local installations. ```bash npm install husky -g ``` ```bash npm install vite -g ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/arc53/docsgpt/wiki/Hosting-the-app Install all the Python dependencies required to run the DocsGPT application. This command should be executed from within the application directory. ```bash pip3 install -r requirements.txt ``` -------------------------------- ### Example Rendered System Prompt Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Guides/Customising-prompts.mdx An example of the detailed output you can expect in the logs when the log level is set to INFO, showing the rendered system prompt. ```text INFO - Rendered system prompt for agent (length: 1234 chars): ================================================================================ You are a helpful assistant for Acme Corp. Current date: 2025-10-30 Request ID: req_abc123 Documents: Technical documentation about... ================================================================================ ``` -------------------------------- ### Install DocsGPT Package (npm) Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Extensions/search-widget.mdx Install the docsgpt package using npm for React projects. ```bash npm install docsgpt ``` -------------------------------- ### Install JS Dependencies Source: https://github.com/arc53/docsgpt/blob/main/tests/e2e/README.md Run this command to install JavaScript dependencies for the E2E tests. ```bash npm install ``` -------------------------------- ### Run Windows PowerShell Setup Script Source: https://github.com/arc53/docsgpt/blob/main/README.md Execute the setup script on Windows using PowerShell. This script handles the necessary configurations for Windows environments. ```powershell PowerShell -ExecutionPolicy Bypass -File .\setup.ps1 ``` -------------------------------- ### Install Yarn Package Manager Source: https://github.com/arc53/docsgpt/blob/main/docs/README.md Install Yarn, a package manager for JavaScript, globally using npm. ```bash npm install --global yarn ``` -------------------------------- ### Navigate to Frontend Directory Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Development-Environment.mdx Change your current directory to the 'frontend' folder within the DocsGPT repository. This is the first step before installing dependencies or running the application. ```bash cd frontend ``` -------------------------------- ### Technical Documentation Assistant Prompt Example Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Guides/Customising-prompts.mdx A Jinja template for a technical documentation assistant, specifying the target language and framework, and requesting code examples and relevant links. ```jinja You are a technical documentation expert. **Available Documentation ({{ source.count }} documents):** {{ source.content }} **Requirements:** - Provide code examples in {{ passthrough.language }} - Focus on {{ passthrough.framework }} best practices - Include relevant links when possible ``` -------------------------------- ### Access DocsGPT Application Directory Source: https://github.com/arc53/docsgpt/wiki/Hosting-the-app Navigate into the application directory within the cloned DocsGPT repository. This is necessary before installing dependencies. ```bash cd DocsGPT/application ``` -------------------------------- ### Check Node.js and npm Versions Source: https://github.com/arc53/docsgpt/blob/main/docs/README.md Verify that Node.js and npm are installed and check their versions. ```bash node --version npm --version ``` -------------------------------- ### Prompt with Clear Instructions and Documents Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Guides/Customising-prompts.mdx An example prompt that sets the AI's role and provides clear guidelines, including referencing specific documents. ```jinja You are a technical support assistant. **Guidelines:** 1. Always reference the documents below 2. Provide step-by-step instructions 3. Include code examples when relevant **Reference Documents:** {{ source.content }} ``` -------------------------------- ### Legacy Prompt Format Example Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Guides/Customising-prompts.mdx Shows the older `{summaries}` format for backward compatibility, which automatically substitutes with document content. ```markdown You are a helpful assistant. Documents: {summaries} ``` -------------------------------- ### Start DocsGPT Application with Tmux Source: https://github.com/arc53/docsgpt/wiki/Hosting-the-app Start a new tmux session to run the Flask development server. This allows the application to continue running in the background after disconnecting from SSH. ```bash tmux new ``` -------------------------------- ### Trigger Agent Task via GET (Query Parameters) Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Agents/webhooks.mdx Initiate a task by sending a GET request to the webhook URL, passing the payload as query parameters. This is useful for systems with limited request capabilities. ```bash curl "http://localhost:7091/api/webhooks/agents/your_webhook_token?question=Your+message+to+agent" ``` -------------------------------- ### Build and Start Development Docker Containers Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Development-Environment.mdx Builds the Docker images and starts the Postgres and Redis containers in detached mode using the development Docker Compose file. The backend will automatically apply database migrations on first boot. ```bash docker compose -f deployment/docker-compose-dev.yaml build docker compose -f deployment/docker-compose-dev.yaml up -d ``` -------------------------------- ### Advanced Prompt with All Namespaces Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Guides/Customising-prompts.mdx An example of an advanced prompt utilizing system, passthrough, source, and tools namespaces for comprehensive context. ```jinja You are an AI assistant for {{ passthrough.company }}. **System Info:** - Date: {{ system.date }} - Request ID: {{ system.request_id }} **User Context:** - User: {{ passthrough.user_name }} - Role: {{ passthrough.role }} **Available Documents ({{ source.count }}):** {{ source.content }} **Memory Context:** {% if tools.memory.available %} {{ tools.memory.root }} {% else %} No saved context available. {% endif %} Please provide detailed, accurate answers based on the documents above. ``` -------------------------------- ### Run DocsGPT Daemon in Foreground Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Tools/remote-device.mdx Start the DocsGPT daemon in the foreground. Press Ctrl-C to stop it. This is useful for testing or temporary use. ```bash docsgpt-cli host ``` -------------------------------- ### Example OPENAI_BASE_URL for Local Inference Engines Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Models/local-inference.mdx These are example OPENAI_BASE_URL values for various local inference engines that communicate via the OpenAI API format. If running DocsGPT in Docker, replace 'localhost' with 'host.docker.internal'. ```text http://localhost:8000/v1 ``` ```text http://localhost:11434/v1 ``` ```text http://localhost:8080/v1 ``` ```text http://localhost:30000/v1 ``` ```text http://localhost:8000/v1 ``` ```text http://localhost:2242/v1 ``` ```text http://localhost:8997/v1 ``` ```text http://localhost:23333/v1 ``` -------------------------------- ### Launch DocsGPT with Docker Compose Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Docker-Deploying.mdx Start DocsGPT using Docker Compose in detached mode. Ensure you are in the root directory of the DocsGPT repository. ```bash docker compose -f deployment/docker-compose.yaml up -d ``` -------------------------------- ### Configure DocsGPT for Public API Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Docker-Deploying.mdx Create a .env file in the root of your DocsGPT repository and add these configurations to use the public API endpoint. This requires no local LLM setup. ```env LLM_PROVIDER=docsgpt VITE_API_STREAMING=true ``` -------------------------------- ### Prompt with Descriptive Context Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Guides/Customising-prompts.mdx Example of a prompt that includes both retrieved documents and user-specific context from passthrough variables. ```jinja **Retrieved Documents:** {{ source.content }} **User Query Context:** - Company: {{ passthrough.company }} - Department: {{ passthrough.department }} ``` -------------------------------- ### Run Backend API with Uvicorn Source: https://github.com/arc53/docsgpt/blob/main/AGENTS.md Starts the ASGI application using uvicorn for local development. This command enables hot-reloading and serves the whole app, matching production. ```bash uvicorn application.asgi:asgi_app --host 0.0.0.0 --port 7091 --reload ``` -------------------------------- ### Run DocsGPT Application Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Amazon-Lightsail.mdx Start the DocsGPT application using Docker Compose in detached mode. This command will download dependencies and build the application. ```bash sudo docker compose -f deployment/docker-compose.yaml up -d ``` -------------------------------- ### Bake Postgres Template DB Source: https://github.com/arc53/docsgpt/blob/main/tests/e2e/README.md Creates a template PostgreSQL database for E2E testing. This is an idempotent, one-time setup command. ```bash ../../scripts/e2e/bake_template.sh ``` -------------------------------- ### Docker Host Access Example Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Models/local-inference.mdx When running DocsGPT within Docker and connecting to a local inference engine on the host machine, use 'host.docker.internal' instead of 'localhost' in the OPENAI_BASE_URL. ```text http://host.docker.internal:11434/v1 ``` -------------------------------- ### Run the Frontend Development Server Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Development-Environment.mdx Start the Vite development server to run the frontend application locally. The terminal will display the exact URL, typically http://localhost:5173/, where the application is accessible. ```bash npm run dev ``` -------------------------------- ### API Tool JSON Response Example Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Tools/api-tool.mdx This is an example of a JSON response from an external API after the API Tool executes an HTTP GET request. The LLM uses this data to formulate its answer. ```json { "phone": "+14155555555", "valid": true, "format": { "international": "+1 415-555-5555", "national": "(415) 555-5555" }, "country": { "code": "US", "name": "United States", "prefix": "+1" }, "location": "California", "type": "Landline" } ``` -------------------------------- ### Build Documentation Site Source: https://github.com/arc53/docsgpt/blob/main/AGENTS.md Navigates to the docs directory and builds the documentation site. ```bash cd docs && npm run build ``` -------------------------------- ### Basic HTML Embedding for DocsGPT Widget Source: https://github.com/arc53/docsgpt/blob/main/extensions/react-widget/README.md Embed the DocsGPT widget in an HTML page by including the script and calling the renderDocsGPTWidget function. This example shows the minimal setup. ```html DocsGPT Widget
``` -------------------------------- ### IdP Setup Pointers - Okta Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/OIDC-SSO.mdx For Okta, configure SCIM provisioning by setting the **SCIM connector base URL** to `https:///scim/v2` and using **HTTP Header** authentication with your bearer token. Enable user creation and deactivation, and skip group push. ```APIDOC ## IdP setup pointers - **Okta**: add SCIM provisioning to the app integration with **SCIM connector base URL** = `https:///scim/v2` and authentication mode **HTTP Header** carrying the bearer token. Enable creating and deactivating users; skip group push. ``` -------------------------------- ### IdP Setup Pointers - Authentik Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/OIDC-SSO.mdx For Authentik, create a **SCIM provider** with the SCIM base URL `https:///scim/v2` and your token. Attach this provider to your application as a backchannel provider, syncing only users and omitting group mappings. ```APIDOC - **Authentik**: create a **SCIM provider** with the same base URL and the token, and attach it to the application as a backchannel provider. Sync users only — leave group mappings out, since DocsGPT answers group provisioning with `501`. ``` -------------------------------- ### Install Playwright Browser Source: https://github.com/arc53/docsgpt/blob/main/tests/e2e/README.md Installs the Chromium browser required by Playwright for driving tests. ```bash npm run e2e:install ``` -------------------------------- ### Boot E2E Services Source: https://github.com/arc53/docsgpt/blob/main/tests/e2e/README.md Boots the Flask, Celery, Vite, and mock LLM services, leaving them running for interactive development. ```bash npm run e2e:up ``` -------------------------------- ### Tool Constructor (`__init__`) Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Tools/creating-a-tool.mdx Initialize your tool by storing configuration, such as API keys or base URLs, passed during DocsGPT initialization. ```python class BraveSearchTool(Tool): def __init__(self, config): self.config = config self.token = config.get("token", "") # API Key for Brave Search self.base_url = "https://api.search.brave.com/res/v1" ``` -------------------------------- ### Initialize Git Repository Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Railway.mdx Initialize a new Git repository in the project directory to prepare for pushing to GitHub. ```bash git init ``` -------------------------------- ### Launch DocsGPT with Ollama (CPU) Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Docker-Deploying.mdx Use this command to launch DocsGPT with Ollama using a CPU-compatible Docker Compose configuration. Ensure your .env file is present. ```bash docker compose --env-file .env -f deployment/docker-compose.yaml -f deployment/optional/docker-compose.optional.ollama-cpu.yaml up -d ``` -------------------------------- ### Install Python 3 Pip Source: https://github.com/arc53/docsgpt/wiki/Hosting-the-app Install pip for Python 3, which is required for managing Python packages used by DocsGPT's backend. ```bash sudo apt install python3-pip ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Amazon-Lightsail.mdx Create and populate the .env file with your LLM API key and other necessary configurations. Ensure VITE_API_STREAMING is set to true. ```bash nano .env ``` ```dotenv API_KEY= LLM_NAME=docsgpt VITE_API_STREAMING=true ``` -------------------------------- ### Jinja Syntax Error Examples Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Guides/Customising-prompts.mdx Provides examples of common Jinja syntax errors, such as missing braces or closing tags, and their correct counterparts. ```jinja ❌ {{ variable } # Missing closing brace ❌ {% if x % # Missing closing %} ✅ {{ variable }} ✅ {% if x %}...{% endif %} ``` -------------------------------- ### Lint and Build Frontend Changes Source: https://github.com/arc53/docsgpt/blob/main/AGENTS.md Navigates to the frontend directory to run linting checks and then builds the frontend application. ```bash cd frontend && npm run lint cd frontend && npm run build ``` -------------------------------- ### Trigger Webhook (GET) Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Agents/webhooks.mdx Trigger an agent task using a GET request by passing the payload as query parameters. Useful for systems with limited request capabilities. ```APIDOC ## GET /api/webhooks/agents/{your_webhook_token} ### Description Triggers an agent task by sending parameters as a query string in a GET request to the agent's webhook URL. This method is convenient for simpler integrations. ### Method GET ### Endpoint `/api/webhooks/agents/{your_webhook_token}` ### Parameters #### Path Parameters - **your_webhook_token** (string) - Required - The unique token for the agent's webhook. #### Query Parameters - **question** (string) - Required - The message or query to be processed by the agent. ### Response #### Success Response (200) - **task_id** (string) - The unique identifier for the triggered task. ``` -------------------------------- ### Pair Remote Device with DocsGPT CLI Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Tools/remote-device.mdx Run this command on the target machine to pair it with your DocsGPT instance. Enter the provided pairing code when prompted. Omit the --url flag to use the default cloud instance. ```bash docsgpt-cli host pair --url https://your-docsgpt-instance ``` -------------------------------- ### Install Dependencies for MongoDB to PostgreSQL Migration Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Postgres-Migration.mdx Install the necessary Python packages for performing the one-shot data migration from MongoDB to PostgreSQL. This includes the application requirements and the pymongo library. ```bash pip install -r application/requirements.txt pip install 'pymongo>=4.6' ``` -------------------------------- ### Configure Bare-metal PostgreSQL Connection Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Postgres-Migration.mdx Point the POSTGRES_URI environment variable to your local PostgreSQL instance. The application will create the database and schema on first boot. This is suitable for local development. ```bash export POSTGRES_URI="postgresql://postgres@localhost/docsgpt" uvicorn application.asgi:asgi_app --host 0.0.0.0 --port 7091 ``` -------------------------------- ### Create Wiki Source Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Sources/Wiki-sources.mdx Creates a new wiki source. The `initial_content` seeds the home page `/index.md`. ```APIDOC ## Create Wiki Source ### Description Creates a new wiki source that the agent can read and write. ### Method POST ### Endpoint /api/sources/wiki ### Parameters #### Request Body - **name** (string) - Required - The name of the wiki source. - **initial_content** (string) - Optional - Markdown content for the home page (`/index.md`). ### Request Example ```json { "name": "Team Handbook", "initial_content": "# Team Handbook\n\nWelcome." } ``` ### Response #### Success Response (200) - **source_id** (string) - The ID of the newly created wiki source. #### Response Example ```json { "source_id": "wiki-12345" } ``` ``` -------------------------------- ### Clone DocsGPT Repository Source: https://github.com/arc53/docsgpt/blob/main/CONTRIBUTING.md Clone the forked repository to your local machine to start making changes. ```shell git clone https://github.com//DocsGPT.git ``` -------------------------------- ### Check DocsGPT Version Source: https://github.com/arc53/docsgpt/blob/main/docs/content/upgrading.mdx Run this command to check the currently installed DocsGPT version in your Docker Compose deployment. ```bash docker compose exec backend python -c "from application.version import get_version; print(get_version())" ``` -------------------------------- ### Internal Knowledge Base Prompt Example Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Guides/Customising-prompts.mdx A Jinja template for an internal AI assistant, tailored for a specific department and employee, providing answers based on access level and relevant documents. ```jinja You are an internal AI assistant for {{ passthrough.department }}. **Employee:** {{ passthrough.employee_name }} **Access Level:** {{ passthrough.access_level }} **Relevant Documents:** {{ source.content }} Provide detailed answers appropriate for {{ passthrough.access_level }} access level. ``` -------------------------------- ### Run Celery Worker Source: https://github.com/arc53/docsgpt/blob/main/AGENTS.md Starts a Celery worker process in a separate terminal. Use INFO level logging for visibility. ```bash celery -A application.app.celery worker -l INFO ``` -------------------------------- ### Create a New Wiki Source Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Sources/Wiki-sources.mdx Use this cURL command to create a new wiki source with a specified name and optional initial content for the home page. ```bash curl -X POST https://your-docsgpt/api/sources/wiki \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "name": "Team Handbook", "initial_content": "# Team Handbook\n\nWelcome." }' ``` -------------------------------- ### Launch DocsGPT with Ollama (GPU) Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Deploying/Docker-Deploying.mdx Use this command to launch DocsGPT with Ollama using a GPU-compatible Docker Compose configuration. Ensure your .env file is present and GPU drivers are configured. ```bash docker compose --env-file .env -f deployment/docker-compose.yaml -f deployment/optional/docker-compose.optional.ollama-gpu.yaml up -d ``` -------------------------------- ### API Request with Passthrough Data Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Guides/Customising-prompts.mdx Example JSON payload demonstrating how to send custom `passthrough` data in an API request. ```json { "question": "What is the pricing?", "passthrough": { "company": "Acme Corp", "user_name": "Alice", "plan_type": "enterprise" } } ``` -------------------------------- ### Get Source Graph Node Details Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Sources/GraphRAG.mdx Retrieves a specific node and its immediate neighbors from the knowledge graph of a given source. ```APIDOC ## GET /api/sources//graph/node/ ### Description Retrieves a specific node and its direct neighbors from the knowledge graph for a given source. This endpoint is useful for exploring local connections within the graph. ### Method GET ### Endpoint /api/sources//graph/node/ ### Parameters #### Path Parameters - **source_id** (string) - Required - The unique identifier of the source. - **node_id** (string) - Required - The unique identifier of the node to retrieve. ### Response #### Success Response (200) - **node** (object) - The details of the requested node. - **neighbors** (array) - A list of nodes directly connected to the requested node. ``` -------------------------------- ### Get Source Graph Overview Source: https://github.com/arc53/docsgpt/blob/main/docs/content/Sources/GraphRAG.mdx Retrieves a bounded overview of the knowledge graph for a given source, including nodes and edges. ```APIDOC ## GET /api/sources//graph ### Description Retrieves a bounded overview of the knowledge graph for a given source, including nodes and edges. The overview is limited by a default node count to ensure responsiveness for large graphs. ### Method GET ### Endpoint /api/sources//graph ### Parameters #### Path Parameters - **source_id** (string) - Required - The unique identifier of the source. ### Response #### Success Response (200) - **nodes** (array) - A list of nodes in the graph overview. - **edges** (array) - A list of edges connecting the nodes in the graph overview. ``` -------------------------------- ### Convert Script Options - Directory Source: https://github.com/arc53/docsgpt/wiki/How-to-train-on-other-documentation Specify the directory containing source code for documentation conversion using the --dir flag. ```bash --dir TEXT Path to a directory with source code. E.g. --dir inputs [default: inputs] ``` -------------------------------- ### /api/combine Source: https://github.com/arc53/docsgpt/wiki/API-docs Provides a list of available vectors and their locations. This GET request is used by the UI to understand available data sources. ```APIDOC ## GET /api/combine ### Description Retrieves information about available vector stores, including their location (local or Docshub), model, and other metadata. This endpoint is used by the UI to display available data sources. ### Method GET ### Endpoint /api/combine ### Response #### Success Response (200) - **date** (string) - The date associated with the vector store. - **description** (string) - A description of the vector store. - **docLink** (string) - A link to the documentation for the vector store. - **fullName** (string) - The full name of the vector store. - **language** (string) - The programming language associated with the vector store. - **location** (string) - The location of the vector store ('local' or 'docshub'). - **model** (string) - The model used for the vector store. - **name** (string) - The name of the vector store. - **version** (string) - The version of the vector store. ### Response Example ```json [ { "date": "2023-01-01", "description": "Example vector store", "docLink": "http://example.com/docs", "fullName": "ExampleVectorStore", "language": "python", "location": "local", "model": "gpt-3.5-turbo", "name": "example_vs", "version": "1.0" } ] ``` ```