docs: add a minimal opentenbase_ai + pgvector integration example (embedding + similarity search)
维护者通常 1 天内回复
还没有人认领这个 Issue。
- #327 来自 @muzimu217 —— 已关闭,未合并
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- postgresql, sql
调研方向
Read contrib/opentenbase_ai/opentenbase_ai--1.0.sql for the documented function signatures, then check the bundled contrib/pgvector and contrib/pgsql-http setup. Draft one self-contained document under contrib/opentenbase_ai/ covering model registration, embedding casts, inserts, similarity search, and the stated limits and FAQ. Done when the example is runnable as written and clearly labels verified steps versus expected results.
由索引模型根据 Issue 内容生成。
描述
Motivation
Issue #304 tracks a README for contrib/opentenbase_ai. While walking through the extension's SQL interface (opentenbase_ai--1.0.sql), I noticed there is no runnable end-to-end example showing how opentenbase_ai combines with the bundled contrib/pgvector (the vector extension) — which is the most natural way to evaluate this extension in practice: register an embedding model, store embeddings in a table, and run a similarity search.
Proposal
Add a single self-contained example document under contrib/opentenbase_ai/, covering:
- Prerequisites — both dependencies are bundled in this repo:
http(contrib/pgsql-http, declared byopentenbase_ai.controlviarequires = 'http') andvector(contrib/pgvector). - Register an OpenAI-compatible embedding model with
ai.add_embedding_model(model_name, uri, default_args, token). - Call
ai.embedding(input)— note it returns text (the JSON array extracted from the HTTP response), so the example shows the explicit::vectorcast into a pgvector column. - Create a
vectorcolumn table, insert, and run a nearest-neighbour query with the pgvector distance operators. - Notes and limits: which steps are verified vs. expected results (clearly labeled), behavior when the endpoint is unreachable (the invoke path surfaces errors rather than silently returning NULL), and a short FAQ.
The example will follow the exact function signatures in opentenbase_ai--1.0.sql and will not touch any existing file or build script — one new documentation file only.
I'll follow up with a PR referencing this issue.
- 主要语言
- C
- 星标
- 946
- 派生
- 693
- 平均合并
- 5 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenTenBase/OpenTenBase 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
OpenTenBase/OpenTenBase#557 ·
维护者通常 1 天内回复
-
otb-health: 健康检查永远以退出码 0 结束,检查失败无法被发现可能已有人在做 @shibuchou 于 20 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
OpenTenBase/OpenTenBase#503 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 72/100
OpenTenBase/OpenTenBase#319 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 45/100
OpenTenBase/OpenTenBase#541 ·
维护者通常 1 天内回复
-
7未关闭
难度 5/5 一周以上 新手友好度 15/100
OpenTenBase/OpenTenBase#524 ·
维护者通常 1 天内回复
查看 OpenTenBase/OpenTenBase 的全部 Issue
相似的 Issue
-
`core.output` prints string properties without escaping their quotes可能已有人在做 @JensOgorek 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
zauberzeug/lizard#399 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 78/100
SanderMertens/flecs#2463 ·
维护者通常 1 天内回复
-
linux-luminarium (permissions/the-suid-bit): getroot prints "SUCCESS!" even when SUID bit is not set未关闭
难度 2/5 1-3 小时 新手友好度 81/100
pwncollege/challenges#314 ·
-
难度 2/5 1-3 小时 新手友好度 75/100