Skip to content

tool_runtime.rag_tool.insert not working #307

@maxeramax

Description

@maxeramax

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions