-
Notifications
You must be signed in to change notification settings - Fork 342
Generate ListInputItems for Responses #604
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 2 additions & 32 deletions
34
src/Custom/Responses/Pagination/ResponseItemCollectionOptions.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,4 @@ | ||
| using System.Diagnostics.CodeAnalysis; | ||
|
|
||
| namespace OpenAI.Responses; | ||
|
|
||
| /// <summary> The options to configure how <see cref="ResponseItem"/> objects are retrieved and paginated. </summary> | ||
| [Experimental("OPENAI001")] | ||
| public class ResponseItemCollectionOptions | ||
| { | ||
| /// <summary> Initializes a new instance of <see cref="ResponseItemCollectionOptions"/>. </summary> | ||
| public ResponseItemCollectionOptions() { } | ||
|
|
||
| /// <summary> | ||
| /// A limit on the number of <see cref="Response"/> objects to be returned per page. | ||
| /// </summary> | ||
| public int? PageSizeLimit { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// The order in which to retrieve <see cref="Response"/> objects when sorted by their | ||
| /// <see cref="Response.CreatedAt"/> timestamp. | ||
| /// </summary> | ||
| public ResponseItemCollectionOrder? Order { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// The <see cref="Response.Id"/> used to retrieve the page of <see cref="Response"/> objects that come | ||
| /// after this one. | ||
| /// </summary> | ||
| public string AfterId { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// The <see cref="Response.Id"/> used to retrieve the page of <see cref="Response"/> objects that come | ||
| /// before this one. | ||
| /// </summary> | ||
| public string BeforeId { get; set; } | ||
| } | ||
| // CUSTOM: Make public and use the correct namespace. | ||
| [CodeGenType("ResponseItemCollectionOptions")] public partial class ResponseItemCollectionOptions { } |
39 changes: 3 additions & 36 deletions
39
src/Custom/Responses/Pagination/ResponseItemCollectionOrder.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,4 @@ | ||
| using System; | ||
| using System.ComponentModel; | ||
| using System.Diagnostics.CodeAnalysis; | ||
| namespace OpenAI.Responses; | ||
|
|
||
| namespace OpenAI.Responses; | ||
|
|
||
| [Experimental("OPENAI001")] | ||
| public readonly partial struct ResponseItemCollectionOrder: IEquatable<ResponseItemCollectionOrder> | ||
| { | ||
| public static ResponseItemCollectionOrder Ascending { get; } = new("asc"); | ||
|
|
||
| public static ResponseItemCollectionOrder Descending { get; } = new("desc"); | ||
|
|
||
| private readonly string _value; | ||
|
|
||
| public ResponseItemCollectionOrder(string value) | ||
| { | ||
| Argument.AssertNotNull(value, nameof(value)); | ||
| _value = value; | ||
| } | ||
|
|
||
| public static bool operator ==(ResponseItemCollectionOrder left, ResponseItemCollectionOrder right) => left.Equals(right); | ||
|
|
||
| public static bool operator !=(ResponseItemCollectionOrder left, ResponseItemCollectionOrder right) => !left.Equals(right); | ||
|
|
||
| public static implicit operator ResponseItemCollectionOrder(string value) => new(value); | ||
|
|
||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public override bool Equals(object obj) => obj is ResponseItemCollectionOrder other && Equals(other); | ||
|
|
||
| public bool Equals(ResponseItemCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); | ||
|
|
||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; | ||
|
|
||
| public override string ToString() => _value; | ||
| } | ||
| // CUSTOM: Make public and use the correct namespace. | ||
| [CodeGenType("ResponseItemCollectionOrder")] public readonly partial struct ResponseItemCollectionOrder { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.