tool_runtime.rag_tool.insert not working
还没有人认领这个 Issue。
评估
调研方向
Reproduce the call through llama_stack_client.resources.tool_runtime.rag_tool.RagToolResource.insert and inspect the request failure reported at _base_client.py line 1054. Compare the generated request fields with the server's required vector_store_id field; done means the documented insert call no longer returns the 400 missing-field error.
由索引模型根据 Issue 内容生成。
描述
Hello,
I'm experiencing some incompatibility issues with the interaction between client and server, both installed from PyPy, version 0.3.2
An example of such is the following call:
client.tool_runtime.rag_tool.insert( documents=documents, vector_db_id=vs.id, chunk_size_in_tokens=512, )
which raises the error:
lib/python3.12/site-packages/llama_stack_client/_base_client.py", line 1054, in request raise self._make_status_error_from_response(err.response) from None llama_stack_client.BadRequestError: Error code: 400 - {'error': {'detail': {'errors': [{'loc': ['body', 'vector_store_id'], 'msg': 'Field required', 'type': 'missing'}]}}}
By looking at the API, the arguments passed to the client should be correct:
`insert(*, chunk_size_in_tokens: 'int', documents: 'Iterable[Document]', vector_db_id: 'str', extra_headers: 'Headers | None' = None, extra_query: 'Query | None' = None, extra_body: 'Body | None' = None, timeout: 'float | httpx.Timeout | None | NotGiven' = NOT_GIVEN) -> 'None' method of llama_stack_client.resources.tool_runtime.rag_tool.RagToolResource instance
Index documents so they can be used by the RAG system.
Args:
chunk_size_in_tokens: (Optional) Size in tokens for document chunking during indexing
documents: List of documents to index in the RAG system
vector_db_id: ID of the vector database to store the document embeddings
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
extra_body: Add additional JSON properties to the request
timeout: Override the client-level default timeout for this request, in seconds
~`
System:
Linux ai 6.14.0-36-generic #36~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 15 15:45:17 UTC 2 x86_64 x86_64 x86_64 GNU/Linux Python 3.12.3
- 主要语言
- Python
- 星标
- 197
- 派生
- 102
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ogx-ai/ogx-client-python 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 15/100
ogx-ai/ogx-client-python#348 · 1 条评论 ·
-
Mad API未关闭
难度 5/5 一周以上 新手友好度 10/100
ogx-ai/ogx-client-python#347 ·
-
难度 3/5 1-2 天 新手友好度 48/100
ogx-ai/ogx-client-python#287 ·
-
难度 4/5 3-5 天 新手友好度 35/100
ogx-ai/ogx-client-python#279 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
ogx-ai/ogx-client-python#272 ·
查看 ogx-ai/ogx-client-python 的全部 Issue
相似的 Issue
-
follow-up needs-triage S3: minor
难度 2/5 1-3 小时 新手友好度 72/100
manaflow-ai/cmux#36856 · 1 条评论 ·
维护者通常 1 天内回复
-
documentation good first issue help wanted
难度 1/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
-
Shell framework build fails at "copy the shader libraries": the iOS shader libraries are now one file b-<chain>.img可能已有人在做 @xiaofeng-han 今天认领。 未关闭build ios
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复