Relative Content

Tag Archive for openai-apiazure-openai

AsyncAzureOpenAI Client from openai python SDK support for Custom Fast API Endpoint

I am working on a project where the team has developed custom LLM asynchronous API endpoints using FastAPI and AzureOpenAI and the application uses a B2B token for authenticating user requests. But now we want to test those endpoints using AsyncAzureOpenAI client from openai sdk. Is it possible to pass the custom endpoint at azure_endpoint or base_url argument? If yes, then I need help with an example. Any help will be appreciated.

Using Files / Batch API through Azure Open AI Endpoint

This link provides the steps to access openai through Azure OpenAI with APIM. https://github.com/microsoft/AzureOpenAI-with-APIM/blob/main/example_code/example.py Following is the code as given in the above link to use chat_completions API by OpenAI . apim_url = “apim_url” deployment_name = “deployment_name” api_version = “2024-02-15-preview” subscription_key = “subscription_key” url = f”{apim_url}/deployments/{deployment_name}/chat/completions?api-version={api_version}” headers = { “Content-Type”: “application/json”, “Ocp-Apim-Subscription-Key”: subscription_key } json_payload […]

“resource not found” error when trying to use Azure OpenAI Assistant API

In the example below, the first part, which uses the completion API succeeds. The second part, which attempts to use the assistant API, with the same endpoint, API key and deployment name, throws a “resource not found” exception. What am I doing wrong here? How do I use the Assistant API with OpenAI Azure?

how to us OpenAI assistant API in Azure OpenAI?

In the example below, the first part, which uses the completion API succeeds. The second part, which attempts to use the assistant API, throws a “resource not found” exception. How do I use the Assistant API with OpenAI Azure?

Query @azure/openai with images?

On chat.openai.com I can upload an image and ask chatgpt a question about it, with the existing openai and @azure/openai api however there doesn’t seem to be a way to do this? The ChatCompletion object in both cases only take text prompts.