579f8f624c
Tests / Check if changed (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Update Platform Components Table / update (push) Has been cancelled
Tests / format (push) Has been cancelled
Tests / check-imports (push) Has been cancelled
Tests / Unit / macos-latest (push) Has been cancelled
Tests / Unit / ubuntu-latest (push) Has been cancelled
Tests / Unit / windows-latest (push) Has been cancelled
Tests / mypy (push) Has been cancelled
Tests / Integration / ubuntu-latest (push) Has been cancelled
Tests / Integration / macos-latest (push) Has been cancelled
Tests / Integration / windows-latest (push) Has been cancelled
Tests / notify-slack-on-failure (push) Has been cancelled
Tests / Mark tests as completed (push) Has been cancelled
120 lines
13 KiB
Markdown
120 lines
13 KiB
Markdown
<!-- WEHUB_ZH_README -->
|
||
> [!NOTE]
|
||
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
|
||
> [English](./README.en.md) · [原始项目](https://github.com/deepset-ai/haystack) · [上游 README](https://github.com/deepset-ai/haystack/blob/HEAD/README.md)
|
||
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
|
||
|
||
<div align="center">
|
||
<a href="https://haystack.deepset.ai/"><img src="https://raw.githubusercontent.com/deepset-ai/haystack/main/images/banner.png" alt="蓝色横幅,带有 Haystack 徽标及文字「haystack by deepset – 面向生产就绪 RAG 与 Agent 的开源 AI 框架」,周围环绕代表搜索、文档、Agent、流水线与云系统的抽象图标。"></a>
|
||
|
||
| | |
|
||
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||
| CI/CD | [](https://github.com/deepset-ai/haystack/actions/workflows/tests.yml) [](https://github.com/python/mypy) [](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack/blob/python-coverage-comment-action-data/htmlcov/index.html) [](https://github.com/astral-sh/ruff) |
|
||
| Docs | [](https://docs.haystack.deepset.ai) |
|
||
| Package | [](https://pypi.org/project/haystack-ai/)   [](https://anaconda.org/conda-forge/haystack-ai) [](LICENSE) [](https://github.com/deepset-ai/haystack/actions/workflows/license_compliance.yml) [](https://hvtracker.net/agents/haystack/) [](https://hvtracker.net/agents/haystack/) [](https://www.bestpractices.dev/projects/13067)|
|
||
| Meta | [](https://discord.com/invite/qZxjM4bAHU) [](https://twitter.com/haystack_ai) |
|
||
</div>
|
||
|
||
[Haystack](https://haystack.deepset.ai/) 是一款用于在 Python 中构建生产就绪 LLM 应用的开源 AI 编排框架。
|
||
|
||
设计模块化流水线与 Agent 工作流,对检索、路由、记忆与生成进行显式控制。构建可扩展的 RAG 系统、多模态应用、语义搜索、问答与自主 Agent,全部采用透明架构,便于你实验、深度定制并自信部署。
|
||
|
||
## 目录
|
||
|
||
- [安装](#installation)
|
||
- [文档](#documentation)
|
||
- [特性](#features)
|
||
- [Haystack Enterprise:支持与平台](#haystack-enterprise-support--platform)
|
||
- [遥测](#telemetry)
|
||
- [🖖 社区](#-community)
|
||
- [为 Haystack 做贡献](#contributing-to-haystack)
|
||
- [使用 Haystack 的组织](#organizations-using-haystack)
|
||
|
||
|
||
## 安装
|
||
|
||
获取 Haystack 最简单的方式是通过 pip:
|
||
|
||
```sh
|
||
pip install haystack-ai
|
||
```
|
||
|
||
安装每夜预发布版本以试用最新功能:
|
||
```sh
|
||
pip install --pre haystack-ai
|
||
```
|
||
|
||
Haystack 支持多种安装方式,包括 Docker 镜像。如需完整指南,请参阅
|
||
[文档](https://docs.haystack.deepset.ai/docs/installation).
|
||
|
||
## 文档
|
||
|
||
如果你是项目新手,请查看 ["什么是 Haystack?"](https://haystack.deepset.ai/overview/intro),然后阅读
|
||
["入门指南"](https://haystack.deepset.ai/overview/quick-start),在几分钟内构建你的第一个 LLM 应用。
|
||
继续通过 [教程](https://haystack.deepset.ai/tutorials). 学习。如需更高级的用例,或只是想获取一些灵感,可以浏览我们在
|
||
[Cookbook](https://haystack.deepset.ai/cookbook). 中的 Haystack 示例。
|
||
|
||
任何时候,都可以查阅 [文档](https://docs.haystack.deepset.ai/docs/intro),进一步了解 Haystack、它能为你做什么,以及背后的技术。
|
||
|
||
## 特性
|
||
|
||
**面向上下文工程(Context Engineering)构建**
|
||
设计灵活的系统,对信息在到达模型之前如何被检索、排序、过滤、组合、结构化与路由进行显式控制。定义流水线与 Agent 工作流,使检索、记忆、工具与生成透明且可追溯。
|
||
|
||
**模型与供应商无关(Model- and vendor-agnostic)**
|
||
可与 OpenAI、Mistral、Anthropic、Cohere、Hugging Face、Azure OpenAI、AWS Bedrock、本地模型等众多平台集成。无需重写系统即可更换模型或基础设施组件。
|
||
|
||
**模块化且可定制**
|
||
使用内置组件完成检索、索引、工具调用、记忆与评估,或创建你自己的组件。添加循环、分支与条件逻辑,精确控制上下文在流水线与 Agent 工作流中的流转方式。
|
||
|
||
**可扩展生态**
|
||
通过一致的接口构建并分享自定义组件,便于社区与第三方扩展 Haystack,并为开放生态做出贡献。
|
||
|
||
> [!TIP]
|
||
>
|
||
> 你是否希望将 Haystack 流水线部署并提供为 **REST API** 或 **MCP 服务器**?[Hayhooks](https://github.com/deepset-ai/hayhooks) 提供了一种简单方式,让你用自定义逻辑封装流水线与 Agent,并通过 HTTP 端点或 MCP 对外暴露。它还支持 OpenAI 兼容的聊天补全端点,并可与 [open-webui](https://openwebui.com/). 等聊天 UI 配合使用。
|
||
|
||
## Haystack Enterprise:支持与平台
|
||
|
||
获取 Haystack 团队的专业支持,借助企业级模板更快构建,并通过面向云端与本地(on-prem)环境的部署指南安全扩展,一切尽在 **Haystack Enterprise Starter**。详情请参阅[公告博文](https://haystack.deepset.ai/blog/announcing-haystack-enterprise).
|
||
|
||
👉 [获取 Haystack Enterprise Starter](https://www.deepset.ai/products-and-services/haystack-enterprise-starter?utm_source=github.com&utm_medium=referral&utm_campaign=haystack_enterprise)
|
||
|
||
需要为 Haystack 配置托管式生产环境吗?**Haystack Enterprise Platform** 可帮助您构建、测试、部署和运维 Haystack 流水线(pipeline),内置可观测性(observability)、协作、治理与访问控制。可作为托管云服务或自托管方案使用。
|
||
|
||
👉 了解更多 [Haystack Enterprise Platform](https://www.deepset.ai/products-and-services/haystack-enterprise-platform?utm_campaign=developer-relations&utm_source=haystack&utm_medium=readme) 相关信息,或[免费试用](https://www.deepset.ai/haystack-enterprise-platform-trial?utm_campaign=developer-relations&utm_source=haystack&utm_medium=readme)
|
||
|
||
## 遥测(Telemetry)
|
||
|
||
Haystack 会收集流水线组件的**匿名**使用统计信息。每当这些组件被初始化时,我们都会收到一条事件。借此,我们能够了解哪些组件对社区最为重要。
|
||
|
||
有关 Haystack 遥测或如何选择退出的更多信息,请参阅 [Haystack 文档](https://docs.haystack.deepset.ai/docs/telemetry).
|
||
|
||
## 🖖 社区
|
||
|
||
如有功能请求或错误报告,欢迎在 GitHub 上提交 [issue](https://github.com/deepset-ai/haystack/issues).。我们会定期查看,通常能较快回复。如需讨论某个话题,或获取如何让 Haystack 更好地服务于您项目的通用建议,可在 [Github Discussions](https://github.com/deepset-ai/haystack/discussions) 发起话题,或前往我们的 [Discord 频道](https://discord.com/invite/VBpFzsgRVF).。我们也会关注 [𝕏 (Twitter)](https://twitter.com/haystack_ai) 和 [Stack Overflow](https://stackoverflow.com/questions/tagged/haystack).
|
||
|
||
## 为 Haystack 做贡献
|
||
|
||
我们非常欢迎社区贡献——无论是修正一处笔误,还是提交全新功能!您无需成为 Haystack 专家也能做出有意义的改进。请先查阅我们的[贡献者指南](https://github.com/deepset-ai/haystack/blob/main/CONTRIBUTING.md),了解如何开始。
|
||
|
||
您可以通过以下方式为 Haystack 做贡献:
|
||
- 为主 Haystack 项目做贡献
|
||
- 在 [haystack-core-integrations](https://github.com/deepset-ai/haystack-core-integrations) 上贡献集成
|
||
- 在 [haystack/docs-website](https://github.com/deepset-ai/haystack/tree/main/docs-website) 中为文档做贡献
|
||
|
||
> [!TIP]
|
||
>👉 **[查看完整列表:欢迎贡献的 issue](https://github.com/orgs/deepset-ai/projects/14)**
|
||
|
||
## 使用 Haystack 的组织
|
||
|
||
数以千计的团队正在使用 Haystack 构建跨行业的生产级 AI 系统,其中包括:
|
||
|
||
- **科技与 AI 基础设施**:[Apple](https://www.apple.com/), [Meta](https://www.meta.com/about), [Databricks](https://www.databricks.com/), [NVIDIA](https://developer.nvidia.com/blog/reducing-development-time-for-intelligent-virtual-assistants-in-contact-centers/), [Intel](https://github.com/intel/open-domain-question-and-answer#readme)
|
||
- **公共部门 AI 倡议**:[European Commission](https://commission.europa.eu/index_en), [German Federal Ministry of Research, Technology, and Space (BMFTR)](https://www.deepset.ai/case-studies/german-federal-ministry-research-technology-space-bmftr), [PD, Baden-Württemberg State](https://www.pd-g.de/)
|
||
- **企业与工业 AI 应用**:[Airbus](https://www.deepset.ai/case-studies/airbus), [Lufthansa Industry Solutions](https://haystack.deepset.ai/blog/lufthansa-user-story), [Infineon](https://www.infineon.com/), [LEGO](https://github.com/larsbaunwall/bricky#readme), [Comcast](https://arxiv.org/html/2405.00801v2), [Accenture](https://www.accenture.com/), [TELUS Agriculture & Consumer Goods](https://www.telus.com/agcg/en)
|
||
- **知识与内容平台**:[Netflix](https://netflix.com), [ZEIT Online](https://www.deepset.ai/case-studies/zeit-online), [Rakuten](https://www.rakuten.com/), [Oxford University Press](https://corp.oup.com/), [Manz](https://www.deepset.ai/case-studies/manz), [YPulse](https://www.deepset.ai/case-studies/ypulse)
|
||
|
||
|
||
您也在使用 Haystack 吗?欢迎提交 PR,或[与我们分享您的故事](https://forms.gle/Mm3G1aEST3GAH2rn8)
|