安装wdoc需要Python 3.11环境,推荐使用虚拟环境管理依赖。基础安装通过pip install -U wdoc
命令即可完成,若需PDF解析和语义分析增强功能,需额外安装wdoc[pdftotext]
cap (a poem)wdoc[fasttext]
扩展包。配置环节需注意:需提前设置API密钥环境变量(如export OPENAI_API_KEY='sk-xxx'
),支持多提供商密钥轮询。开发版可通过git+https
方式安装特定分支,这对需要自定义LLM路由规则或嵌入式数据库的高级用户特别有用。安装后建议运行wdoc --validate
进行环境校验,系统会检测必要的OCR组件、嵌入模型缓存等依赖项。
This answer comes from the articlewdoc: retrieve content and summarize knowledge from massive, multi-source documentsThe