Azure-Samples / Azure-Samples/openai

Azure AI Studio View Code doesn't compile

Open
#96 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
1.3k
Forks
455
Avg merge
16h 17m
Merged PRs (30d)
1

Description

I don't know if this is the correct place to report this, but I was trying to test Chat Completions since GPT35 doesn't support completions. When you click view code, you are given this code

Response responseWithoutStream = await client.GetChatCompletionsAsync(
"GPT35",
new ChatCompletionsOptions()
{
Messages =
{
new ChatMessage(ChatRole.System, @"You are an AI assistant that helps people find information."),

},
Temperature = (float)0.7,
MaxTokens = 800,
NucleusSamplingFactor = (float)0.95,
FrequencyPenalty = 0,
PresencePenalty = 0,
});

ChatCompletions response = responseWithoutStream.Value;

ChatMessage does not exist. I searched and found ChatRequestMessage, is that what this is supposed to be?

Thanks

> Please provide us with the following information:
> ---------------------------------------------------------------

### This issue is for a: (mark with an `x`)
```
- [ x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

### Minimal steps to reproduce
1. Go to Azure AI Studio - Chat Playground.
2. Click View Code - The code sample given doesn't compile (the NuGet package is added and everything else works - meaning all other references are known except ChatMessage class.

I just noticed I have beta12 installed, and the code expects beta5. My guess is the code should be updated if this class ChatMessage did not make it to beta12.

### Any log messages given by the failure
![image](https://github.com/Azure-Samples/openai/assets/26331133/806faa84-eba0-4573-ab80-18a529ae3f65)

>

### Expected/desired behavior
View Code should compile with the latest betas if you want people to be up to date on your current code base.

### OS and Version?
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

I have Windows 11. You should probably update your bug report to list MS latest Windows offering.

### Versions
As mentioned above, I have Azure.AI.OpenAI beta12 installed. This is probably different in beta5

![image](https://github.com/Azure-Samples/openai/assets/26331133/7314993d-15f9-4356-9b31-f64c5ecfe465)

### Mention any other details that might be useful
I will try beta5 and see if that compiles. It is just a little frustrating to someone trying to learn this when the sample code doesn't compile.
> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.