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.
本地司机
本地向量桶使用 pgvector 作为存储引擎。托管向量桶使用 Amazon S3 Vectors,因此不同环境下的查询行为和性能可能会有所不同。
🌐 Local vector buckets use pgvector as their storage engine. Hosted vector buckets use Amazon S3 Vectors, so query behavior and performance can differ between environments.
托管的 queryVectors 请求可以接受最多 10,000 个 topK 值,并以每页最多 100 个的形式返回结果。使用 nextToken 检索每个额外的页面。本地请求可以接受最多 100 个 topK 值,并且会拒绝 nextToken。
🌐 Hosted queryVectors requests accept topK values up to 10,000 and return results in pages of at most 100. Use nextToken to retrieve each additional page. Local requests accept topK values up to 100 and reject nextToken.
查看 Vector Bucket 限制 了解完整对比。
🌐 See Vector Bucket limits for the full comparison.
设置本地向量桶 #
🌐 Setting up local vector buckets
确保你在 config.toml 文件中启用了这个功能:
🌐 Make sure you have the feature enabled in your config.toml file:
# Store vector embeddings in S3 for large and durable datasets[storage.vector]enabled = true声明式配置 #
🌐 Declarative configuration
你可以在 config.toml 文件中使用以下语法来定义你的向量桶:
🌐 You can define your vector buckets in the config.toml file using the following syntax:
[storage.vector.buckets.documents-openai][storage.vector.buckets.images]然后使用 supabase seed buckets 在你的本地环境或关联项目中创建存储桶。
🌐 Then use supabase seed buckets to create the buckets in your local environment or linked project.