Description
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
I have created vector store with
new_store = await self.client.vector_stores.create( name=name, expires_after={"anchor": "last_active_at", "days": expires_days}, chunking_strategy={ "type": "static", "static": { "max_chunk_size_tokens": max_chunk_size_tokens, "chunk_overlap_tokens": chunk_overlap_tokens } } )
when i am uploading files with upload_and_poll, and retrieving file attribute, i am getting (with default chunk size).
VectorStoreFile(id='assistant-MX3yjwZooLxymkJMWE217V', created_at=1748104237, last_error=None, object='vector_store.file', status='completed', usage_bytes=65486, vector_store_id='vs_ajzhAjwMLVQoqYGfAFC4T5LX', attributes=None, chunking_strategy=StaticFileChunkingStrategyObject(static=StaticFileChunkingStrategy(chunk_overlap_tokens=400, max_chunk_size_tokens=800), type='static'))
and when i am passing chunking_strategy to upload_and_poll. it is getting applied correctly.
To Reproduce
- create vector store with chunking_strategy
- upload file using upload_and_poll. do not pass chunking_strategy
- retrieve file propertied using "client.vector_stores.files.retrieve"
- you will observe static=StaticFileChunkingStrategy(chunk_overlap_tokens=400, max_chunk_size_tokens=800)
Code snippets
OS
windows
Python version
3.11.11
Library version
openai v1.82.0