build(docs): upgrade nextra to v3 and update config

This commit is contained in:
Alex
2026-02-17 18:46:28 +00:00
parent 8aa44c415b
commit 14296632ef
14 changed files with 3104 additions and 2081 deletions

View File

@@ -1,4 +1,4 @@
const withNextra = require('nextra')({
const withNextra = require('nextra').default({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.jsx'
})

5076
docs/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,9 +9,12 @@
"@vercel/analytics": "^1.1.1",
"docsgpt-react": "^0.5.1",
"next": "^15.5.9",
"nextra": "^2.13.2",
"nextra-theme-docs": "^2.13.2",
"nextra": "^3.3.1",
"nextra-theme-docs": "^3.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"typescript": "^5.9.3"
}
}

View File

@@ -1,4 +1,4 @@
{
export default {
"basics": {
"title": "🤖 Agent Basics",
"href": "/Agents/basics"
@@ -10,5 +10,9 @@
"webhooks": {
"title": "🪝 Agent Webhooks",
"href": "/Agents/webhooks"
},
"nodes": {
"title": "🧩 Workflow Nodes",
"href": "/Agents/nodes"
}
}

View File

@@ -0,0 +1,65 @@
# Workflow Nodes
DocsGPT workflows are composed of **Nodes** that are connected to form a processing graph. These nodes interact with a **Shared State**—a global dictionary of variables that persists throughout the execution of the workflow.
## The Shared State
Every workflow run maintains a state object (a JSON-like dictionary).
- **Initial State**: Contains the user's input query (`{{query}}`) and chat history (`{{chat_history}}`).
- **Accessing Variables**: You can access any variable in the state using the double-curly braces syntax: `{{variable_name}}`.
- **Modifying State**: Nodes read from this state and write their outputs back to it.
---
## AI Agent Node
The **AI Agent Node** is the core processing unit. It uses a Large Language Model (LLM) to generate text, answer questions, or perform tasks using tools.
### Inputs (Template Variables)
The primary input is the **Prompt Template**. This field supports variable substitution.
- **Prompt Template**: The text sent to the model.
- *Example*: `"Summarize the following text: {{user_input_text}}"`
- If left empty, it defaults to the initial user query (`{{query}}`).
- **System Prompt**: Instructions that define the agent's persona and constraints.
- **Tools**: A list of tools the agent can use (e.g., search, calculator).
- **LLM Settings**: Specific provider, model name, and parameters.
### Outputs (Emissions)
When the agent completes its task, it stores the result in the shared state.
- **Output Variable**: The name of the variable where the result will be saved.
- *Default*: If not specified, it is saved as `node_{node_id}_output`.
- *Custom*: You can set this to something meaningful, like `summary` or `translated_text`.
- **Streaming**: If "Stream to user" is enabled, the output is sent to the user in real-time as it is generated, in addition to being saved to the state.
---
## Set State Node
The **Set State Node** allows you to manipulate variables within the shared state directly without calling an LLM. This is useful for initialization, formatting, or control flow logic.
### Operations
You can define multiple operations in a single node. Each operation targets a specific **Key** (variable name).
1. **Set**: Assigns a specific value to a variable.
- *Value*: Can be a static string or a template using variables.
- *Example*: Set `current_step` to `1`.
- *Example*: Set `formatted_response` to `Analysis: {{analysis_result}}`.
2. **Increment**: Increases the value of a numeric variable.
- *Value*: The amount to add (default is 1).
- *Example*: Increment `retry_count` by `1`.
3. **Append**: Adds a value to a list variable.
- *Value*: The item to add to the list.
- *Example*: Append `{{last_result}}` to `history_list`.
### Usage Examples
- **Loop Counters**: Use a *Set State* node to initialize a counter (`i = 0`) before a loop, and another to increment it inside the loop.
- **Accumulators**: Use *Append* to collect results from multiple parallel branches into a single list.
- **Renaming**: Copy the output of a previous node to a more generic name (e.g., set `context` to `{{search_results}}`) so subsequent nodes can use a standard variable name.

View File

@@ -1,4 +1,4 @@
{
export default {
"DocsGPT-Settings": {
"title": "⚙️ App Configuration",
"href": "/Deploying/DocsGPT-Settings"
@@ -29,4 +29,4 @@
"href": "/Deploying/Railway",
"display": "hidden"
}
}
}

View File

@@ -1,4 +1,4 @@
{
export default {
"api-key-guide": {
"title": "🔑 Getting API key",
"href": "/Extensions/api-key-guide"
@@ -19,4 +19,4 @@
"title": "🗣️ Chatwoot Extension",
"href": "/Extensions/Chatwoot-extension"
}
}
}

View File

@@ -1,4 +1,4 @@
{
export default {
"google-drive-connector": {
"title": "🔗 Google Drive",
"href": "/Guides/Integrations/google-drive-connector"

View File

@@ -1,4 +1,4 @@
{
export default {
"Customising-prompts": {
"title": "️💻 Customising Prompts",
"href": "/Guides/Customising-prompts"

View File

@@ -1,4 +1,4 @@
{
export default {
"cloud-providers": {
"title": "☁️ Cloud Providers",
"href": "/Models/cloud-providers"
@@ -11,4 +11,4 @@
"title": "📝 Embeddings",
"href": "/Models/embeddings"
}
}
}

View File

@@ -1,4 +1,4 @@
{
export default {
"basics": {
"title": "🔧 Tools Basics",
"href": "/Tools/basics"
@@ -11,4 +11,4 @@
"title": "🛠️ Creating a Custom Tool",
"href": "/Tools/creating-a-tool"
}
}
}

View File

@@ -1,5 +1,4 @@
{
export default {
"index": "Home",
"quickstart": "Quickstart",
"Deploying": "Deploying",
@@ -17,4 +16,4 @@
"title": "Changelog",
"display": "hidden"
}
}
}

View File

@@ -2,7 +2,7 @@
title: 'Home'
description: Documentation of DocsGPT - quickstart, deployment guides, model configuration, and widget integration documentation.
---
import { Cards, Card } from 'nextra/components'
import { Cards } from 'nextra/components'
import Image from 'next/image'
export const allGuides = {
@@ -85,7 +85,7 @@ Try it yourself: [https://www.docsgpt.cloud/](https://www.docsgpt.cloud/)
<Cards
num={3}
children={Object.keys(allGuides).map((key, i) => (
<Card
<Cards.Card
key={i}
title={allGuides[key].title}
href={allGuides[key].href}