Upload a document to Assistant Vector Store in Azure Open AI

Siddharth Rai 5 Reputation points
2024-06-13T22:07:00.8233333+00:00

Hello,

I am new to Azure Open AI and looking for a way to upload a document to Assistant Vector Store using REST API (HTTPs). I have a limitation and cannot use AzureOpenAI API as I would need to install DLLs in my system. The code should be something like below but I get "Resource not found" in response. Something is off. Please help. Thanks.

 

Dim apiKey As String = "myapikeyhere"

Dim endpoint As String = "https://myresource.openai.azure.com"

    

Using client As New HttpClient()

    client.DefaultRequestHeaders.Authorization = New AuthenticationHeaderValue("Bearer", apiKey)

    Dim url As String = $"{endpoint}/openai/vectorstores?api-version=2024-05-01-preview"

    Dim response As HttpResponseMessage = client.GetAsync(url).Result

 

    Console.WriteLine(response)

End Using

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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.