Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

tool_runtime.rag_tool.insert not working

Đang mở
#307 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
198
Fork
102
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ogx-ai/ogx-client-python

Tất cả issue của ogx-ai/ogx-client-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.