Skip to content

Commit

Permalink
CodeGen from PR 24534 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge d7cbf3cf10fded38544bb91d21cffef522dbec1f into 5b269e18c68d5364e0278d1e06d4d05adbe52d54
  • Loading branch information
SDKAuto committed Jun 23, 2023
1 parent 686cd0a commit 7f3a782
Show file tree
Hide file tree
Showing 27 changed files with 1,143 additions and 10 deletions.
43 changes: 41 additions & 2 deletions sdk/openai/Azure.AI.OpenAI/api/Azure.AI.OpenAI.netstandard2.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public ChatCompletionsOptions() { }
public ChatCompletionsOptions(System.Collections.Generic.IEnumerable<Azure.AI.OpenAI.ChatMessage> messages) { }
public int? ChoiceCount { get { throw null; } set { } }
public float? FrequencyPenalty { get { throw null; } set { } }
public Azure.AI.OpenAI.FunctionCallPreset? FunctionCall { get { throw null; } set { } }
public System.Collections.Generic.IList<Azure.AI.OpenAI.FunctionDefinition> Functions { get { throw null; } }
public int? MaxTokens { get { throw null; } set { } }
public System.Collections.Generic.IList<Azure.AI.OpenAI.ChatMessage> Messages { get { throw null; } }
public float? NucleusSamplingFactor { get { throw null; } set { } }
Expand All @@ -44,6 +46,8 @@ public partial class ChatMessage
public ChatMessage(Azure.AI.OpenAI.ChatRole role) { }
public ChatMessage(Azure.AI.OpenAI.ChatRole role, string content) { }
public string Content { get { throw null; } set { } }
public Azure.AI.OpenAI.FunctionCall FunctionCall { get { throw null; } set { } }
public string Name { get { throw null; } set { } }
public Azure.AI.OpenAI.ChatRole Role { get { throw null; } set { } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
Expand All @@ -53,6 +57,7 @@ public ChatMessage(Azure.AI.OpenAI.ChatRole role, string content) { }
private readonly int _dummyPrimitive;
public ChatRole(string value) { throw null; }
public static Azure.AI.OpenAI.ChatRole Assistant { get { throw null; } }
public static Azure.AI.OpenAI.ChatRole Function { get { throw null; } }
public static Azure.AI.OpenAI.ChatRole System { get { throw null; } }
public static Azure.AI.OpenAI.ChatRole User { get { throw null; } }
public bool Equals(Azure.AI.OpenAI.ChatRole other) { throw null; }
Expand Down Expand Up @@ -88,6 +93,7 @@ internal Completions() { }
private readonly int _dummyPrimitive;
public CompletionsFinishReason(string value) { throw null; }
public static Azure.AI.OpenAI.CompletionsFinishReason ContentFiltered { get { throw null; } }
public static Azure.AI.OpenAI.CompletionsFinishReason FunctionCall { get { throw null; } }
public static Azure.AI.OpenAI.CompletionsFinishReason Stopped { get { throw null; } }
public static Azure.AI.OpenAI.CompletionsFinishReason TokenLimitReached { get { throw null; } }
public bool Equals(Azure.AI.OpenAI.CompletionsFinishReason other) { throw null; }
Expand Down Expand Up @@ -158,6 +164,37 @@ internal EmbeddingsUsage() { }
public int PromptTokens { get { throw null; } }
public int TotalTokens { get { throw null; } }
}
public partial class FunctionCall
{
public FunctionCall(string name, string arguments) { }
public string Arguments { get { throw null; } set { } }
public string Name { get { throw null; } set { } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct FunctionCallPreset : System.IEquatable<Azure.AI.OpenAI.FunctionCallPreset>
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public FunctionCallPreset(string value) { throw null; }
public static Azure.AI.OpenAI.FunctionCallPreset Auto { get { throw null; } }
public static Azure.AI.OpenAI.FunctionCallPreset None { get { throw null; } }
public bool Equals(Azure.AI.OpenAI.FunctionCallPreset other) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override bool Equals(object obj) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override int GetHashCode() { throw null; }
public static bool operator ==(Azure.AI.OpenAI.FunctionCallPreset left, Azure.AI.OpenAI.FunctionCallPreset right) { throw null; }
public static implicit operator Azure.AI.OpenAI.FunctionCallPreset (string value) { throw null; }
public static bool operator !=(Azure.AI.OpenAI.FunctionCallPreset left, Azure.AI.OpenAI.FunctionCallPreset right) { throw null; }
public override string ToString() { throw null; }
}
public partial class FunctionDefinition
{
public FunctionDefinition(string name) { }
public string Description { get { throw null; } set { } }
public string Name { get { throw null; } }
public System.BinaryData Parameters { get { throw null; } set { } }
}
public partial class OpenAIClient
{
protected OpenAIClient() { }
Expand All @@ -183,11 +220,13 @@ public OpenAIClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCredent
}
public partial class OpenAIClientOptions : Azure.Core.ClientOptions
{
public OpenAIClientOptions(Azure.AI.OpenAI.OpenAIClientOptions.ServiceVersion version = Azure.AI.OpenAI.OpenAIClientOptions.ServiceVersion.V2023_03_15_Preview) { }
public OpenAIClientOptions(Azure.AI.OpenAI.OpenAIClientOptions.ServiceVersion version = Azure.AI.OpenAI.OpenAIClientOptions.ServiceVersion.V2023_07_01_Preview) { }
public enum ServiceVersion
{
V2022_12_01 = 1,
V2023_03_15_Preview = 2,
V2023_05_15 = 2,
V2023_06_01_Preview = 3,
V2023_07_01_Preview = 4,
}
}
public partial class StreamingChatChoice
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions sdk/openai/Azure.AI.OpenAI/src/Generated/ChatMessage.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions sdk/openai/Azure.AI.OpenAI/src/Generated/ChatRole.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions sdk/openai/Azure.AI.OpenAI/src/Generated/Docs/OpenAIClient.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,20 @@ var chatCompletionsOptions = new ChatCompletionsOptions(new ChatMessage[]
new ChatMessage(ChatRole.System)
{
Content = "<Content>",
Name = "<Name>",
FunctionCall = new FunctionCall("<name>", "<arguments>"),
}
})
{
Functions =
{
new FunctionDefinition("<name>")
{
Description = "<Description>",
Parameters = BinaryData.FromString("<your binary data content>"),
}
},
FunctionCall = FunctionCallPreset.Auto,
MaxTokens = 1234,
Temperature = 3.14f,
NucleusSamplingFactor = 3.14f,
Expand Down Expand Up @@ -144,9 +155,20 @@ var chatCompletionsOptions = new ChatCompletionsOptions(new ChatMessage[]
new ChatMessage(ChatRole.System)
{
Content = "<Content>",
Name = "<Name>",
FunctionCall = new FunctionCall("<name>", "<arguments>"),
}
})
{
Functions =
{
new FunctionDefinition("<name>")
{
Description = "<Description>",
Parameters = BinaryData.FromString("<your binary data content>"),
}
},
FunctionCall = FunctionCallPreset.Auto,
MaxTokens = 1234,
Temperature = 3.14f,
NucleusSamplingFactor = 3.14f,
Expand All @@ -167,5 +189,13 @@ var result = client.GetChatCompletions("<deploymentId>", chatCompletionsOptions)
</member>
<member name="GetChatCompletions(string,RequestContent,RequestContext)">
</member>
<member name="StartGenerateImageAsync(WaitUntil,ImageGenerationOptions,CancellationToken)">
</member>
<member name="StartGenerateImage(WaitUntil,ImageGenerationOptions,CancellationToken)">
</member>
<member name="StartGenerateImageAsync(WaitUntil,RequestContent,RequestContext)">
</member>
<member name="StartGenerateImage(WaitUntil,RequestContent,RequestContext)">
</member>
</members>
</doc>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7f3a782

Please sign in to comment.