docs: add document of configurations and FAQs

This commit is contained in:
Li Xin
2025-05-07 20:18:24 +08:00
parent ee143e9ac4
commit 6b772d2cd0
3 changed files with 211 additions and 61 deletions

170
README.md
View File

@@ -7,7 +7,7 @@
**DeerFlow** (**D**eep **E**xploration and **E**fficient **R**esearch **Flow**) is a community-driven Deep Research framework that builds upon the incredible work of the open source community. Our goal is to combine language models with specialized tools for tasks like web search, crawling, and Python code execution, while giving back to the community that made this possible.
Please visit [DeerFlow](https://deerflow.tech/) for more details.
Please visit [our official website](https://deerflow.tech/) for more details.
## Demo
@@ -26,7 +26,7 @@ In this demo, we showcase how to use DeerFlow to:
- [What are the top trending repositories on GitHub?](https://deerflow.tech/chat?replay=github-top-trending-repo)
- [Write an article about Nanjing's traditional dishes](https://deerflow.tech/chat?replay=nanjing-traditional-dishes)
- [How to decorate a rental apartment?](https://deerflow.tech/chat?replay=rental-apartment-decoration)
- [Visit our official website to watch more replays](https://deerflow.tech/)
- [Visit our official website to explore more replays.](https://deerflow.tech/)
---
@@ -34,10 +34,13 @@ In this demo, we showcase how to use DeerFlow to:
## 📑 Table of Contents
- [🚀 Quick Start](#quick-start)
- [🛠️ Development](#development)
- [🌟 Features](#features)
- [🏗️ Architecture](#architecture)
- [🛠️ Development](#development)
- [🗣️ Text-to-Speech Integration](#text-to-speech-integration)
- [📚 Examples](#examples)
- [❓ FAQ](#faq)
- [📜 License](#license)
- [💖 Acknowledgments](#acknowledgments)
@@ -78,7 +81,6 @@ cp .env.example .env
# See the 'Supported Search Engines' and 'Text-to-Speech Integration' sections below for all available options
# Configure conf.yaml for your LLM model and API keys
# Gemini: https://ai.google.dev/gemini-api/docs/openai
cp conf.yaml.example conf.yaml
# Install marp for ppt generation
@@ -93,6 +95,13 @@ cd web
pnpm install
```
### Configurations
Please refer to the [Configuration Guide](docs/configuration_guide.md) for more details.
> [!NOTE]
> Before you start the project, read the guide carefully, and update the configurations to match your specific settings and requirements.
### Console UI
The quickest way to run the project is to use the console UI.
@@ -148,6 +157,97 @@ To configure your preferred search engine, set the `SEARCH_API` variable in your
SEARCH_API=tavily
```
## Features
### Core Capabilities
- 🤖 **LLM Integration**
- It supports the integration of most models through [litellm](https://docs.litellm.ai/docs/providers).
- Support for open source models like Qwen
- OpenAI-compatible API interface
- Multi-tier LLM system for different task complexities
### Tools and MCP Integrations
- 🔍 **Search and Retrieval**
- Web search via Tavily, Brave Search and more
- Crawling with Jina
- Advanced content extraction
- 🔗 **MCP Seamless Integration**
- Expand capabilities for private domain access, knowledge graph, web browsing and more
- Facilitates integration of diverse research tools and methodologies
### Human Collaboration
- 🧠 **Human-in-the-loop**
- Supports interactive modification of research plans using natural language
- Supports auto-acceptance of research plans
- 📝 **Report Post-Editing**
- Supports Notion-like block editing
- Allows AI refinements, including AI-assisted polishing, sentence shortening, and expansion
- Powered by [tiptap](https://tiptap.dev/)
### Content Creation
- 🎙️ **Podcast and Presentation Generation**
- AI-powered podcast script generation and audio synthesis
- Automated creation of simple PowerPoint presentations
- Customizable templates for tailored content
## Architecture
DeerFlow implements a modular multi-agent system architecture designed for automated research and code analysis. The system is built on LangGraph, enabling a flexible state-based workflow where components communicate through a well-defined message passing system.
![Architecture Diagram](./assets/architecture.png)
> See it live at [deerflow.tech](https://deerflow.tech/)
The system employs a streamlined workflow with the following components:
1. **Coordinator**: The entry point that manages the workflow lifecycle
- Initiates the research process based on user input
- Delegates tasks to the planner when appropriate
- Acts as the primary interface between the user and the system
2. **Planner**: Strategic component for task decomposition and planning
- Analyzes research objectives and creates structured execution plans
- Determines if enough context is available or if more research is needed
- Manages the research flow and decides when to generate the final report
3. **Research Team**: A collection of specialized agents that execute the plan:
- **Researcher**: Conducts web searches and information gathering using tools like web search engines, crawling and even MCP services.
- **Coder**: Handles code analysis, execution, and technical tasks using Python REPL tool.
Each agent has access to specific tools optimized for their role and operates within the LangGraph framework
4. **Reporter**: Final stage processor for research outputs
- Aggregates findings from the research team
- Processes and structures the collected information
- Generates comprehensive research reports
## Text-to-Speech Integration
DeerFlow now includes a Text-to-Speech (TTS) feature that allows you to convert research reports to speech. This feature uses the volcengine TTS API to generate high-quality audio from text. Features like speed, volume, and pitch are also customizable.
### Using the TTS API
You can access the TTS functionality through the `/api/tts` endpoint:
```bash
# Example API call using curl
curl --location 'http://localhost:8000/api/tts' \
--header 'Content-Type: application/json' \
--data '{
"text": "This is a test of the text-to-speech functionality.",
"speed_ratio": 1.0,
"volume_ratio": 1.0,
"pitch_ratio": 1.0
}' \
--output speech.mp3
```
## Development
### Testing
@@ -227,62 +327,6 @@ When you submit a research topic in the Studio UI, you'll be able to see the ent
- The research and writing phases for each section
- The final report generation
## Architecture
DeerFlow implements a modular multi-agent system architecture designed for automated research and code analysis. The system is built on LangGraph, enabling a flexible state-based workflow where components communicate through a well-defined message passing system.
![Architecture Diagram](./assets/architecture.png)
The system employs a streamlined workflow with the following components:
1. **Coordinator**: The entry point that manages the workflow lifecycle
- Initiates the research process based on user input
- Delegates tasks to the planner when appropriate
- Acts as the primary interface between the user and the system
2. **Planner**: Strategic component for task decomposition and planning
- Analyzes research objectives and creates structured execution plans
- Determines if enough context is available or if more research is needed
- Manages the research flow and decides when to generate the final report
3. **Research Team**: A collection of specialized agents that execute the plan:
- **Researcher**: Conducts web searches and information gathering using tools like Tavily and web crawling
- **Coder**: Handles code analysis, execution, and technical tasks using Python REPL tool
Each agent has access to specific tools optimized for their role and operates within the LangGraph framework
4. **Reporter**: Final stage processor for research outputs
- Aggregates findings from the research team
- Processes and structures the collected information
- Generates comprehensive research reports
## Text-to-Speech Integration
DeerFlow now includes a Text-to-Speech (TTS) feature that allows you to convert research reports to speech. This feature uses the volcengine TTS API to generate high-quality audio from text.
### Features
- Convert any text or research report to natural-sounding speech
- Adjust speech parameters like speed, volume, and pitch
- Support for multiple voice types
- Available through both API and web interface
### Using the TTS API
You can access the TTS functionality through the `/api/tts` endpoint:
```bash
# Example API call using curl
curl --location 'http://localhost:8000/api/tts' \
--header 'Content-Type: application/json' \
--data '{
"text": "This is a test of the text-to-speech functionality.",
"speed_ratio": 1.0,
"volume_ratio": 1.0,
"pitch_ratio": 1.0
}' \
--output speech.mp3
```
## Examples
The following examples demonstrate the capabilities of DeerFlow:
@@ -394,9 +438,13 @@ The application supports several command-line arguments to customize its behavio
- **--max_step_num**: Maximum number of steps in a research plan (default: 3)
- **--debug**: Enable detailed debug logging
## FAQ
Please refer to the [FAQ.md](docs/FAQ.md) for more details.
## License
This project is open source and available under the [MIT License](LICENSE).
This project is open source and available under the [MIT License](./LICENSE).
## Acknowledgments

15
docs/FAQ.md Normal file
View File

@@ -0,0 +1,15 @@
# FAQ
## Table of Contents
- [Where's the name DeerFlow come from?](#wheres-the-name-deerflow-come-from)
- [Which models does DeerFlow support?](#which-models-does-deerflow-support)
## Where's the name DeerFlow come from?
DeerFlow is short for **D**eep **E**xploration and **E**fficient **R**esearch **Flow**. It is named after the deer, which is a symbol of gentleness and elegance. We hope DeerFlow can bring a gentle and elegant deep research experience to you.
## Which models does DeerFlow support?
Please refer to the [Configuration Guide](configuration_guide.md) for more details.

View File

@@ -0,0 +1,87 @@
# Configuration Guide
## Which models does DeerFlow support?
In DeerFlow, currently we only support non-reasoning models, which means models like OpenAI's o1/o3 or DeepSeek's R1 are not supported yet, but we will add support for them in the future.
### Supported Models
`doubao-1.5-pro-32k-250115`, `gpt-4o`, `qwen-max-latest`, `gemini-2.0-flash`, `deepseek-v3`, and theoretically any other non-reasoning chat models that implement the OpenAI API specification.
### How to switch models?
You can switch the model in use by modifying the `conf.yaml` file in the root directory of the project, using the configuration in the [litellm format](https://docs.litellm.ai/docs/providers/openai_compatible).
---
### How to use OpenAI-Compatible models?
DeerFlow supports integration with OpenAI-Compatible models, which are models that implement the OpenAI API specification. This includes various open-source and commercial models that provide API endpoints compatible with the OpenAI format. You can refer to [litellm OpenAI-Compatible](https://docs.litellm.ai/docs/providers/openai_compatible) for detailed documentation.
The following is a configuration example of `conf.yaml` for using OpenAI-Compatible models:
```yaml
# An example of Doubao models served by VolcEngine
BASIC_MODEL:
api_base: "https://ark.cn-beijing.volces.com/api/v3"
model: "doubao/doubao-1.5-pro-32k-250115"
api_key: YOUR_API_KEY
# An example of Aliyun models
BASIC_MODEL:
api_base: "https://dashscope.aliyuncs.com/compatible-mode/v1"
model: "openai/qwen-max-latest"
api_key: YOUR_API_KEY
# An example of deepseek official models
BASIC_MODEL:
api_base: "https://api.deepseek.com"
model: "openai/deepseek-chat"
api_key: YOU_API_KEY
# An example of Google Gemini models using OpenAI-Compatible interface
BASIC_MODEL:
api_base: "https://generativelanguage.googleapis.com/v1beta/openai/"
model: "gemini-2.0-flash"
api_key: YOUR_API_KEY
```
### How to use Ollama models?
DeerFlow supports the integration of Ollama models. You can refer to [litellm Ollama](https://docs.litellm.ai/docs/providers/ollama). <br>
The following is a configuration example of `conf.yaml` for using Ollama models:
```yaml
BASIC_MODEL:
model: "ollama/ollama-model-name"
api_base: "http://localhost:11434" # Local service address of Ollama, which can be started/viewed via ollama serve
```
### How to use OpenRouter models?
DeerFlow supports the integration of OpenRouter models. You can refer to [litellm OpenRouter](https://docs.litellm.ai/docs/providers/openrouter). To use OpenRouter models, you need to:
1. Obtain the OPENROUTER_API_KEY from OpenRouter (https://openrouter.ai/) and set it in the environment variable.
2. Add the `openrouter/` prefix before the model name.
3. Configure the correct OpenRouter base URL.
The following is a configuration example for using OpenRouter models:
1. Configure OPENROUTER_API_KEY in the environment variable (such as the `.env` file)
```ini
OPENROUTER_API_KEY=""
```
2. Set the model name in `conf.yaml`
```yaml
BASIC_MODEL:
model: "openrouter/google/palm-2-chat-bison"
```
Note: The available models and their exact names may change over time. Please verify the currently available models and their correct identifiers in [OpenRouter's official documentation](https://openrouter.ai/docs).
### How to use Azure models?
DeerFlow supports the integration of Azure models. You can refer to [litellm Azure](https://docs.litellm.ai/docs/providers/azure). Configuration example of `conf.yaml`:
```yaml
BASIC_MODEL:
model: "azure/gpt-4o-2024-08-06"
api_base: $AZURE_API_BASE
api_version: $AZURE_API_VERSION
api_key: $AZURE_API_KEY
```