@@ -229,6 +229,7 @@ namespace OpenAI.Assistants {
229
229
public IDictionary <string , string > Metadata { get ; }
230
230
public string ModelOverride { get ; init ; }
231
231
public float ? NucleusSamplingFactor { get ; init ; }
232
+ public bool ? ParallelToolCallsEnabled { get ; init ; }
232
233
public AssistantResponseFormat ResponseFormat { get ; init ; }
233
234
public float ? Temperature { get ; init ; }
234
235
public ToolConstraint ToolConstraint { get ; init ; }
@@ -292,6 +293,7 @@ namespace OpenAI.Assistants {
292
293
}
293
294
public class FileSearchToolDefinition : ToolDefinition {
294
295
public FileSearchToolDefinition ();
296
+ public int ? MaxResults { get ; init ; }
295
297
}
296
298
public class FileSearchToolResources {
297
299
public FileSearchToolResources ();
@@ -368,7 +370,6 @@ namespace OpenAI.Assistants {
368
370
public class MessageTextContentAnnotation {
369
371
public int EndIndex { get ; }
370
372
public string InputFileId { get ; }
371
- public string InputQuote { get ; }
372
373
public string OutputFileId { get ; }
373
374
public int StartIndex { get ; }
374
375
public string TextToReplace { get ; }
@@ -563,7 +564,6 @@ namespace OpenAI.Assistants {
563
564
public class TextAnnotation {
564
565
public int EndIndex { get ; }
565
566
public string InputFileId { get ; }
566
- public string InputQuote { get ; }
567
567
public string OutputFileId { get ; }
568
568
public int StartIndex { get ; }
569
569
public string TextToReplace { get ; }
@@ -572,13 +572,13 @@ namespace OpenAI.Assistants {
572
572
public int ContentIndex { get ; }
573
573
public int ? EndIndex { get ; }
574
574
public string InputFileId { get ; }
575
- public string InputQuote { get ; }
576
575
public string OutputFileId { get ; }
577
576
public int ? StartIndex { get ; }
578
577
public string TextToReplace { get ; }
579
578
}
580
579
public class ThreadInitializationMessage : MessageCreationOptions {
581
580
public ThreadInitializationMessage (IEnumerable <MessageContent > content );
581
+ public static implicit operator ThreadInitializationMessage (string initializationMessage );
582
582
}
583
583
public class ThreadMessage {
584
584
public string AssistantId { get ; }
@@ -611,6 +611,7 @@ namespace OpenAI.Assistants {
611
611
public IReadOnlyDictionary <string , string > Metadata { get ; }
612
612
public string Model { get ; }
613
613
public float ? NucleusSamplingFactor { get ; }
614
+ public bool ? ParallelToolCallsEnabled { get ; init ; }
614
615
public IReadOnlyList <RequiredAction > RequiredActions { get ; }
615
616
public AssistantResponseFormat ResponseFormat { get ; }
616
617
public DateTimeOffset ? StartedAt { get ; }
@@ -635,9 +636,10 @@ namespace OpenAI.Assistants {
635
636
public static ToolConstraint Required { get ; }
636
637
}
637
638
public abstract class ToolDefinition {
639
+ protected ToolDefinition (string type );
638
640
protected ToolDefinition ();
639
641
public static CodeInterpreterToolDefinition CreateCodeInterpreter ();
640
- public static FileSearchToolDefinition CreateFileSearch ();
642
+ public static FileSearchToolDefinition CreateFileSearch (int ? maxResults = null );
641
643
public static FunctionToolDefinition CreateFunction (string name , string description = null , BinaryData parameters = null );
642
644
}
643
645
public class ToolOutput {
@@ -839,11 +841,15 @@ namespace OpenAI.Chat {
839
841
protected ChatClient ();
840
842
public virtual ClientPipeline Pipeline { get ; }
841
843
public virtual ClientResult <ChatCompletion > CompleteChat (IEnumerable <ChatMessage > messages , ChatCompletionOptions options = null );
844
+ public virtual ClientResult <ChatCompletion > CompleteChat (params ChatMessage [] messages );
842
845
public virtual ClientResult CompleteChat (BinaryContent content , RequestOptions options = null );
843
846
public virtual Task <ClientResult <ChatCompletion >> CompleteChatAsync (IEnumerable <ChatMessage > messages , ChatCompletionOptions options = null );
847
+ public virtual Task <ClientResult <ChatCompletion >> CompleteChatAsync (params ChatMessage [] messages );
844
848
public virtual Task <ClientResult > CompleteChatAsync (BinaryContent content , RequestOptions options = null );
845
849
public virtual ResultCollection <StreamingChatCompletionUpdate > CompleteChatStreaming (IEnumerable <ChatMessage > messages , ChatCompletionOptions options = null );
850
+ public virtual ResultCollection <StreamingChatCompletionUpdate > CompleteChatStreaming (params ChatMessage [] messages );
846
851
public virtual AsyncResultCollection <StreamingChatCompletionUpdate > CompleteChatStreamingAsync (IEnumerable <ChatMessage > messages , ChatCompletionOptions options = null );
852
+ public virtual AsyncResultCollection <StreamingChatCompletionUpdate > CompleteChatStreamingAsync (params ChatMessage [] messages );
847
853
}
848
854
public class ChatCompletionOptions {
849
855
public ChatCompletionOptions ();
@@ -853,6 +859,7 @@ namespace OpenAI.Chat {
853
859
public bool ? IncludeLogProbabilities { get ; init ; }
854
860
public IDictionary <int , int > LogitBiases { get ; }
855
861
public int ? MaxTokens { get ; init ; }
862
+ public bool ? ParallelToolCallsEnabled { get ; init ; }
856
863
public float ? PresencePenalty { get ; init ; }
857
864
public ChatResponseFormat ResponseFormat { get ; init ; }
858
865
public long ? Seed { get ; init ; }
@@ -885,6 +892,7 @@ namespace OpenAI.Chat {
885
892
public string SystemFingerprint { get ; }
886
893
public IReadOnlyList <ChatToolCall > ToolCalls { get ; }
887
894
public ChatTokenUsage Usage { get ; }
895
+ public override string ToString ();
888
896
}
889
897
[Obsolete (" This field is marked as deprecated." )]
890
898
public class ChatFunction {
@@ -916,6 +924,7 @@ namespace OpenAI.Chat {
916
924
public static UserChatMessage CreateUserMessage (string content );
917
925
public static UserChatMessage CreateUserMessage (IEnumerable <ChatMessageContentPart > contentParts );
918
926
public static UserChatMessage CreateUserMessage (params ChatMessageContentPart [] contentParts );
927
+ public static implicit operator ChatMessage (string userMessage );
919
928
}
920
929
public class ChatMessageContentPart {
921
930
public BinaryData ImageBytes { get ; }
@@ -927,6 +936,8 @@ namespace OpenAI.Chat {
927
936
public static ChatMessageContentPart CreateImageMessageContentPart (Uri imageUri , ImageChatMessageContentPartDetail ? imageDetail = null );
928
937
public static ChatMessageContentPart CreateImageMessageContentPart (BinaryData imageBytes , string imageBytesMediaType , ImageChatMessageContentPartDetail ? imageDetail = null );
929
938
public static ChatMessageContentPart CreateTextMessageContentPart (string text );
939
+ public static implicit operator ChatMessageContentPart (string content );
940
+ public override string ToString ();
930
941
}
931
942
public readonly struct ChatMessageContentPartKind : IEquatable <ChatMessageContentPartKind > {
932
943
public ChatMessageContentPartKind (string value );
@@ -1481,6 +1492,7 @@ namespace OpenAI.VectorStores {
1481
1492
}
1482
1493
public class VectorStoreCreationOptions {
1483
1494
public VectorStoreCreationOptions ();
1495
+ public FileChunkingStrategy ChunkingStrategy { get ; init ; }
1484
1496
public VectorStoreExpirationPolicy ExpirationPolicy { get ; init ; }
1485
1497
public IList <string > FileIds { get ; init ; }
1486
1498
public IDictionary <string , string > Metadata { get ; }
@@ -1492,6 +1504,17 @@ namespace OpenAI.VectorStores {
1492
1504
public IDictionary <string , string > Metadata { get ; }
1493
1505
public string Name { get ; init ; }
1494
1506
}
1507
+ public abstract class FileChunkingStrategy {
1508
+ protected FileChunkingStrategy ();
1509
+ public static FileChunkingStrategy Auto { get ; }
1510
+ public static FileChunkingStrategy Unknown { get ; }
1511
+ public static FileChunkingStrategy CreateStaticStrategy (int maxTokensPerChunk , int overlappingTokenCount );
1512
+ }
1513
+ public class StaticFileChunkingStrategy : FileChunkingStrategy {
1514
+ public StaticFileChunkingStrategy (int maxTokensPerChunk , int overlappingTokenCount );
1515
+ public int MaxTokensPerChunk { get ; }
1516
+ public int OverlappingTokenCount { get ; }
1517
+ }
1495
1518
public class VectorStore {
1496
1519
public DateTimeOffset CreatedAt { get ; }
1497
1520
public VectorStoreExpirationPolicy ExpirationPolicy { get ; }
@@ -1533,6 +1556,7 @@ namespace OpenAI.VectorStores {
1533
1556
public required int Days { get ; init ; }
1534
1557
}
1535
1558
public class VectorStoreFileAssociation {
1559
+ public FileChunkingStrategy ChunkingStrategy { get ; }
1536
1560
public DateTimeOffset CreatedAt { get ; }
1537
1561
public string FileId { get ; }
1538
1562
public VectorStoreFileAssociationError ? LastError { get ; }
0 commit comments