Files
deer-flow/src/prompts/planner_model.py
T
JeffJiang 462752b462 feat: RAG Integration (#238)
* feat: add rag provider and retriever

* feat: retriever tool

* feat: add retriever tool to the researcher node

* feat: add rag http apis

* feat: new message input supports resource mentions

* feat: new message input component support resource mentions

* refactor: need_web_search to need_search

* chore: RAG integration docs

* chore: change example api host

* fix: user message color in dark mode

* fix: mentions style

* feat: add local_search_tool to researcher prompt

* chore: research prompt

* fix: ragflow page size and reporter with

* docs: ragflow integration and add acknowledgment projects

* chore: format
2025-05-28 14:13:46 +08:00

59 lines
1.9 KiB
Python

# Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
# SPDX-License-Identifier: MIT
from enum import Enum
from typing import List, Optional
from pydantic import BaseModel, Field
class StepType(str, Enum):
RESEARCH = "research"
PROCESSING = "processing"
class Step(BaseModel):
need_search: bool = Field(..., description="Must be explicitly set for each step")
title: str
description: str = Field(..., description="Specify exactly what data to collect")
step_type: StepType = Field(..., description="Indicates the nature of the step")
execution_res: Optional[str] = Field(
default=None, description="The Step execution result"
)
class Plan(BaseModel):
locale: str = Field(
..., description="e.g. 'en-US' or 'zh-CN', based on the user's language"
)
has_enough_context: bool
thought: str
title: str
steps: List[Step] = Field(
default_factory=list,
description="Research & Processing steps to get more context",
)
class Config:
json_schema_extra = {
"examples": [
{
"has_enough_context": False,
"thought": (
"To understand the current market trends in AI, we need to gather comprehensive information."
),
"title": "AI Market Research Plan",
"steps": [
{
"need_search": True,
"title": "Current AI Market Analysis",
"description": (
"Collect data on market size, growth rates, major players, and investment trends in AI sector."
),
"step_type": "research",
}
],
}
]
}