Skip to content
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

Update CodeGen to version 3.0.0-beta.20241015.1 #308

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Azure.AI.OpenAI
{
/// <summary> The structured representation of an error from an Azure OpenAI chat completion request. </summary>
/// <summary> The AzureOpenAIChatError. </summary>
internal partial class AzureOpenAIChatError
{
/// <summary>
Expand Down Expand Up @@ -47,11 +47,11 @@ internal AzureOpenAIChatError()
}

/// <summary> Initializes a new instance of <see cref="AzureOpenAIChatError"/>. </summary>
/// <param name="code"> The distinct, machine-generated identifier for the error. </param>
/// <param name="message"> A human-readable message associated with the error. </param>
/// <param name="param"> If applicable, the request input parameter associated with the error. </param>
/// <param name="type"> If applicable, the input line number associated with the error. </param>
/// <param name="innerError"> If applicable, an upstream error that originated this error. </param>
/// <param name="code"></param>
/// <param name="message"></param>
/// <param name="param"></param>
/// <param name="type"></param>
/// <param name="innerError"></param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal AzureOpenAIChatError(string code, string message, string param, string type, InternalAzureOpenAIChatErrorInnerError innerError, IDictionary<string, BinaryData> serializedAdditionalRawData)
{
Expand All @@ -63,15 +63,15 @@ internal AzureOpenAIChatError(string code, string message, string param, string
SerializedAdditionalRawData = serializedAdditionalRawData;
}

/// <summary> The distinct, machine-generated identifier for the error. </summary>
/// <summary> Gets the code. </summary>
public string Code { get; }
/// <summary> A human-readable message associated with the error. </summary>
/// <summary> Gets the message. </summary>
public string Message { get; }
/// <summary> If applicable, the request input parameter associated with the error. </summary>
/// <summary> Gets the param. </summary>
public string Param { get; }
/// <summary> If applicable, the input line number associated with the error. </summary>
/// <summary> Gets the type. </summary>
public string Type { get; }
/// <summary> If applicable, an upstream error that originated this error. </summary>
/// <summary> Gets the inner error. </summary>
public InternalAzureOpenAIChatErrorInnerError InnerError { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Azure.AI.OpenAI
{
/// <summary> A structured representation of an error an Azure OpenAI request. </summary>
/// <summary> The AzureOpenAIChatErrorResponse. </summary>
internal partial class AzureOpenAIChatErrorResponse
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Azure.AI.OpenAI
{
/// <summary> The structured representation of an error from an Azure OpenAI image generation request. </summary>
/// <summary> The AzureOpenAIDalleError. </summary>
internal partial class AzureOpenAIDalleError
{
/// <summary>
Expand Down Expand Up @@ -47,11 +47,11 @@ internal AzureOpenAIDalleError()
}

/// <summary> Initializes a new instance of <see cref="AzureOpenAIDalleError"/>. </summary>
/// <param name="code"> The distinct, machine-generated identifier for the error. </param>
/// <param name="message"> A human-readable message associated with the error. </param>
/// <param name="param"> If applicable, the request input parameter associated with the error. </param>
/// <param name="type"> If applicable, the input line number associated with the error. </param>
/// <param name="innerError"> If applicable, an upstream error that originated this error. </param>
/// <param name="code"></param>
/// <param name="message"></param>
/// <param name="param"></param>
/// <param name="type"></param>
/// <param name="innerError"></param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal AzureOpenAIDalleError(string code, string message, string param, string type, InternalAzureOpenAIDalleErrorInnerError innerError, IDictionary<string, BinaryData> serializedAdditionalRawData)
{
Expand All @@ -63,15 +63,15 @@ internal AzureOpenAIDalleError(string code, string message, string param, string
SerializedAdditionalRawData = serializedAdditionalRawData;
}

/// <summary> The distinct, machine-generated identifier for the error. </summary>
/// <summary> Gets the code. </summary>
public string Code { get; }
/// <summary> A human-readable message associated with the error. </summary>
/// <summary> Gets the message. </summary>
public string Message { get; }
/// <summary> If applicable, the request input parameter associated with the error. </summary>
/// <summary> Gets the param. </summary>
public string Param { get; }
/// <summary> If applicable, the input line number associated with the error. </summary>
/// <summary> Gets the type. </summary>
public string Type { get; }
/// <summary> If applicable, an upstream error that originated this error. </summary>
/// <summary> Gets the inner error. </summary>
public InternalAzureOpenAIDalleErrorInnerError InnerError { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Azure.AI.OpenAI
{
/// <summary> A structured representation of an error an Azure OpenAI request. </summary>
/// <summary> The AzureOpenAIDalleErrorResponse. </summary>
internal partial class AzureOpenAIDalleErrorResponse
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Azure.AI.OpenAI.Chat
{
/// <summary> Represents a data source configuration that will use an Azure Search resource. </summary>
/// <summary> The AzureSearchChatDataSource. </summary>
public partial class AzureSearchChatDataSource : ChatDataSource
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public partial class ChatCitation
/// </summary>
internal IDictionary<string, BinaryData> SerializedAdditionalRawData { get; set; }
/// <summary> Initializes a new instance of <see cref="ChatCitation"/>. </summary>
/// <param name="content"> The content of the citation. </param>
/// <param name="content"></param>
/// <exception cref="ArgumentNullException"> <paramref name="content"/> is null. </exception>
internal ChatCitation(string content)
{
Expand All @@ -52,12 +52,12 @@ internal ChatCitation(string content)
}

/// <summary> Initializes a new instance of <see cref="ChatCitation"/>. </summary>
/// <param name="content"> The content of the citation. </param>
/// <param name="title"> The title for the citation. </param>
/// <param name="uri"> The URL of the citation. </param>
/// <param name="filePath"> The file path for the citation. </param>
/// <param name="chunkId"> The chunk ID for the citation. </param>
/// <param name="rerankScore"> The rerank score for the retrieval. </param>
/// <param name="content"></param>
/// <param name="title"></param>
/// <param name="uri"></param>
/// <param name="filePath"></param>
/// <param name="chunkId"></param>
/// <param name="rerankScore"></param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal ChatCitation(string content, string title, Uri uri, string filePath, string chunkId, double? rerankScore, IDictionary<string, BinaryData> serializedAdditionalRawData)
{
Expand All @@ -75,13 +75,13 @@ internal ChatCitation()
{
}

/// <summary> The content of the citation. </summary>
/// <summary> Gets the content. </summary>
public string Content { get; }
/// <summary> The title for the citation. </summary>
/// <summary> Gets the title. </summary>
public string Title { get; }
/// <summary> The chunk ID for the citation. </summary>
/// <summary> Gets the chunk id. </summary>
public string ChunkId { get; }
/// <summary> The rerank score for the retrieval. </summary>
/// <summary> Gets the rerank score. </summary>
public double? RerankScore { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
namespace Azure.AI.OpenAI.Chat
{
/// <summary>
/// A representation of configuration data for a single Azure OpenAI chat data source.
/// This will be used by a chat completions request that should use Azure OpenAI chat extensions to augment the
/// response behavior.
/// The use of this configuration is compatible only with Azure OpenAI.
/// The AzureChatDataSource.
/// Please note <see cref="ChatDataSource"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="CosmosChatDataSource"/>, <see cref="AzureSearchChatDataSource"/>, <see cref="ElasticsearchChatDataSource"/>, <see cref="MongoDBChatDataSource"/> and <see cref="PineconeChatDataSource"/>.
/// </summary>
Expand Down Expand Up @@ -54,15 +51,15 @@ protected ChatDataSource()
}

/// <summary> Initializes a new instance of <see cref="ChatDataSource"/>. </summary>
/// <param name="type"> The differentiating type identifier for the data source. </param>
/// <param name="type"></param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal ChatDataSource(string type, IDictionary<string, BinaryData> serializedAdditionalRawData)
{
Type = type;
SerializedAdditionalRawData = serializedAdditionalRawData;
}

/// <summary> The differentiating type identifier for the data source. </summary>
/// <summary> Gets or sets the type. </summary>
internal string Type { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public ChatDocumentFilterReason(string value)
public static bool operator ==(ChatDocumentFilterReason left, ChatDocumentFilterReason right) => left.Equals(right);
/// <summary> Determines if two <see cref="ChatDocumentFilterReason"/> values are not the same. </summary>
public static bool operator !=(ChatDocumentFilterReason left, ChatDocumentFilterReason right) => !left.Equals(right);
/// <summary> Converts a string to a <see cref="ChatDocumentFilterReason"/>. </summary>
/// <summary> Converts a <see cref="string"/> to a <see cref="ChatDocumentFilterReason"/>. </summary>
public static implicit operator ChatDocumentFilterReason(string value) => new ChatDocumentFilterReason(value);

/// <inheritdoc />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@

namespace Azure.AI.OpenAI.Chat
{
/// <summary>
/// An additional property, added to chat completion response messages, produced by the Azure OpenAI service when using
/// extension behavior. This includes intent and citation information from the On Your Data feature.
/// </summary>
/// <summary> The AzureChatMessageContext. </summary>
public partial class ChatMessageContext
{
/// <summary>
Expand Down Expand Up @@ -51,9 +48,9 @@ internal ChatMessageContext()
}

/// <summary> Initializes a new instance of <see cref="ChatMessageContext"/>. </summary>
/// <param name="intent"> The detected intent from the chat history, which is used to carry conversation context between interactions. </param>
/// <param name="citations"> The citations produced by the data retrieval. </param>
/// <param name="retrievedDocuments"> Summary information about documents retrieved by the data retrieval operation. </param>
/// <param name="intent"></param>
/// <param name="citations"></param>
/// <param name="retrievedDocuments"></param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal ChatMessageContext(string intent, IReadOnlyList<ChatCitation> citations, ChatRetrievedDocument retrievedDocuments, IDictionary<string, BinaryData> serializedAdditionalRawData)
{
Expand All @@ -63,9 +60,9 @@ internal ChatMessageContext(string intent, IReadOnlyList<ChatCitation> citations
SerializedAdditionalRawData = serializedAdditionalRawData;
}

/// <summary> The detected intent from the chat history, which is used to carry conversation context between interactions. </summary>
/// <summary> Gets the intent. </summary>
public string Intent { get; }
/// <summary> The citations produced by the data retrieval. </summary>
/// <summary> Gets the citations. </summary>
public IReadOnlyList<ChatCitation> Citations { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public partial class ChatRetrievedDocument
/// </summary>
internal IDictionary<string, BinaryData> SerializedAdditionalRawData { get; set; }
/// <summary> Initializes a new instance of <see cref="ChatRetrievedDocument"/>. </summary>
/// <param name="content"> The content of the citation. </param>
/// <param name="searchQueries"> The search queries executed to retrieve documents. </param>
/// <param name="dataSourceIndex"> The index of the data source used for retrieval. </param>
/// <param name="content"></param>
/// <param name="searchQueries"></param>
/// <param name="dataSourceIndex"></param>
/// <exception cref="ArgumentNullException"> <paramref name="content"/> or <paramref name="searchQueries"/> is null. </exception>
internal ChatRetrievedDocument(string content, IEnumerable<string> searchQueries, int dataSourceIndex)
{
Expand All @@ -58,16 +58,16 @@ internal ChatRetrievedDocument(string content, IEnumerable<string> searchQueries
}

/// <summary> Initializes a new instance of <see cref="ChatRetrievedDocument"/>. </summary>
/// <param name="content"> The content of the citation. </param>
/// <param name="title"> The title for the citation. </param>
/// <param name="uri"> The URL of the citation. </param>
/// <param name="filePath"> The file path for the citation. </param>
/// <param name="chunkId"> The chunk ID for the citation. </param>
/// <param name="rerankScore"> The rerank score for the retrieval. </param>
/// <param name="searchQueries"> The search queries executed to retrieve documents. </param>
/// <param name="dataSourceIndex"> The index of the data source used for retrieval. </param>
/// <param name="originalSearchScore"> The original search score for the retrieval. </param>
/// <param name="filterReason"> If applicable, an indication of why the document was filtered. </param>
/// <param name="content"></param>
/// <param name="title"></param>
/// <param name="uri"></param>
/// <param name="filePath"></param>
/// <param name="chunkId"></param>
/// <param name="rerankScore"></param>
/// <param name="searchQueries"></param>
/// <param name="dataSourceIndex"></param>
/// <param name="originalSearchScore"></param>
/// <param name="filterReason"></param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal ChatRetrievedDocument(string content, string title, Uri uri, string filePath, string chunkId, double? rerankScore, IReadOnlyList<string> searchQueries, int dataSourceIndex, double? originalSearchScore, ChatDocumentFilterReason? filterReason, IDictionary<string, BinaryData> serializedAdditionalRawData)
{
Expand All @@ -89,21 +89,21 @@ internal ChatRetrievedDocument()
{
}

/// <summary> The content of the citation. </summary>
/// <summary> Gets the content. </summary>
public string Content { get; }
/// <summary> The title for the citation. </summary>
/// <summary> Gets the title. </summary>
public string Title { get; }
/// <summary> The chunk ID for the citation. </summary>
/// <summary> Gets the chunk id. </summary>
public string ChunkId { get; }
/// <summary> The rerank score for the retrieval. </summary>
/// <summary> Gets the rerank score. </summary>
public double? RerankScore { get; }
/// <summary> The search queries executed to retrieve documents. </summary>
/// <summary> Gets the search queries. </summary>
public IReadOnlyList<string> SearchQueries { get; }
/// <summary> The index of the data source used for retrieval. </summary>
/// <summary> Gets the data source index. </summary>
public int DataSourceIndex { get; }
/// <summary> The original search score for the retrieval. </summary>
/// <summary> Gets the original search score. </summary>
public double? OriginalSearchScore { get; }
/// <summary> If applicable, an indication of why the document was filtered. </summary>
/// <summary> Gets the filter reason. </summary>
public ChatDocumentFilterReason? FilterReason { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Azure.AI.OpenAI
{
/// <summary> A collection of true/false filtering results for configured custom blocklists. </summary>
/// <summary> The AzureContentFilterBlocklistResult. </summary>
public partial class ContentFilterBlocklistResult
{
/// <summary>
Expand Down Expand Up @@ -42,16 +42,16 @@ public partial class ContentFilterBlocklistResult
/// </summary>
internal IDictionary<string, BinaryData> SerializedAdditionalRawData { get; set; }
/// <summary> Initializes a new instance of <see cref="ContentFilterBlocklistResult"/>. </summary>
/// <param name="filtered"> A value indicating whether any of the detailed blocklists resulted in a filtering action. </param>
/// <param name="filtered"></param>
internal ContentFilterBlocklistResult(bool filtered)
{
Filtered = filtered;
InternalDetails = new ChangeTrackingList<InternalAzureContentFilterBlocklistResultDetail>();
}

/// <summary> Initializes a new instance of <see cref="ContentFilterBlocklistResult"/>. </summary>
/// <param name="filtered"> A value indicating whether any of the detailed blocklists resulted in a filtering action. </param>
/// <param name="internalDetails"> The pairs of individual blocklist IDs and whether they resulted in a filtering action. </param>
/// <param name="filtered"></param>
/// <param name="internalDetails"></param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal ContentFilterBlocklistResult(bool filtered, IReadOnlyList<InternalAzureContentFilterBlocklistResultDetail> internalDetails, IDictionary<string, BinaryData> serializedAdditionalRawData)
{
Expand All @@ -65,7 +65,7 @@ internal ContentFilterBlocklistResult()
{
}

/// <summary> A value indicating whether any of the detailed blocklists resulted in a filtering action. </summary>
/// <summary> Gets the filtered. </summary>
public bool Filtered { get; }
}
}
Loading
Loading