Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

tool_runtime.rag_tool.insert not working

Aperta
#307 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
198
Fork
102
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ogx-ai/ogx-client-python

Tutte le issue di ogx-ai/ogx-client-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.