Aprendizagem pessoal com IA
e orientação prática
Recomendação de recursos 1

Open Deep Research:LangChain开源的深度研究智能助手

Introdução geral

Open Deep Research 是一个基于网络的研究助手,能够生成有关任何主题的综合研究报告。该系统采用计划和执行的工作流程,用户可以先对报告结构进行规划并审阅,然后进入耗时的研究阶段。用户可选择不同的规划模型、搜索API和写作模型,例如Tavily、Perplexity、Anthropic和OpenAI等,以满足个性化需求。Open Deep Research 支持多次迭代的反思和搜索,确保报告的深度和准确性。用户可以通过简单的配置文件和命令行操作快速部署和使用该工具。


 

Lista de funções

  • 提供报告结构大纲
  • 设定规划模型(如DeepSeek、OpenAI推理模型等)
  • 对报告各部分的计划进行反馈并迭代直到用户满意
  • 设定搜索API(如Tavily、Perplexity)和每次研究迭代的搜索次数
  • 设定每部分的搜索深度(迭代次数)
  • 自定义写作模型(如Anthropic)
  • 本地运行LangGraph Studio UI
  • 自动生成结构化的研究报告
  • 支持多次搜索和反思迭代,提升报告质量

 

Usando a Ajuda

Início rápido

  1. 确保已设置所需工具的API密钥。
  2. 选择一个网络搜索工具(默认使用Tavily):
  3. 选择一个写作模型(默认使用Anthropic Claude 3.5 Sonnet):
  4. 选择一个规划模型(默认使用OpenAI o3-mini):
    • OpenAI
    • Groq

Uso

虚拟环境

  1. Crie um ambiente virtual:
    python -m venv open_deep_research
    source open_deep_research/bin/activate
    

  1. Instalação:
    pip install open-deep-research
    

在Jupyter Notebook中使用

  1. 导入并编译图表:
    de langógrafo.checkpoint.memory import MemorySaver
    from open_deep_research.graph import builder
    memory = MemorySaver()
    graph = builder.compile(checkpointer=memory)
    
  2. 查看图表:
    from IPython.display import Image, display
    display(Image(graph.get_graph(xray=1).draw_mermaid_png()))
    
  3. 运行图表:
    import uuid 
    thread = {"configurable": {"thread_id": str(uuid.uuid4()),
    "search_api": "tavily",
    "planner_provider": "openai",
    "planner_model": "o3-mini",
    "writer_provider": "anthropic",
    "writer_model": "claude-3-5-sonnet-latest",
    "max_search_depth": 1,
    }}
    topic = "Overview of the AI inference market with focus on Fireworks, Juntos.ai, Groq"
    async for event in graph.astream({"topic":topic,}, thread, stream_mode="updates"):
    print(event)
    print("\n")
    
  4. 生成报告计划后,提交反馈更新报告计划:
    from langgraph.types import Comando
    async for event in graph.astream(Command(resume="Include a revenue estimate (ARR) in the sections"), thread, stream_mode="updates"):
    print(event)
    print("\n")
    
  5. 当满意报告计划时,提交Verdadeiro以生成报告:
    async for event in graph.astream(Command(resume=True), thread, stream_mode="updates"):
    print(event)
    print("\n")
    

本地运行LangGraph Studio UI

  1. Armazém de Clonagem:
    git clone https://github.com/langchain-ai/open_deep_research.git
    cd open_deep_research
    
  2. compilador.env文件,设置API密钥:
    cp .env.example .env
    
  3. Configuração de variáveis de ambiente:
    export TAVILY_API_KEY=<your_tavily_api_key>
    export ANTHROPIC_API_KEY=<your_anthropic_api_key>
    export OPENAI_API_KEY=<your_openai_api_key>
    
  4. 启动LangGraph服务器:
    • Mac:
      curl -LsSf https://astral.sh/uv/install.sh | sh
      uvx --refresh --from "langgraph-cli[inmem]" --with-editable . --python 3.11 langgraph dev
      
    • Windows:
      pip install -e .
      pip install langgraph-cli[inmem]
      langgraph dev
      
  5. 打开Studio UI:
    - 🚀 API: http://127.0.0.1:2024
    - 🎨 Studio UI: https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024
    - 📚 API Docs: http://127.0.0.1:2024/docs
    

Relatórios personalizados

  • report_structure: 定义自定义报告结构(默认使用标准研究报告格式)
  • number_of_queries: 每部分生成的搜索查询数量(默认:2)
  • max_search_depth: 最大搜索深度(默认:2)
  • planner_provider: 规划阶段的模型提供商(默认:"openai",可选"groq")
  • planner_model: 规划使用的具体模型(默认:"o3-mini",可选如"deepseek-r1-distill-llama-70b")
  • writer_model: 写报告使用的模型(默认:"claude-3-5-sonnet-latest")
  • search_api: 使用的搜索API(默认:Tavily)
Conteúdo 1
Não pode ser reproduzido sem permissão:Chefe do Círculo de Compartilhamento de IA " Open Deep Research:LangChain开源的深度研究智能助手

Chefe do Círculo de Compartilhamento de IA

O Chief AI Sharing Circle se concentra no aprendizado de IA, fornecendo conteúdo abrangente de aprendizado de IA, ferramentas de IA e orientação prática. Nosso objetivo é ajudar os usuários a dominar a tecnologia de IA e explorar juntos o potencial ilimitado da IA por meio de conteúdo de alta qualidade e compartilhamento de experiências práticas. Seja você um iniciante em IA ou um especialista sênior, este é o lugar ideal para adquirir conhecimento, aprimorar suas habilidades e realizar inovações.

Entre em contato conosco
pt_BRPortuguês do Brasil