Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vector_stores.list() returns empty list even if vector stores exist #2209

Open
1 task done
alexander-grun opened this issue Mar 17, 2025 · 4 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@alexander-grun
Copy link

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

ls = client.vector_stores.list()
print(ls)

gives

SyncCursorPage[VectorStore](data=[], has_more=False, object='list', first_id=None, last_id=None)

but querying by ID gives results back.

vs = client.vector_stores.retrieve(
vector_store_id="vs_123"
)
print(vs)

To Reproduce

ls = client.vector_stores.list()
print(ls)

Code snippets

OS

Windows

Python version

3.12

Library version

1.66.3

@alexander-grun alexander-grun added the bug Something isn't working label Mar 17, 2025
@Fiyaas
Copy link

Fiyaas commented Mar 17, 2025

key = "my_api_key"
openai.api_key=key
id_chat = "my_completion_id"
try:
result = openai.Completion.retrieve(id_chat)
print(result['choices'][0]['text'])
except Exception as a:
print(a)

@Fiyaas
Copy link

Fiyaas commented Mar 17, 2025

ls = client.vector_stores.list()
print(ls)

@Fiyaas
Copy link

Fiyaas commented Mar 17, 2025

၎င်းသည် Python ဒစ်ဂျစ်တိုက်တွင် ပြဿနာရှိပြီး အခြေခံ OpenAI API မဟုတ်ကြောင်း အတည်ပြုပါ။

  • ၎င်းသည် Python စာကြည့်တိုက်အတွက် ပြဿနာတစ်ခုဖြစ်သည်။

bug ကိုဖော်ပြပါ။

ls = client.vector_stores.list() print(ls)

ပေးသည်။

SyncCursorPage[VectorStore](data=[]၊ has_more=False၊ object='list'၊ first_id=None၊ last_id=None)

ID ဖြင့်မေးမြန်းခြင်းသည် ရလဒ်ကို ပြန်လည်ရရှိစေသည်။

vs = client.vector_stores.retrieve( vector_store_id="vs_123" ) print(vs)

မျိုးပွားရန်

ls = client.vector_stores.list() print(ls)

ကုဒ်အတိုအထွာများ

OS

ပြတင်းပေါက်

Python ဗားရှင်း

၃.၁၂

စာကြည့်တိုက်ဗားရှင်း

၁.၆၆.၃

@alexander-grun
Copy link
Author

Update: it works now, but after few hours, so there is a significant delay in List action on vector store API, which makes it a bit confusing if you create a new vector store and query the list after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants