Skip to content

AttributeError When Using 'vector_stores' Method in OpenAI Python Client #1336

@yash980

Description

@yash980

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

After upgrading to the latest version of the OpenAI Python client (openai==1.21.2), I am encountering an AttributeError when attempting to use the new 'vector_stores' method as described in the documentation. The error suggests that the 'OpenAI' object does not have an attribute 'vector_stores'.

image

image

To Reproduce

Install the latest version of the OpenAI Python client (openai==1.21.2).
Execute the following Python code:

from openai import OpenAI
client = OpenAI()

vector_store = client.vector_stores.create(
  name="Support FAQ"
)
print(vector_store)

Code snippets

from openai import OpenAI
client = OpenAI()

vector_store = client.vector_stores.create(
  name="Support FAQ"
)
print(vector_store)

OS

Ubuntu 20.04.6 LTS

Python version

Python 3.8.10

Library version

openai 1.21.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions