[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-dgarnitz--vectorflow":3,"tool-dgarnitz--vectorflow":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",141543,2,"2026-04-06T11:32:54",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107888,"2026-04-06T11:32:50",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":74,"owner_company":74,"owner_location":74,"owner_email":74,"owner_twitter":74,"owner_website":74,"owner_url":76,"languages":77,"stars":90,"forks":91,"last_commit_at":92,"license":93,"difficulty_score":10,"env_os":94,"env_gpu":95,"env_ram":95,"env_deps":96,"category_tags":106,"github_topics":107,"view_count":32,"oss_zip_url":74,"oss_zip_packed_at":74,"status":17,"created_at":114,"updated_at":115,"faqs":116,"releases":147},4681,"dgarnitz\u002Fvectorflow","vectorflow","VectorFlow is a high volume vector embedding pipeline that ingests raw data, transforms it into vectors and writes it to a vector DB of your choice. ","VectorFlow 是一款开源的高吞吐量向量嵌入流水线工具，旨在简化从原始数据到向量数据库的整个处理流程。它能够通过简单的 API 请求，自动接收大量原始数据（支持 TXT、PDF、HTML 和 DOCX 等格式），将其智能分块并转化为向量嵌入，随后快速可靠地存入用户指定的向量数据库或直接返回结果。\n\n在构建基于大语言模型的应用时，开发者往往需要自行搭建复杂的数据预处理和向量化管道，这不仅耗时且难以应对高并发场景。VectorFlow 正是为了解决这一痛点而生，它提供了一个容错性强、易于部署的中间层，让数据处理变得像调用一个接口一样简单。\n\n这款工具特别适合后端开发者、AI 工程师以及需要构建检索增强生成（RAG）系统的研究人员使用。无论是希望在本地快速原型验证，还是需要在生产环境中通过 Kubernetes 进行大规模部署，VectorFlow 都能提供灵活的支持。其独特的技术亮点在于“高吞吐”与“容错性”的设计，确保在处理海量数据时依然稳定高效。此外，项目提供了便捷的 Python 客户端库和 Docker Compose 部署方案，让用户只需几条命令即可在本地启动服务，极大地降","VectorFlow 是一款开源的高吞吐量向量嵌入流水线工具，旨在简化从原始数据到向量数据库的整个处理流程。它能够通过简单的 API 请求，自动接收大量原始数据（支持 TXT、PDF、HTML 和 DOCX 等格式），将其智能分块并转化为向量嵌入，随后快速可靠地存入用户指定的向量数据库或直接返回结果。\n\n在构建基于大语言模型的应用时，开发者往往需要自行搭建复杂的数据预处理和向量化管道，这不仅耗时且难以应对高并发场景。VectorFlow 正是为了解决这一痛点而生，它提供了一个容错性强、易于部署的中间层，让数据处理变得像调用一个接口一样简单。\n\n这款工具特别适合后端开发者、AI 工程师以及需要构建检索增强生成（RAG）系统的研究人员使用。无论是希望在本地快速原型验证，还是需要在生产环境中通过 Kubernetes 进行大规模部署，VectorFlow 都能提供灵活的支持。其独特的技术亮点在于“高吞吐”与“容错性”的设计，确保在处理海量数据时依然稳定高效。此外，项目提供了便捷的 Python 客户端库和 Docker Compose 部署方案，让用户只需几条命令即可在本地启动服务，极大地降低了向量数据工程化的门槛。","\u003Cdiv align=\"center\">\n \u003Csvg width=\"164\" height=\"164\" fill=\"none\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\">\u003Cg filter=\"url(#a)\">\u003Crect x=\"32\" y=\"20\" width=\"100\" height=\"100\" rx=\"16\" fill=\"#1E293B\"\u002F>\u003Crect x=\"32.5\" y=\"20.5\" width=\"99\" height=\"99\" rx=\"15.5\" stroke=\"url(#b)\"\u002F>\u003C\u002Fg>\u003Cpath d=\"m109.645 56.269-6.956-4.02m6.956 4.02v6.887m0-6.887-6.956 4.02m-48.697-4.02 6.957-4.02m-6.957 4.02 6.957 4.02m-6.957-4.02v6.887M81.82 72.34l6.956-4.02m-6.956 4.02-6.957-4.02m6.957 4.02v6.888m0 20.662 6.956-4.019m-6.956 4.02v-6.888m0 6.887-6.957-4.019m0-51.657 6.957-4.016 6.956 4.019m20.87 32.715v6.887l-6.956 4.02m-41.74 0-6.957-4.02v-6.887\" stroke=\"url(#c)\" stroke-width=\"5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\u002F>\u003Cdefs>\u003CradialGradient id=\"b\" cx=\"0\" cy=\"0\" r=\"1\" gradientUnits=\"userSpaceOnUse\" gradientTransform=\"matrix(50 0 0 50 82 70)\">\u003Cstop offset=\".472\" stop-color=\"#334155\"\u002F>\u003Cstop offset=\".764\" stop-color=\"#94A3B8\"\u002F>\u003Cstop offset=\"1\" stop-color=\"#334155\"\u002F>\u003C\u002FradialGradient>\u003ClinearGradient id=\"c\" x1=\"89.747\" y1=\"31.4\" x2=\"40.821\" y2=\"63.731\" gradientUnits=\"userSpaceOnUse\">\u003Cstop stop-color=\"#F1F5F9\" stop-opacity=\".01\"\u002F>\u003Cstop offset=\"1\" stop-color=\"#F1F5F9\"\u002F>\u003C\u002FlinearGradient>\u003Cfilter id=\"a\" x=\"0\" y=\"0\" width=\"164\" height=\"164\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\u003CfeFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"\u002F>\u003CfeColorMatrix in=\"SourceAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"\u002F>\u003CfeOffset dy=\"12\"\u002F>\u003CfeGaussianBlur stdDeviation=\"16\"\u002F>\u003CfeColorMatrix values=\"0 0 0 0 0.0588235 0 0 0 0 0.0901961 0 0 0 0 0.164706 0 0 0 0.64 0\"\u002F>\u003CfeBlend in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_127_2\"\u002F>\u003CfeBlend in=\"SourceGraphic\" in2=\"effect1_dropShadow_127_2\" result=\"shape\"\u002F>\u003C\u002Ffilter>\u003C\u002Fdefs>\u003C\u002Fsvg>\n    \u003Ca href=\"https:\u002F\u002Fwww.getvectorflow.com\u002F\">\n        \u003Ch1>VectorFlow\u003C\u002Fh1>\n    \u003C\u002Fa>\n    \u003Ch3>Open source, high-throughput, fault-tolerant vector embedding pipeline\u003C\u002Fh3>\n    \u003Cspan>Simple API endpoint that ingests large volumes of raw data, processes, and stores or returns the vectors quickly and reliably\u003C\u002Fspan>\n\u003C\u002Fdiv>\n\u003Ch4 align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FMEXuahMs2F\">Join our Discord\u003C\u002Fa>  |\n  \u003Ca href=\"https:\u002F\u002Fwww.getvectorflow.com\u002F\">Website\u003C\u002Fa>  |  \n  \u003Ca href=\"mailto:dan@getvectorflow.com\">Get in touch\u003C\u002Fa> |\n  \u003Ca href=\"https:\u002F\u002Fvectorflow.dev-docs.dev\u002Fdocs\u002F\">Docs\u003C\u002Fa> |\n  \u003Ca href=\"https:\u002F\u002Fapp.getvectorflow.com\u002F\">Free Hosted Version\u003C\u002Fa> \n\u003C\u002Fh4>\n\n\u003Cdiv align=\"center\">\n\n[![IMAGE ALT TEXT HERE](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdgarnitz_vectorflow_readme_9004ca01261f.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=aQOlOT14DaA)\n\n\u003C\u002Fdiv>\n\n# Introduction\n\nVectorFlow is an open source, high throughput, fault tolerant vector embedding pipeline. With a simple API request, you can send raw data that will be chunked, embedded and stored in any vector database or returned back to you.  \n\nThis current version is an MVP. We recommend using it with Kubernetes in production (see below for details). For text-based files, it supports TXT, PDF, HTML and DOCX. \n\n# Run it Locally\nWith three commands you can run VectorFlow locally:\n```\ngit clone https:\u002F\u002Fgithub.com\u002Fdgarnitz\u002Fvectorflow.git\ncd vectorflow\n.\u002Fsetup.sh\n```\n\n#### Embed Documents with Client\nTo start embedding documents locally, [install the VectorFlow Client python library](https:\u002F\u002Fpypi.org\u002Fproject\u002Fvectorflow-client\u002F) in your python application's virtual environment. \n```\npip install vectorflow-client\n```\nthen run the following\n```\nfrom vectorflow-client.client.vectorflow import Vectorflow\n\nvectorflow = Vectorflow()\nvectorflow.embeddings_api_key = os.getenv(\"OPEN_AI_KEY\")\npaths = ['path_to_your_file1', 'path_to_your_file2', ...]\nresponse = vectorflow.upload(paths)\n```\n\nYou do **not** need to clone the VectorFlow repo to utilize the client functionality via pip. For more instructions see the `README.md` in the `client` directory.\n\nSee the appendix for details on how to use the `testing_clients` scripts.\n\n## Docker-Compose\n\nThe best way to run VectorFlow is via `docker compose`. If you are running this on Mac, please grant Docker permissions to read from your Documents folder [as instructed here](https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F58482352\u002Foperation-not-permitted-from-docker-container-logged-as-root). If this fails, remove the `volume` section from the `docker-compose.yml`.\n\n### 1) Set Environment Variables\n\nFirst create a folder, `env_scripts`, in the root for all the environment variables, then create `env_vars.env` in the `env_scripts` folder to add all the environment variables mentioned below. You only need to set the `LOCAL_VECTOR_DB` variable if you are running qdrant, Milvus or Weaviate locally.  \n\n```\nINTERNAL_API_KEY=your-choice\nPOSTGRES_USERNAME=postgres\nPOSTGRES_PASSWORD=your-choice\nPOSTGRES_DB=vectorflow\nPOSTGRES_HOST=postgres\nRABBITMQ_USERNAME=guest\nRABBITMQ_PASSWORD=guest\nRABBITMQ_HOST=rabbitmq\nLOCAL_VECTOR_DB=qdrant | weaviate\nAPI_STORAGE_DIRECTORY=\u002Ftmp\nMINIO_ACCESS_KEY=minio99\nMINIO_SECRET_KEY=minio123\nMINIO_ENDPOINT=minio:9000\nMINIO_BUCKET=vectorflow\n```\n\nYou can choose a variable for `INTERNAL_API_KEY`, `POSTGRES_PASSWORD`, and `POSTGRES_DB`, but they must be set.\n\n### 2) Run Docker-Compose\n\nMake sure you pull Rabbit MQ, Postgres, Min.io into your local docker repo. We also recommend running a vector DB in locally, so make sure to pull the image of the one you are using. Our `docker-compose` file will spin up qdrant by default and create two index\u002Fcollections. If you plan to run Milvus or Weaviate, you will have to configure them on your own. \n\n```\ndocker pull rabbitmq\ndocker pull postgres\ndocker pull qdrant\u002Fqdrant | docker pull semitechnologies\u002Fweaviate\ndocker pull minio\u002Fminio\n```\n\nThen run:\n\n```\ndocker-compose build --no-cache\ndocker-compose up -d\n```\n\nNote that the `init` containers are running a script that sets up the database schema, vector DB and Min.io object store. These containers stop after the script completes. For qdrant, make sure to pull version 1.9.1 since that is the version the qdrant client python package is supposed to work with. \n\n\n## Using VectorFlow\n\nThe best way to use VectorFlow is with the python client. \n\nTo use VectorFlow for development, make an HTTP request to your API's URL - for example, `localhost:8000` from your development machine, or `vectorflow_api:8000` from within another docker container.\n\n### Request & Response Payload\n\nAll requests require an HTTP Header with `Authorization` key which is the same as your `INTERNAL_API_KEY` env var that you defined before (see above). You must pass your vector database api key with the HTTP Header `X-VectorDB-Key` if you are running a connecting to a cloud-based instance of a vector DB, and the embedding api key with `X-EmbeddingAPI-Key` if you are using OpenAI. HuggingFace Sentence Transformer embeddings do not require an api key, but you must follow the above steps to run the container with the model you need. \n\nVectorFlow currently supports Pinecone, Qdrant and Weaviate vector databases. \n\n#### Embed a Single File\nTo submit a single file for embedding, make a `POST` request to the `\u002Fembed` endpoint with a file attached, the `'Content-Type: multipart\u002Fform-data'` header and the following payload:\n\n```\n{\n    'SourceData=path_to_txt_file'\n    'LinesPerBatch=4096'\n    'EmbeddingsMetadata={\n        \"embeddings_type\": \"OPEN_AI\",\n        \"chunk_size\": 512,\n        \"chunk_overlap\": 128,\n        \"chunk_strategy\": \"EXACT | PARAGRAPH | SENTENCE | CUSTOM\",\n        \"model\": \"text-embedding-3-small | text-embedding-3-large | text-embedding-ada-002\"\n    }'\n    'VectorDBMetadata={\n        \"vector_db_type\": \"PINECONE | QDRANT | WEAVIATE\",\n        \"index_name\": \"index_name\",\n        \"environment\": \"env_name\"\n    }'\n    'DocumentID=your-optional-internal-tracking-id'\n}\n```\n\nThis will create a `job` and you will get the following payload back:\n\n```\n{\n    'message': f\"Successfully added {batch_count} batches to the queue\",\n    'JobID': job_id\n}\n```\n\nRight now this endpoint only supports uploading single files at a time, up to 25 MB due to timeout issues. Note that it may be deprecated.\n\n#### Embed Multiple Files At Once\nTo submit multiple files for embedding, make a `POST` request to the `\u002Fjobs` endpoint. The payload is the same as for single file embedding except the way you attach multiple files is different:\n\n```\n{\n    'files=[\n        ('file',  ('test_pdf.pdf', open(file1_path, 'rb'), 'application\u002Foctet-stream')),\n        ('file', ('test_medium_text.txt', open(file2_path, 'rb'), 'application\u002Foctet-stream'))\n    ]'\n}\n```\n*NOTE:* You must `stream` the files to the endpoint, not send it as a conventional post request or it will fail. \n\nThis endpoint will create one `job` per file uploaded. You will get the following JSON payload back:\n\n```\n{   \n    'successful_uploads': successfully_uploaded_files,\n    'failed_uploads': failed_uploads,\n    'empty_files_count': empty_files_count,\n    'duplicate_files_count': duplicate_files_count\n}\n```\n\nWhere `successfully_uploaded_files` is a list of tuples containing `(file name, job id)` and `failed_uploads` is a list of file names that failed to upload so you can retry them. \n\n#### Get a Single Job Status\nTo check the status of a `job`, make a `GET` request to this endpoint: `\u002Fjobs\u002F\u003Cint:job_id>\u002Fstatus`. The response will be in the form:\n\n```\n{\n    'JobStatus': job_status\n}\n```\n\n#### Get Multiple Job Statuses\nTo check the status of multiples `job`, make a `POST` request to this endpoint: `\u002Fjobs\u002Fstatus`. The request body will be in the form:\n\n```\n{\n    'JobIDs': job_ids\n}\n```\n\nand the response will be in the form\n```\n{\n    'Jobs': [{'JobID': job_id, 'JobStatus': job_status}, ...]}\n```\nThere is an example in `testing_clients\u002Fget_jobs_by_ids.py`.\n\n### Vector Database Standard Metadata Schema \nVectorFlow enforces a standardized schema for uploading data to a vector store:\n```\nid: string\nsource_data: string\nsource_document: string\nembeddings: float array\n```\n\nThe id can be used for deduplication and idempotency. Please note for Weaviate, the id is called `vectorflow_id`. \n\nWe plan deprecicate this in the near futuer to support dynamically detected and\u002For configurable schemas down the road. \n\n### Chunking Schema & Custom Chunking\nVectorFlow's built in chunkers count by token not by character. A `chunk` in vectorflow is a dictionary that has the following keys:\n```\ntext: str\nvector: list[float]\n```\n\nYou may run a custom chunker by adding a file, `custom_chunker.py`, with a method, `chunker(source_data: list[str])` to the `src\u002Fworker` directory prior to build the docker image for the worker. This chunker must return a list of `chunk` dictionaries that conform to the standard above. \n\nYou can add any keys you want to the `chunk` dictionary as long as its _JSON serializable_, meaning no custom classes or function, datetimes types or circular code references. You can use this custom chunk to then upload metadata to the vector DB with whatever schema you desire. \n\n### Raw Embeddings Webhook\nIf you wish to use VectorFlow only for chunking and generating embeddings, pass a `WebhookURL` parameter in the body of the `\u002Fembed` request and a `X-Webhook-Key` as a header. VectorFlow assumes a webhook key is required for writing back to any endpoint. The embeddings are sent back along with the source chunks in the `chunk` dictionary outlined above. This is sent as json with the following form:\n```\n{\n    'Embeddings': list[dict],\n    'DocumentID': str,\n    'JobID': int\n}\n```\n\n### Chunk Validation Webhook\nIf you wish to validate which chunks you wish to embed, pass a `ChunkValidationURL` parameter in the body of the `\u002Fembed` request. This will send the request with the following json payload, `{\"chunks\": chunked_data}`, where `chunked_data` is a list of `chunk` dictionaries. It will expected back json containing key `valid_chunks` with a list of valid chunks for embedding. This endpoint will timeout after 30 seconds by default but can be configured in the application code. \n\n### S3 Endpoint\nVectorFlow is integrated with AWS s3. You can pass a pre-signed s3 URL in the body of the HTTP instead of a file. Use the form field `PreSignedURL` and hit the endpoint `\u002Fs3`. This endpoint has the same configuration and restrictions as the `\u002Fembed` endpoint. \n\n### Telemetry\nVectorFlow uses PostHog to anonymously collect data about usage. This does not collect any personally identifiable information. If you want to disable it though, add the following enviroment variable to your `env_vars.env`:\n```\nTELEMETRY_DISABLED=True\n```\n\n## Kubernetes\nYou can run VectorFlow locally in Kubernetes with minikube using `.\u002Fkube\u002Fscripts\u002Fdeploy-local-k8s.sh`, which will apply all the yaml files located in `kube\u002F`. This script will not work if you have not installed docker, minikube and kubectl. \n\nThis script will first build the images locally, then transfer them into minikube. If you want to check what images are available in minikube, run the following:\n\n```\neval $(minikube docker-env)\ndocker images\n```\n\nYou will need to run `minikube tunnel` to access the resources located in the cluster from your development machine. The setup script will load the images from your local docker context into minikube's. \n\nYou can use the yaml files in `kube\u002F` as a basis for a production deployment but you will need to customize slightly to the needs of your specific cluster. **Contact us if you need help.**\n\n# Contributing\n\nWe love feedback from the community. If you have an idea of how to make this project better, we encourage you to open an issue or join our Discord. Please tag `dgarnitz` and `danmeier2`.\n\nOur roadmap is outlined in the section below and we would love help in building it out. Our open issues are a great place to start and can be viewed [here](https:\u002F\u002Fgithub.com\u002Fdgarnitz\u002Fvectorflow\u002Fissues). If you want to work on something not listed there, we recommend you open an issue with a proposed approach in mind before submitting a PR.\n\nPlease tag `dgarnitz` on all PRs and *update the README* to reflect your changes.\n\n### Testing\n\nWhen submitting a PR, please add units tests to cover the functionality you have added. Please re-run existing tests to ensure there are no regressive bugs. Run from the `src` directory. To run an individual test use:\n\n```\npython -m unittest module.tests.test_file.TestClass.test_method\n```\n\nTo run all the tests in the file use: \n```\npython -m unittest module.tests.test_file\n```\n\nFor end-to-end testing, it is recommend to build and run using the docker-compose, but take down the container you are altering and run it locally on your development machine. This will avoid the need to constantly rebuild the images and re-run the containers. Make sure to change the environment variables in your development machine terminal to the correct values (i.e. `localhost` instead of `rabbitmq` or `postgres`) so that the docker containers can communicate with your development machine. Once it works locally you can perform a final test with everything in docker-compose.\n\n### Verifying\nPlease verify that all changes work with docker-compose before opening a PR. \n\nWe also recommend you add verification evidence, such as screenshots, that show that your code works in an end to end flow. \n\n\n# Roadmap\n\n- [ ] Support for multi-file, directory data ingestion from sources such as Salesforce, Google Drive, etc\n- [ ] Retry mechanism\n- [ ] Langchain integrations\n- [ ] Support callbacks for writing object metadata to a separate store\n- [ ] Dynamically configurable vector DB schemas\n- [ ] Deduplication capabilities\n- [ ] Vector version control\n- [ ] \"Smart\" chunker\n- [ ] \"Smart\" metadata extractor\n\n# Appendix\n\n## Embed with Testing Scripts\nOne easy way to use VectorFlow is with the our testing clients, located in `testing_clients\u002F` directory. There are several scripts, with different configurations for qickly uploading data. We recommmend starting with the `testing_clients\u002Fstandard_upload_client.py` - Running this script will submit a single document to VectorFlow for embedding with Open AI ADA and upload to the local qdrant instance. You can change the values to match your configuration. To upload multiple files at once, use the `testing_clients\u002Fstreaming_upload_client.py`\n\nNote that the `TESTING_ENV` variable is the equivalent of the `environment` field in the `VectorDBMetadata`, which corresponds to an environment in Pincone, a class in Weaviate, a collection in qdrant, etc. \nThe `testing_clients` directory has sample scripts you can follow to run vectorflow. Add your embedding and database keys to the `env_scrips\u002Fenv_vars.sh` script that was generated and set the `filepath` variable in `testing_clients\u002Fstandard_upload_client.py` to point to the file you want to embed. Then run:\n```\nsource env_scrips\u002Fenv_vars.sh\npython testing-clients\u002Fstandard_upload_client.py\n```\n\nTo upload multiple files at once, use the `testing_clients\u002Fstreaming_upload_client.py`\n\nSee above for a more detailed description of how to manually set up and configure the system. Please note that the `setup` script will not create a development environment on your machine, it only sets up and runs the docker-compose. We do not advise using VectorFlow on Windows. \n\n### Request\nTo perform a search, send a `POST` request to `\u002Fimages\u002Fsearch` endpoint with an image file attached, the `'Content-Type: multipart\u002Fform-data'` header and the following body:\n```\n{\n    'ReturnVectors': boolean,\n    'TopK': integer, less than 1000,\n    'VectorDBMetadata={\n        \"vector_db_type\": \"PINECONE | QDRANT | WEAVIATE\",\n        \"index_name\": \"index_name\",\n        \"environment\": \"env_name\"\n    }'\n}\n```\nAll requests require an HTTP Header with `Authorization` key which is the same as your `INTERNAL_API_KEY` env var that you defined before (see above). You must pass your vector database api key with the HTTP Header `X-VectorDB-Key` if you are running a connecting to a cloud-based instance of a vector DB. \n\n### Response\nAn image similarity search will return a response object containing the top K matches, plus the raw vectors if requested, with of the following form:\n```\n{\n    \"similar_images\": list of match objects\n    \"vectors\": list of list of floats\n}\n```\nwhere `match`` objects are defined as:\n```\n{\n    \"id\": str,\n    \"score\": float,\n    \"metadata\": {\"source_document\" : str}\n}\n```\n\n### Building the Individual Images with Docker Commands\nIf you want to use `docker build` and `docker run` to build and run individual images instead of `docker-compose` follow these steps:\n1. `cd src\u002F`\n2. `docker build --file api\u002FDockerfile -t vectorflow_api:latest .` to build - don't forget the period at the end\n3. `docker run --network=vectorflow --name=vectorflow_api -d --env-file=..\u002Fenv_scripts\u002Fenv_vars.env -p 8000:8000 vectorflow_api:latest` to run the api. you don't need the port argument to run the worker","\u003Cdiv align=\"center\">\n \u003Csvg width=\"164\" height=\"164\" fill=\"none\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\">\u003Cg filter=\"url(#a)\">\u003Crect x=\"32\" y=\"20\" width=\"100\" height=\"100\" rx=\"16\" fill=\"#1E293B\"\u002F>\u003Crect x=\"32.5\" y=\"20.5\" width=\"99\" height=\"99\" rx=\"15.5\" stroke=\"url(#b)\"\u002F>\u003C\u002Fg>\u003Cpath d=\"m109.645 56.269-6.956-4.02m6.956 4.02v6.887m0-6.887-6.956 4.02m-48.697-4.02 6.957-4.02m-6.957 4.02 6.957 4.02m-6.957-4.02v6.887M81.82 72.34l6.956-4.02m-6.956 4.02-6.957-4.02m6.957 4.02v6.888m0 20.662 6.956-4.019m-6.956 4.02v-6.888m0 6.887-6.957-4.019m0-51.657 6.957-4.016 6.956 4.019m20.87 32.715v6.887l-6.956 4.02m-41.74 0-6.957-4.02v-6.887\" stroke=\"url(#c)\" stroke-width=\"5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\u002F>\u003Cdefs>\u003CradialGradient id=\"b\" cx=\"0\" cy=\"0\" r=\"1\" gradientUnits=\"userSpaceOnUse\" gradientTransform=\"matrix(50 0 0 50 82 70)\">\u003Cstop offset=\".472\" stop-color=\"#334155\"\u002F>\u003Cstop offset=\".764\" stop-color=\"#94A3B8\"\u002F>\u003Cstop offset=\"1\" stop-color=\"#334155\"\u002F>\u003C\u002FradialGradient>\u003ClinearGradient id=\"c\" x1=\"89.747\" y1=\"31.4\" x2=\"40.821\" y2=\"63.731\" gradientUnits=\"userSpaceOnUse\">\u003Cstop stop-color=\"#F1F5F9\" stop-opacity=\".01\"\u002F>\u003Cstop offset=\"1\" stop-color=\"#F1F5F9\"\u002F>\u003C\u002FlinearGradient>\u003Cfilter id=\"a\" x=\"0\" y=\"0\" width=\"164\" height=\"164\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\">\u003CfeFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"\u002F>\u003CfeColorMatrix in=\"SourceAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"\u002F>\u003CfeOffset dy=\"12\"\u002F>\u003CfeGaussianBlur stdDeviation=\"16\"\u002F>\u003CfeColorMatrix values=\"0 0 0 0 0.0588235 0 0 0 0 0.0901961 0 0 0 0 0.164706 0 0 0 0.64 0\"\u002F>\u003CfeBlend in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_127_2\"\u002F>\u003CfeBlend in=\"SourceGraphic\" in2=\"effect1_dropShadow_127_2\" result=\"shape\"\u002F>\u003C\u002Ffilter>\u003C\u002Fdefs>\u003C\u002Fsvg>\n    \u003Ca href=\"https:\u002F\u002Fwww.getvectorflow.com\u002F\">\n        \u003Ch1>VectorFlow\u003C\u002Fh1>\n    \u003C\u002Fa>\n    \u003Ch3>开源、高吞吐、容错的向量嵌入流水线\u003C\u002Fh3>\n    \u003Cspan>简单的 API 端点，可快速可靠地摄取大量原始数据、进行处理，并存储或返回向量。\u003C\u002Fspan>\n\u003C\u002Fdiv>\n\u003Ch4 align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FMEXuahMs2F\">加入我们的 Discord\u003C\u002Fa>  |\n  \u003Ca href=\"https:\u002F\u002Fwww.getvectorflow.com\u002F\">官网\u003C\u002Fa>  |  \n  \u003Ca href=\"mailto:dan@getvectorflow.com\">联系我们\u003C\u002Fa> |\n  \u003Ca href=\"https:\u002F\u002Fvectorflow.dev-docs.dev\u002Fdocs\u002F\">文档\u003C\u002Fa> |\n  \u003Ca href=\"https:\u002F\u002Fapp.getvectorflow.com\u002F\">免费托管版本\u003C\u002Fa> \n\u003C\u002Fh4>\n\n\u003Cdiv align=\"center\">\n\n[![这里填写图片描述](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdgarnitz_vectorflow_readme_9004ca01261f.jpg)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=aQOlOT14DaA)\n\n\u003C\u002Fdiv>\n\n# 简介\n\nVectorFlow 是一个开源、高吞吐、容错的向量嵌入流水线。只需发送一个简单的 API 请求，即可上传原始数据，这些数据将被分块、嵌入，并存储到任何向量数据库中，或者直接返回给您。\n\n当前版本为 MVP。我们建议在生产环境中使用 Kubernetes 运行它（详情见下文）。对于文本文件，支持 TXT、PDF、HTML 和 DOCX 格式。\n\n# 在本地运行\n只需三条命令，您就可以在本地运行 VectorFlow：\n```\ngit clone https:\u002F\u002Fgithub.com\u002Fdgarnitz\u002Fvectorflow.git\ncd vectorflow\n.\u002Fsetup.sh\n```\n\n#### 使用客户端嵌入文档\n要在本地开始嵌入文档，请在您的 Python 应用程序的虚拟环境中安装 [VectorFlow 客户端 Python 库](https:\u002F\u002Fpypi.org\u002Fproject\u002Fvectorflow-client\u002F)。\n```\npip install vectorflow-client\n```\n然后运行以下代码：\n```\nfrom vectorflow-client.client.vectorflow import Vectorflow\n\nvectorflow = Vectorflow()\nvectorflow.embeddings_api_key = os.getenv(\"OPEN_AI_KEY\")\npaths = ['your_file_path1', 'your_file_path2', ...]\nresponse = vectorflow.upload(paths)\n```\n\n您无需克隆 VectorFlow 仓库即可通过 pip 使用客户端功能。更多说明请参阅 `client` 目录中的 `README.md` 文件。\n\n有关如何使用 `testing_clients` 脚本的详细信息，请参阅附录。\n\n## Docker-Compose\n\n运行 VectorFlow 的最佳方式是使用 `docker compose`。如果您在 Mac 上运行，请按照此处的说明授予 Docker 读取您“文档”文件夹的权限：[链接](https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F58482352\u002Foperation-not-permitted-from-docker-container-logged-as-root)。如果此操作失败，请从 `docker-compose.yml` 中移除 `volume` 部分。\n\n### 1) 设置环境变量\n\n首先在根目录下创建一个名为 `env_scripts` 的文件夹来存放所有环境变量，然后在该文件夹中创建 `env_vars.env` 文件，添加以下环境变量。只有当您在本地运行 Qdrant、Milvus 或 Weaviate 时，才需要设置 `LOCAL_VECTOR_DB` 变量。\n\n```\nINTERNAL_API_KEY=your-choice\nPOSTGRES_USERNAME=postgres\nPOSTGRES_PASSWORD=your-choice\nPOSTGRES_DB=vectorflow\nPOSTGRES_HOST=postgres\nRABBITMQ_USERNAME=guest\nRABBITMQ_PASSWORD=guest\nRABBITMQ_HOST=rabbitmq\nLOCAL_VECTOR_DB=qdrant | weaviate\nAPI_STORAGE_DIRECTORY=\u002Ftmp\nMINIO_ACCESS_KEY=minio99\nMINIO_SECRET_KEY=minio123\nMINIO_ENDPOINT=minio:9000\nMINIO_BUCKET=vectorflow\n```\n\n您可以为 `INTERNAL_API_KEY`、`POSTGRES_PASSWORD` 和 `POSTGRES_DB` 选择任意值，但必须设置它们。\n\n### 2) 运行 Docker-Compose\n\n确保您已将 Rabbit MQ、Postgres 和 Min.io 拉取到本地 Docker 仓库中。我们还建议在本地运行一个向量数据库，因此请务必拉取您正在使用的数据库镜像。我们的 `docker-compose` 文件默认会启动 Qdrant 并创建两个索引\u002F集合。如果您计划运行 Milvus 或 Weaviate，则需要自行配置。\n\n```\ndocker pull rabbitmq\ndocker pull postgres\ndocker pull qdrant\u002Fqdrant | docker pull semitechnologies\u002Fweaviate\ndocker pull minio\u002Fminio\n```\n\n然后运行：\n\n```\ndocker-compose build --no-cache\ndocker-compose up -d\n```\n\n请注意，`init` 容器正在运行一个脚本，用于设置数据库模式、向量数据库和 Minio 对象存储。脚本完成后，这些容器会停止。对于 Qdrant，请确保拉取 1.9.1 版本，因为这是 Qdrant 客户端 Python 包所兼容的版本。\n\n\n## 使用 VectorFlow\n\n使用 VectorFlow 的最佳方式是通过 Python 客户端。\n\n要用于开发目的，您可以向您的 API URL 发送 HTTP 请求——例如，从开发机器上访问 `localhost:8000`，或从另一个 Docker 容器内访问 `vectorflow_api:8000`。\n\n### 请求与响应负载\n\n所有请求都需要包含一个 `Authorization` 键的 HTTP 头，其值应与您之前定义的 `INTERNAL_API_KEY` 环境变量相同（见上文）。如果您连接的是基于云的向量数据库实例，则必须通过 HTTP 头 `X-VectorDB-Key` 传递您的向量数据库 API 密钥；如果使用 OpenAI，则需通过 `X-EmbeddingAPI-Key` 传递嵌入 API 密钥。HuggingFace Sentence Transformer 嵌入不需要 API 密钥，但您仍需按照上述步骤运行包含所需模型的容器。\n\n目前，VectorFlow 支持 Pinecone、Qdrant 和 Weaviate 向量数据库。\n\n#### 对单个文件进行嵌入\n要提交单个文件进行嵌入，请向 `\u002Fembed` 端点发送 `POST` 请求，附带文件、`'Content-Type: multipart\u002Fform-data'` 头以及以下负载：\n\n```\n{\n    'SourceData=txt文件路径'\n    'LinesPerBatch=4096'\n    'EmbeddingsMetadata={\n        \"embeddings_type\": \"OPEN_AI\",\n        \"chunk_size\": 512,\n        \"chunk_overlap\": 128,\n        \"chunk_strategy\": \"EXACT | PARAGRAPH | SENTENCE | CUSTOM\",\n        \"model\": \"text-embedding-3-small | text-embedding-3-large | text-embedding-ada-002\"\n    }'\n    'VectorDBMetadata={\n        \"vector_db_type\": \"PINECONE | QDRANT | WEAVIATE\",\n        \"index_name\": \"索引名称\",\n        \"environment\": \"环境名称\"\n    }'\n    'DocumentID=您可选的内部跟踪ID'\n}\n```\n\n这将创建一个 `job`，您将收到如下负载作为响应：\n\n```\n{\n    'message': f\"成功将 {batch_count} 个批次添加到队列中\",\n    'JobID': job_id\n}\n```\n\n目前，该端点仅支持一次上传单个文件，且由于超时问题，文件大小上限为 25 MB。请注意，此功能可能会被弃用。\n\n#### 一次性嵌入多个文件\n要提交多个文件进行嵌入，请向 `\u002Fjobs` 端点发送 `POST` 请求。负载与单个文件嵌入相同，不同之处在于多文件的附加方式：\n\n```\n{\n    'files=[\n        ('file',  ('test_pdf.pdf', open(file1_path, 'rb'), 'application\u002Foctet-stream')),\n        ('file', ('test_medium_text.txt', open(file2_path, 'rb'), 'application\u002Foctet-stream'))\n    ]'\n}\n```\n*注意：* 必须以流式传输的方式将文件发送到端点，而不能以常规 POST 请求的形式发送，否则会失败。 \n\n该端点会为每个上传的文件创建一个 `job`。您将收到如下 JSON 负载：\n\n```\n{   \n    'successful_uploads': 成功上传的文件列表,\n    'failed_uploads': 上传失败的文件列表,\n    'empty_files_count': 空文件数量,\n    'duplicate_files_count': 重复文件数量\n}\n```\n\n其中 `successfully_uploaded_files` 是一个包含 `(文件名, job id)` 元组的列表，而 `failed_uploads` 是上传失败的文件名列表，以便您可以重试这些文件。\n\n#### 获取单个作业状态\n要检查某个 `job` 的状态，请向 `\u002Fjobs\u002F\u003Cint:job_id>\u002Fstatus` 端点发送 `GET` 请求。响应格式如下：\n\n```\n{\n    'JobStatus': 作业状态\n}\n```\n\n#### 获取多个作业状态\n要检查多个 `job` 的状态，请向 `\u002Fjobs\u002Fstatus` 端点发送 `POST` 请求。请求体格式如下：\n\n```\n{\n    'JobIDs': 作业 ID 列表\n}\n```\n\n响应格式为：\n\n```\n{\n    'Jobs': [{'JobID': 作业 ID, 'JobStatus': 作业状态}, ...]}\n```\n\n`testing_clients\u002Fget_jobs_by_ids.py` 中有一个示例。\n\n### 向量数据库标准元数据模式\nVectorFlow 强制执行用于向量存储上传数据的标准模式：\n```\nid: 字符串\nsource_data: 字符串\nsource_document: 字符串\nembeddings: 浮点数数组\n```\n\nID 可用于去重和幂等性操作。请注意，在 Weaviate 中，ID 称为 `vectorflow_id`。\n\n我们计划在不久的将来弃用此模式，以便在未来支持动态检测和\u002F或可配置的模式。\n\n### 分块模式与自定义分块\nVectorFlow 内置的分块器按 token 计数，而非按字符计数。VectorFlow 中的 `chunk` 是一个包含以下键的字典：\n```\ntext: str\nvector: list[float]\n```\n\n您可以通过在构建 worker 的 Docker 镜像之前，将一个名为 `custom_chunker.py` 的文件及其方法 `chunker(source_data: list[str])` 添加到 `src\u002Fworker` 目录来运行自定义分块器。该分块器必须返回符合上述标准的 `chunk` 字典列表。\n\n只要 `_JSON 可序列化_`，您就可以向 `chunk` 字典中添加任何所需的键，即不允许使用自定义类或函数、日期时间类型或循环引用代码。然后，您可以使用此自定义分块将元数据上传到向量数据库，并采用您所需的任何模式。\n\n### 原始嵌入 Webhook\n如果您希望仅使用 VectorFlow 进行分块和生成嵌入，请在 `\u002Fembed` 请求的正文中传递 `WebhookURL` 参数，并在头中添加 `X-Webhook-Key`。VectorFlow 假设需要 Webhook 密钥才能写回任何端点。嵌入结果会连同源分块一起以上述 `chunk` 字典的形式返回。数据以 JSON 格式发送，形式如下：\n```\n{\n    'Embeddings': list[dict],\n    'DocumentID': str,\n    'JobID': int\n}\n```\n\n### 分块验证 Webhook\n如果您希望验证哪些分块可以进行嵌入，请在 `\u002Fembed` 请求的正文中传递 `ChunkValidationURL` 参数。这将发送包含以下 JSON 负载的请求：`{\"chunks\": chunked_data}`，其中 `chunked_data` 是一个 `chunk` 字典列表。预期返回的 JSON 将包含 `valid_chunks` 键，其中列出可用于嵌入的有效分块。该端点默认会在 30 秒后超时，但可以在应用程序代码中进行配置。\n\n### S3 端点\nVectorFlow 已与 AWS S3 集成。您可以在 HTTP 请求体中传递预签名的 S3 URL，而不是直接上传文件。使用表单字段 `PreSignedURL` 并访问 `\u002Fs3` 端点。该端点具有与 `\u002Fembed` 端点相同的配置和限制。\n\n### 遥测\nVectorFlow 使用 PostHog 匿名收集使用数据。它不会收集任何个人身份信息。如果您想禁用此功能，只需在您的 `env_vars.env` 文件中添加以下环境变量：\n```\nTELEMETRY_DISABLED=True\n```\n\n## Kubernetes\n您可以在本地使用 minikube 在 Kubernetes 中运行 VectorFlow，方法是执行 `.\u002Fkube\u002Fscripts\u002Fdeploy-local-k8s.sh` 脚本，该脚本会应用 `kube\u002F` 目录下的所有 YAML 文件。如果您尚未安装 Docker、minikube 和 kubectl，此脚本将无法正常工作。\n\n该脚本首先会在本地构建镜像，然后将其传输到 minikube 中。如果您想查看 minikube 中有哪些可用的镜像，请运行以下命令：\n\n```\neval $(minikube docker-env)\ndocker images\n```\n\n为了从您的开发机器访问集群中的资源，您需要运行 `minikube tunnel` 命令。设置脚本会将您本地 Docker 上下文中的镜像加载到 minikube 的镜像仓库中。\n\n您可以以 `kube\u002F` 目录下的 YAML 文件为基础进行生产环境部署，但需要根据您特定集群的需求进行一些自定义配置。**如需帮助，请联系我们。**\n\n# 贡献\n我们非常欢迎社区的反馈。如果您有任何改进该项目的想法，欢迎您提交问题或加入我们的 Discord 社区。请务必标记 `dgarnitz` 和 `danmeier2`。\n\n我们的路线图在下方章节中列出，我们非常希望得到大家的帮助来完善它。我们当前的公开问题是一个很好的起点，您可以在此处查看：[https:\u002F\u002Fgithub.com\u002Fdgarnitz\u002Fvectorflow\u002Fissues](https:\u002F\u002Fgithub.com\u002Fdgarnitz\u002Fvectorflow\u002Fissues)。如果您想处理未列出的任务，建议您先提交一个问题，说明您的计划方案，然后再提交 PR。\n\n请在所有 PR 中标记 `dgarnitz`，并*更新 README*以反映您的更改。\n\n### 测试\n在提交 PR 时，请添加单元测试以覆盖您新增的功能。同时，请重新运行现有测试，确保没有引入回归性错误。请从 `src` 目录运行测试。要运行单个测试用例，可以使用以下命令：\n\n```\npython -m unittest module.tests.test_file.TestClass.test_method\n```\n\n要运行文件中的所有测试，可以使用：\n\n```\npython -m unittest module.tests.test_file\n```\n\n对于端到端测试，建议使用 docker-compose 进行构建和运行，但请停止正在修改的容器，并在您的开发机器上本地运行。这样可以避免不断重建镜像和重启容器。请确保在开发机器的终端中将环境变量更改为正确的值（例如，将 `rabbitmq` 或 `postgres` 替换为 `localhost`），以便 Docker 容器能够与您的开发机器通信。当本地运行正常后，您可以使用 docker-compose 再次进行最终测试。\n\n### 验证\n请在提交 PR 之前，验证所有更改是否都能通过 docker-compose 正常工作。\n\n我们还建议您提供验证证据，例如截图，以展示您的代码在端到端流程中的实际效果。\n\n# 路线图\n- [ ] 支持从 Salesforce、Google Drive 等来源批量导入多文件或多目录数据\n- [ ] 重试机制\n- [ ] Langchain 集成\n- [ ] 支持回调功能，用于将对象元数据写入独立存储\n- [ ] 动态可配置的向量数据库模式\n- [ ] 去重功能\n- [ ] 向量版本控制\n- [ ] “智能”分块器\n- [ ] “智能”元数据提取器\n\n# 附录\n## 使用测试脚本嵌入数据\n使用 VectorFlow 的一种简单方式是借助位于 `testing_clients\u002F` 目录下的测试客户端。该目录包含多个脚本，具有不同的配置，可用于快速上传数据。我们建议从 `testing_clients\u002Fstandard_upload_client.py` 开始——运行此脚本会将单个文档提交给 VectorFlow，使用 OpenAI ADA 模型进行嵌入，并上传至本地的 Qdrant 实例。您可以根据自己的配置调整相关参数。如果需要一次上传多个文件，可以使用 `testing_clients\u002Fstreaming_upload_client.py`。\n\n请注意，`TESTING_ENV` 变量相当于 `VectorDBMetadata` 中的 `environment` 字段，它对应于 Pinecone 中的环境、Weaviate 中的类、Qdrant 中的集合等。`testing_clients` 目录中提供了示例脚本，您可以按照这些脚本运行 VectorFlow。将您的嵌入模型和数据库密钥添加到生成的 `env_scripts\u002Fenv_vars.sh` 脚本中，并将 `testing_clients\u002Fstandard_upload_client.py` 中的 `filepath` 变量设置为您想要嵌入的文件路径。然后运行：\n\n```\nsource env_scrips\u002Fenv_vars.sh\npython testing-clients\u002Fstandard_upload_client.py\n```\n\n如果需要一次上传多个文件，可以使用 `testing_clients\u002Fstreaming_upload_client.py`。\n\n有关如何手动设置和配置系统的更详细说明，请参阅上方内容。请注意，`setup` 脚本不会在您的机器上创建开发环境，它仅负责设置并运行 docker-compose。我们不建议在 Windows 系统上使用 VectorFlow。\n\n### 请求\n要执行搜索，需向 `\u002Fimages\u002Fsearch` 端口发送 `POST` 请求，请求中需附带图像文件，并设置 `Content-Type: multipart\u002Fform-data` 头部，以及以下请求体：\n\n```\n{\n    'ReturnVectors': boolean,\n    'TopK': integer，小于1000，\n    'VectorDBMetadata={\n        \"vector_db_type\": \"PINECONE | QDRANT | WEAVIATE\",\n        \"index_name\": \"index_name\",\n        \"environment\": \"env_name\"\n    }'\n}\n```\n\n所有请求都需要带有 `Authorization` 键的 HTTP 头部，该键与您之前定义的 `INTERNAL_API_KEY` 环境变量相同（见上文）。如果您连接的是基于云的向量数据库实例，则必须通过 HTTP 头部 `X-VectorDB-Key` 提供您的向量数据库 API 密钥。\n\n### 响应\n图像相似度搜索将返回一个响应对象，其中包含前 K 个匹配项，如果请求了原始向量，则还会一并返回。响应格式如下：\n\n```\n{\n    \"similar_images\": 匹配对象列表\n    \"vectors\": 浮点数列表的列表\n}\n```\n\n其中，匹配对象的定义如下：\n\n```\n{\n    \"id\": 字符串，\n    \"score\": 浮点数，\n    \"metadata\": {\"source_document\" : 字符串}\n}\n```\n\n### 使用 Docker 命令构建和运行单个镜像\n如果您希望使用 `docker build` 和 `docker run` 来构建和运行单个镜像，而不是使用 docker-compose，请按照以下步骤操作：\n\n1. `cd src\u002F`\n2. `docker build --file api\u002FDockerfile -t vectorflow_api:latest .` 构建镜像——别忘了最后的句点。\n3. `docker run --network=vectorflow --name=vectorflow_api -d --env-file=..\u002Fenv_scripts\u002Fenv_vars.env -p 8000:8000 vectorflow_api:latest` 运行 API。运行 worker 时无需指定端口。","# VectorFlow 快速上手指南\n\nVectorFlow 是一个开源、高吞吐量且具备容错能力的向量嵌入（Embedding）流水线工具。它通过简单的 API 接口，支持将大量原始数据（如 TXT, PDF, HTML, DOCX）进行分块、向量化，并存储到主流向量数据库或直接返回结果。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux, macOS 或 Windows (需安装 Docker Desktop)\n*   **核心依赖**:\n    *   Git\n    *   Docker & Docker Compose\n    *   Python 3.x (用于运行客户端脚本)\n*   **前置服务镜像**: 本地需拉取以下 Docker 镜像（若网络受限，建议配置国内 Docker 镜像加速器）：\n    *   `rabbitmq`\n    *   `postgres`\n    *   `qdrant\u002Fqdrant` (默认向量库，版本建议 1.9.1)\n    *   `minio\u002Fminio`\n    *   (可选) `semitechnologies\u002Fweaviate` 或其他支持的向量库\n\n## 安装步骤\n\n### 方式一：使用 Docker Compose 部署（推荐）\n\n这是运行 VectorFlow 最完整的方式，包含所有依赖服务。\n\n**1. 克隆项目**\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fdgarnitz\u002Fvectorflow.git\ncd vectorflow\n```\n\n**2. 配置环境变量**\n在项目根目录创建 `env_scripts` 文件夹，并在其中创建 `env_vars.env` 文件，填入以下配置（请根据实际需求修改密码和 Key）：\n\n```bash\nmkdir -p env_scripts\ncat > env_scripts\u002Fenv_vars.env \u003C\u003CEOF\nINTERNAL_API_KEY=your-choice\nPOSTGRES_USERNAME=postgres\nPOSTGRES_PASSWORD=your-choice\nPOSTGRES_DB=vectorflow\nPOSTGRES_HOST=postgres\nRABBITMQ_USERNAME=guest\nRABBITMQ_PASSWORD=guest\nRABBITMQ_HOST=rabbitmq\nLOCAL_VECTOR_DB=qdrant\nAPI_STORAGE_DIRECTORY=\u002Ftmp\nMINIO_ACCESS_KEY=minio99\nMINIO_SECRET_KEY=minio123\nMINIO_ENDPOINT=minio:9000\nMINIO_BUCKET=vectorflow\nEOF\n```\n> **注意**: 若仅本地测试，`LOCAL_VECTOR_DB` 设为 `qdrant` 即可；若连接云端向量库，后续需在请求头中配置对应 Key。\n\n**3. 拉取镜像并启动服务**\n```bash\n# 拉取必要镜像\ndocker pull rabbitmq\ndocker pull postgres\ndocker pull qdrant\u002Fqdrant:1.9.1\ndocker pull minio\u002Fminio\n\n# 构建并启动容器\ndocker-compose build --no-cache\ndocker-compose up -d\n```\n启动后，初始化容器会自动配置数据库 Schema 和对象存储，完成后会自动停止。\n\n### 方式二：安装 Python 客户端\n\n若只需在代码中调用已部署的 VectorFlow 服务，无需克隆源码，直接安装客户端库即可：\n\n```bash\npip install vectorflow-client\n```\n\n## 基本使用\n\n### 1. 使用 Python 客户端上传文件\n\n这是最简单的使用方式。确保已设置 OpenAI API Key（或其他 Embedding 模型 Key）。\n\n```python\nimport os\nfrom vectorflow_client.client.vectorflow import Vectorflow\n\n# 初始化客户端\nvectorflow = Vectorflow()\n\n# 设置 Embedding API Key (例如 OpenAI)\nvectorflow.embeddings_api_key = os.getenv(\"OPEN_AI_KEY\")\n\n# 指定本地文件路径\npaths = ['path_to_your_file1.pdf', 'path_to_your_file2.txt']\n\n# 上传并触发嵌入任务\nresponse = vectorflow.upload(paths)\n\nprint(response)\n```\n\n### 2. 直接使用 HTTP API (进阶)\n\n如果您想直接通过 `curl` 或自定义代码调用，需向 `\u002Fembed` 端点发送 `POST` 请求。\n\n**请求示例：**\n*   **URL**: `http:\u002F\u002Flocalhost:8000\u002Fembed`\n*   **Header**: \n    *   `Authorization`: 填写 `env_vars.env` 中的 `INTERNAL_API_KEY`\n    *   `X-EmbeddingAPI-Key`: 填写您的 Embedding 服务商 Key (如 OpenAI)\n    *   `Content-Type`: `multipart\u002Fform-data`\n\n**Payload 参数说明：**\n*   `SourceData`: 文件路径\n*   `LinesPerBatch`: 每批处理行数 (例如 4096)\n*   `EmbeddingsMetadata`: JSON 字符串，定义模型和分块策略\n    ```json\n    {\n        \"embeddings_type\": \"OPEN_AI\",\n        \"chunk_size\": 512,\n        \"chunk_overlap\": 128,\n        \"chunk_strategy\": \"EXACT\",\n        \"model\": \"text-embedding-3-small\"\n    }\n    ```\n*   `VectorDBMetadata`: JSON 字符串，定义目标向量库\n    ```json\n    {\n        \"vector_db_type\": \"QDRANT\",\n        \"index_name\": \"my_index\",\n        \"environment\": \"local\"\n    }\n    ```\n\n**响应示例：**\n成功提交后，系统将返回任务 ID：\n```json\n{\n    \"message\": \"Successfully added 1 batches to the queue\",\n    \"JobID\": 12345\n}\n```\n\n### 3. 查询任务状态\n\n可通过 API 检查处理进度：\n*   **单个任务**: `GET \u002Fjobs\u002F\u003Cjob_id>\u002Fstatus`\n*   **多个任务**: `POST \u002Fjobs\u002Fstatus` (Body: `{\"JobIDs\": [12345, ...]}`)\n\n---\n**提示**: 当前版本为 MVP，生产环境建议在 Kubernetes 上运行以获得更好的容错性和扩展性。支持的文件格式包括 TXT, PDF, HTML 和 DOCX。","某电商平台的客服团队急需构建智能问答系统，以便从数万份 PDF 产品手册和 DOCX 售后文档中快速检索答案。\n\n### 没有 vectorflow 时\n- **开发周期漫长**：工程师需手动编写脚本处理文件分块、调用嵌入模型并管理重试逻辑，仅数据预处理流程就耗时数周。\n- **高并发下易崩溃**：面对批量导入的海量文档，自定义脚本缺乏容错机制，一旦中途网络波动或内存溢出，整个任务必须从头重来。\n- **格式支持受限**：原有方案难以统一处理 TXT、PDF、HTML 等多种异构文件格式，往往需要为每种格式单独开发解析器。\n- **资源调度困难**：无法弹性应对突发的数据入库需求，要么闲置算力，要么在高峰期因排队导致响应延迟极高。\n\n### 使用 vectorflow 后\n- **极速接入部署**：通过简单的 API 请求或 Python 客户端上传文件路径，vectorflow 自动完成分块、向量化并存入指定向量数据库，将上线时间缩短至几天。\n- **稳定可靠运行**：依托其内置的高吞吐与容错架构，即使处理 TB 级数据或遭遇节点故障，任务也能自动恢复并确保数据不丢失。\n- **多格式无缝兼容**：原生支持 TXT、PDF、HTML 和 DOCX 等多种主流文档格式，无需额外开发即可统一清洗和转换所有非结构化数据。\n- **弹性伸缩能力**：基于 Kubernetes 的部署方案让系统能根据数据量自动扩缩容，轻松应对大促期间的海量知识库更新需求。\n\nvectorflow 将复杂的向量数据处理链路简化为一次 API 调用，让团队能专注于业务逻辑而非底层基础设施的维护。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdgarnitz_vectorflow_9004ca01.jpg","dgarnitz",null,"https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fdgarnitz_ba1329bd.png","https:\u002F\u002Fgithub.com\u002Fdgarnitz",[78,82,86],{"name":79,"color":80,"percentage":81},"Python","#3572A5",91.8,{"name":83,"color":84,"percentage":85},"Shell","#89e051",6.3,{"name":87,"color":88,"percentage":89},"Dockerfile","#384d54",1.9,700,51,"2026-04-04T12:32:53","Apache-2.0","Linux, macOS","未说明",{"notes":97,"python":95,"dependencies":98},"该工具主要基于 Docker Compose 部署，核心依赖包括 RabbitMQ、Postgres、MinIO 和向量数据库（默认 Qdrant 1.9.1）。在 macOS 上运行需特别授予 Docker 读取文档文件夹的权限。支持的文件格式包括 TXT、PDF、HTML 和 DOCX。生产环境建议在 Kubernetes 上运行。若使用本地向量数据库，需配置相应的环境变量。",[99,100,101,102,103,104,105],"Docker","Docker Compose","RabbitMQ","PostgreSQL","MinIO","Qdrant (默认) \u002F Weaviate \u002F Milvus","vectorflow-client (Python 库)",[35,13,16,14,15],[108,109,110,111,112,113],"ai","data-engineering","embeddings","machine-learning","nlp","vectors","2026-03-27T02:49:30.150509","2026-04-07T07:11:30.761667",[117,122,127,132,137,142],{"id":118,"question_zh":119,"answer_zh":120,"source_url":121},21294,"如何在 Docker 部署中使用自定义 Hugging Face 嵌入模型（如 BAAI\u002Fbge-large-en-v1.5）？","首先拉取基础镜像并构建项目：\n1. `docker pull rabbitmq`, `docker pull postgres`, `docker pull qdrant\u002Fqdrant`\n2. `docker-compose build --no-cache` 和 `docker-compose up -d`\n3. 构建 HF 模型镜像：`cd src && docker build --file hugging_face\u002FDockerfile -t vectorflow_hf:latest .`\n4. 运行容器：`docker run --network=vectorflow --name=vectorflow_hf -d --env-file=..\u002Fenv_scripts\u002Fenv_vars.env vectorflow_hf:latest --model_name \"BAAI\u002Fbge-large-en-v1.5\"`\n\n如果遇到问题，建议不要使用 Python 的 `dotenv` 包加载环境变量。可以将 `env_vars.env` 复制为 `env_vars.sh`，添加 `export` 语句，然后在终端中 `source` 该文件后再运行客户端测试脚本。若仍无效，请拉取最新代码，删除旧的环境脚本，并在项目根目录运行 `.\u002Fsetup.sh` 重新构建和运行所有服务。","https:\u002F\u002Fgithub.com\u002Fdgarnitz\u002Fvectorflow\u002Fissues\u002F61",{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},21295,"VectorFlow 是否支持 Chroma 向量数据库？","目前团队决定暂不支持 Chroma 集成。经过讨论，认为目前没有其他用户提出此需求，因此不是当前的优先事项。此外，项目倾向于使用客户端 - 服务器模型（通过 `HttpClient`），而不计划支持本地存储方案。","https:\u002F\u002Fgithub.com\u002Fdgarnitz\u002Fvectorflow\u002Fissues\u002F39",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},21296,"如何在使用 VectorFlow 时避免重复处理相同的文档（碰撞检测）？","系统已实现通用的验证端点来解决此问题。工作流程如下：\n1. VectorFlow 会向用户指定的验证端点发送包含文档 ID 和文本块列表的请求。\n2. 用户在自有系统中执行逻辑（如全文匹配或语义距离检查），判断哪些块需要嵌入。\n3. 用户返回一个经过筛选的、实际需要嵌入的文本块列表。\n4. 为防止延迟过高，验证调用配置了可超时的机制。\n这种设计保持了系统的模块化，允许用户在外部实现自定义的碰撞检测逻辑（如 `full_text_score` 或 `distance` 阈值），而无需修改 VectorFlow 核心代码。","https:\u002F\u002Fgithub.com\u002Fdgarnitz\u002Fvectorflow\u002Fissues\u002F60",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},21297,"VectorFlow 是否支持 MongoDB Atlas Vector Search？","是的，MongoDB Atlas Vector Search 的集成已经完成。用户可以通过相关的 Pull Request 获取该功能。具体的使用方法和使用文档将在 README 中进行更新和说明。如果有具体产品帮助需求，也可以联系 MongoDB 团队成员。","https:\u002F\u002Fgithub.com\u002Fdgarnitz\u002Fvectorflow\u002Fissues\u002F34",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},21298,"VectorFlow 是否支持 Weaviate 向量数据库？","是的，已添加 Weaviate 集成（目前作为概念验证 POC）。当前实现仅支持单一的类架构（schema），包含 `source_data` 和 `vectorflow_id` 字段，其中 `vectorflow_id` 用于去重。如果未来用户请求更复杂的架构支持，团队可能会进一步扩展此功能。","https:\u002F\u002Fgithub.com\u002Fdgarnitz\u002Fvectorflow\u002Fissues\u002F6",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},21299,"如何提高向 Milvus 数据库上传数据的速度？","可以通过将普通的上传方式替换为批量更新（Batch Write）来显著提高上传速度。具体实现涉及修改 `src\u002Fworker\u002Fvdb_upload_worker.py` 中的上传逻辑（原代码第 192-216 行），采用 Milvus 提供的批量更新接口替代逐条上传。","https:\u002F\u002Fgithub.com\u002Fdgarnitz\u002Fvectorflow\u002Fissues\u002F52",[]]