-
-
Notifications
You must be signed in to change notification settings - Fork 537
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
Question: get started with AzureOpenAI #181
Comments
I'm using the following code for the AzureOpenAI var options = new OpenAiOptions()
{
BaseDomain = " https://spark.openai.azure.com",
ApiKey = apiKey,
DeploymentId = "gpt35",
ResourceName = "spark",
ProviderType = ProviderType.Azure,
};
var openAiService = new OpenAIService(options);
var completionResult = await openAiService.ChatCompletion.CreateCompletion(new ChatCompletionCreateRequest
{
Messages = new List<ChatMessage>
{
ChatMessage.FromSystem("You are a helpful assistant."),
ChatMessage.FromUser("What's new in .NET 6")
},
Model = Models.ChatGpt3_5Turbo // "gpt-35-turbo" also not working
});
While I could call the AzureOpenAI API by following the rest api docs, after some research, I found that the API is not the same, wondering that maybe there's something wrong with my way calling AzureOpenAI. For details, the raw Azure OpenAI request likes below:
The request fired with before code like follows:
And besides, the model deployment I created as follows: |
I recently got access to Azure OpenAI. I couldn't find a chance to try services before releasing the SDK. I will check this issue as soon as possible. |
I am tracking this also as I started using this library today with Azure OpenAI service and have yet to get it working. |
It appears that Azure has decided to implement a different approach from that of the OpenAI team. Additionally, they have chosen different model names. 😮💨 https://learn.microsoft.com/en-gb/azure/cognitive-services/openai/how-to/chatgpt |
I did some quick test code with Azure OpenAI and this worked. CompletionMessage completionMessage = new( message );
Not saying this is the code you should use but giving guidance on what normally works with httpclient. |
@kayhantolga May I ask which Also, I think the |
Hello, I just got access to Azure OpenAI GPT-4 at work today and got my existing app (OpenAI API 3.5-turbo) working by changing the Program.cs to
and changing the model from Models.ChatGpt3_5Turbo to "gpt-4" (the 8K version) to like this.
Initially I got a 404 Not Found until I spied on the Azure OpenAI Studio Chat playground and saw it was using a different API version. When plugging in the "2023-03-15-preview" as version and also using the new model string I now get chat completions! |
If the client is configured to use Azure OpenAI service then Image generation doesn't work because it is not available on Azure, is there a way to have the client configured for both platforms? to use Azure for chat completions and OpenAI Dalle for images? |
Released a new version, Please have a look at the wiki page. |
Great thanks for the project, I'm trying to use it with Azure OpenAI service, but do not know how to find the DeploymentId, could you please help, thanks
The text was updated successfully, but these errors were encountered: