'API operation not supported for token authentication' error when creating/using vector stores

Aksu, MA (Murat) 0 Reputation points
2024-06-13T09:01:39.6633333+00:00

When I run the following codes:

vector_store = client.beta.vector_stores.create(

name="Product_Documentation",

file_ids=[message_file.id]

)

or

client.beta.vector_stores.list()

I receive the following error:

BadRequestError: Error code: 400 - {'error': {'code': 'API operation not supported for token authentication', 'message': 'ApiId openai-api-2024-05-01-preview OperationId list_vector_stores not supported for CheckAccess.'}}

However, I can create vector stores by attaching the files into Thread as an attachment, I can create a vector store:

thread = client.beta.threads.create(

messages=[

{

"role": "user",

"content": "How many company shares were outstanding last quarter?",

# Attach the new file to the message.

"attachments": [

{ "file_id": message_file.id, "tools": [{"type": "file_search"}] }

],

}

]

)

But cannot retrieve that vector store again using the vector_stores:

client.beta.vector_stores.retrieve('vector_store_id')

BadRequestError: Error code: 400 - {'error': {'code': 'API operation not supported for token authentication', 'message': 'ApiId openai-api-2024-05-01-preview OperationId list_vector_stores not supported for CheckAccess.'}}

What could be the problem?

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,618 questions
{count} votes