Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

如何快速部署HippoRAG并使用OpenAI模型?

2025-08-30 1.3 K

environmental preparation

基础要求:Python 3.10环境,有效OpenAI API密钥

  • Create a conda environment:conda create -n hipporag python=3.10
  • Install the core library:pip install hipporag
  • 设置环境变量包括OPENAI_API_KEY

快速启动流程

  1. 准备文档列表(支持txt/md/pdf等多种格式)
  2. 初始化检索器:指定gpt-4o-mini等模型名称
  3. invocationsindex()方法建立知识索引
  4. utilizationrag_qa()进行多轮问答

典型代码示例

<from hipporag import HippoRAG
hipporag = HippoRAG(
    save_dir='outputs',
    llm_model_name='gpt-4o-mini',
    embedding_model_name='nvidia/NV-Embed-v2'
)
hipporag.index(docs=["示例文档内容"])
rag_results = hipporag.rag_qa(["示例问题"])>

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish