Vector Bucket 本地开发
Develop and test vector bucket integrations in your local environment with the Supabase CLI.
此功能处于测试阶段
预计会有快速变化、功能有限,并可能出现破坏性更新。随着我们改进体验并扩大访问,欢迎分享反馈。
🌐 Expect rapid changes, limited features, and possible breaking updates. Share feedback as we refine the experience and expand access.
你现在可以使用 Supabase CLI 在本地环境中开发和测试 Vector Bucket 集成了。
🌐 You can now develop and test Vector Bucket integrations in your local environment using the Supabase CLI.
这让你可以在不需要部署到实时环境的情况下,构建和迭代你的向量搜索应用。确保你已安装最新版本的 Supabase CLI 才能使用这个功能。
🌐 This allows you to build and iterate on your vector search applications without needing to deploy to a live environment. Make sure you have the latest version of the Supabase CLI installed to access this feature.
本地司机
在本地开发中,向量桶在底层使用 pg_vector 作为存储引擎。托管版本则使用 S3Vectors 作为向量的存储引擎,它针对大规模向量存储和相似性搜索进行了优化。这意味着虽然你可以在本地开发和测试向量桶的集成,但在性能和行为上可能会与云环境有所不同。
🌐 In local development, vector buckets uses pg_vector as the underlying storage engine under the hood. The Hosted version uses S3Vectors as the Storage engine for vectors, which is optimized for large-scale vector storage and similarity search. This means that while you can develop and test your vector bucket integrations locally, there may be differences in performance and behavior compared to the cloud environment.
API 在本地和托管环境之间保持一致,所以你可以基于本地的 pg_vector 实现来构建应用逻辑,并且可以预期它在生产环境中使用 S3Vectors 引擎时也能正常工作。
🌐 The API remain consistent between local and hosted environments, so you can build your application logic against the local pg_vector implementation and expect it to work with the S3Vectors engine in production.
设置本地向量桶 #
🌐 Setting up local vector buckets
确保你在 config.toml 文件中启用了这个功能:
🌐 Make sure you have the feature enabled in your config.toml file:
1# Store vector embeddings in S3 for large and durable datasets2[storage.vector]3enabled = true声明式配置 #
🌐 Declarative configuration
你可以在 config.toml 文件中使用以下语法来定义你的向量桶:
🌐 You can define your vector buckets in the config.toml file using the following syntax:
1[storage.vector.buckets.documents-openai]2[storage.vector.buckets.images]然后使用 supabase seed buckets 在你的本地环境或关联项目中创建存储桶。
🌐 Then use supabase seed buckets to create the buckets in your local environment or linked project.