Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

The return value of the vector_stores.file_batches.poll method contains the ID of the VectorStore.

Abierto
#2,724 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@nightcityblade ya está trabajando en esto.

Desde el 14/5/2026.

  • #2734 de @yashwantbezawada — cerrado sin fusionar
  • #3238 de @nightcityblade — cerrado sin fusionar

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python
Área
api, backend

Línea de trabajo

Comienza con el método vector_stores.file_batches.poll y reproduce el comportamiento con el código de ejemplo de este issue. Compara los campos id y object del objeto VectorStoreFileBatch devuelto con batch_obj; la tarea estará terminada cuando el resultado del sondeo represente de forma coherente el lote de archivos y devuelva su ID esperada, con una prueba de regresión que cubra este comportamiento.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug
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

The expected result is that the file_batches object ID should be stored and returned.

To Reproduce

Run the sample code.
call poll method.

Code snippets
import openai

file_obj = None
vector_store_obj = None

try:
    client = openai.OpenAI(
        api_key=os.environ['OPENAI_API_KEY']
    )
    file_obj = client.files.create(file=('test_data.json', b'{"aa": "AA"}\n'), purpose='user_data')
    vector_store_obj = client.vector_stores.create(name='test_vector_store')

    batch_obj = client.vector_stores.file_batches.create(
        vector_store_id=vector_store_obj.id,
        file_ids=[file_obj.id]
    )
    print(f'type:[{type(batch_obj)}]')
    print(batch_obj.model_dump_json(indent=2))

    response = client.vector_stores.file_batches.poll(batch_id=batch_obj.id, vector_store_id=vector_store_obj.id)
    print(f'type:[{type(response)}]')
    print(response.model_dump_json(indent=2))

    print("# The return value contains the vector_store id.")
    print("# Shouldn't the return value of the file_batches.poll method be the batch_obj ID?")
    print(f'# OpenAI version:[{openai.__version__}]')

finally:
    if file_obj:
        client.files.delete(file_id=file_obj.id)
    if vector_store_obj:
        client.vector_stores.delete(vector_store_id=vector_store_obj.id)

# Below are the execution results.
'''
type:[<class 'openai.types.vector_stores.vector_store_file_batch.VectorStoreFileBatch'>]
{
  "id": "vsfb_ibj_6905db4e33dc81f4a789ad8df2b5c748",
  "created_at": 1761991502,
  "file_counts": {
    "cancelled": 0,
    "completed": 0,
    "failed": 0,
    "in_progress": 1,
    "total": 1
  },
  "object": "vector_store.file_batch",
  "status": "in_progress",
  "vector_store_id": "vs_6905db4d53708191a75c5ef9979258fd"
}
type:[<class 'openai.types.vector_stores.vector_store_file_batch.VectorStoreFileBatch'>]
{
  "id": "vs_6905db4d53708191a75c5ef9979258fd",
  "created_at": 1761991501,
  "file_counts": {
    "cancelled": 0,
    "completed": 1,
    "failed": 0,
    "in_progress": 0,
    "total": 1
  },
  "object": "vector_store",
  "status": "completed",
  "vector_store_id": null,
  "name": "test_vector_store",
  "description": null,
  "usage_bytes": 0,
  "expires_after": null,
  "expires_at": null,
  "last_active_at": 1761991501,
  "metadata": {}
}
# The return value contains the vector_store id.
# Shouldn't the return value of the file_batches.poll method be the batch_obj ID?
# OpenAI version:[1.109.1]
'''
OS

Ubuntu24.04

Python version

Python3.12.3

Library version

openai v1.109.1

Lenguaje dominante
Python
Estrellas
31.8k
Forks
7.3k
Merge medio
1 d 3 h
PR fusionados (30 d)
131

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de openai/openai-python

Todos los issues de openai/openai-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.