@@ -1430,6 +1430,14 @@ public class ChatClient {
14301430 public virtual Task < ClientResult > GetChatCompletionAsync ( string completionId , RequestOptions options ) ;
14311431 [ Experimental ( "OPENAI001" ) ]
14321432 public virtual Task < ClientResult < ChatCompletion > > GetChatCompletionAsync ( string completionId , CancellationToken cancellationToken = default ) ;
1433+ [ Experimental ( "OPENAI001" ) ]
1434+ public virtual CollectionResult < ChatCompletion > GetChatCompletions ( ChatCompletionCollectionOptions options = null , CancellationToken cancellationToken = default ) ;
1435+ [ Experimental ( "OPENAI001" ) ]
1436+ public virtual CollectionResult GetChatCompletions ( string after , int ? limit , string order , IDictionary < string , string > metadata , string model , RequestOptions options ) ;
1437+ [ Experimental ( "OPENAI001" ) ]
1438+ public virtual AsyncCollectionResult < ChatCompletion > GetChatCompletionsAsync ( ChatCompletionCollectionOptions options = null , CancellationToken cancellationToken = default ) ;
1439+ [ Experimental ( "OPENAI001" ) ]
1440+ public virtual AsyncCollectionResult GetChatCompletionsAsync ( string after , int ? limit , string order , IDictionary < string , string > metadata , string model , RequestOptions options ) ;
14331441 }
14341442 public class ChatCompletion : IJsonModel < ChatCompletion > , IPersistableModel < ChatCompletion > {
14351443 [ Experimental ( "OPENAI001" ) ]
@@ -1460,6 +1468,33 @@ public class ChatCompletion : IJsonModel<ChatCompletion>, IPersistableModel<Chat
14601468 protected virtual BinaryData PersistableModelWriteCore ( ModelReaderWriterOptions options ) ;
14611469 }
14621470 [ Experimental ( "OPENAI001" ) ]
1471+ public class ChatCompletionCollectionOptions : IJsonModel < ChatCompletionCollectionOptions > , IPersistableModel < ChatCompletionCollectionOptions > {
1472+ public string AfterId { get ; set ; }
1473+ public IDictionary < string , string > Metadata { get ; }
1474+ public string Model { get ; set ; }
1475+ public ChatCompletionCollectionOrder ? Order { get ; set ; }
1476+ public int ? PageSizeLimit { get ; set ; }
1477+ protected virtual ChatCompletionCollectionOptions JsonModelCreateCore ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) ;
1478+ protected virtual void JsonModelWriteCore ( Utf8JsonWriter writer , ModelReaderWriterOptions options ) ;
1479+ protected virtual ChatCompletionCollectionOptions PersistableModelCreateCore ( BinaryData data , ModelReaderWriterOptions options ) ;
1480+ protected virtual BinaryData PersistableModelWriteCore ( ModelReaderWriterOptions options ) ;
1481+ }
1482+ [ Experimental ( "OPENAI001" ) ]
1483+ public readonly partial struct ChatCompletionCollectionOrder : IEquatable < ChatCompletionCollectionOrder > {
1484+ public ChatCompletionCollectionOrder ( string value ) ;
1485+ public static ChatCompletionCollectionOrder Ascending { get ; }
1486+ public static ChatCompletionCollectionOrder Descending { get ; }
1487+ public readonly bool Equals ( ChatCompletionCollectionOrder other ) ;
1488+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
1489+ public override readonly bool Equals ( object obj ) ;
1490+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
1491+ public override readonly int GetHashCode ( ) ;
1492+ public static bool operator == ( ChatCompletionCollectionOrder left , ChatCompletionCollectionOrder right ) ;
1493+ public static implicit operator ChatCompletionCollectionOrder ( string value ) ;
1494+ public static bool operator != ( ChatCompletionCollectionOrder left , ChatCompletionCollectionOrder right ) ;
1495+ public override readonly string ToString ( ) ;
1496+ }
1497+ [ Experimental ( "OPENAI001" ) ]
14631498 public class ChatCompletionDeletionResult : IJsonModel < ChatCompletionDeletionResult > , IPersistableModel < ChatCompletionDeletionResult > {
14641499 public string ChatCompletionId { get ; }
14651500 public bool Deleted { get ; }
0 commit comments