2.0.0-beta.6 (2024-09-23)
This version increments library compatibility to OpenAI 2.0.0-beta.12
, including support for o1
models with reasoning tokens and a number of breaking changes to method names.
Features Added
- The library now includes support for the new OpenAI o1 model family. (2ab1a94)
ChatCompletionOptions
will automatically apply itsMaxOutputTokenCount
value (renamed fromMaxTokens
) to the newmax_completion_tokens
request body propertyUsage
includes a newOutputTokenDetails
property with aReasoningTokenCount
value that will reflecto1
model use of this new subcategory of output tokens.- Note that
OutputTokenCount
(completion_tokens
) is the sum of displayed tokens generated by the model and (when applicable) these new reasoning tokens
- Assistants file search now includes support for
RankingOptions
. (2ab1a94)- Use of the
include[]
query string parameter and retrieval of run step detail result content is currently only available via protocol methods
- Use of the
- Added support for the Uploads API in
FileClient
. ThisExperimental
feature allows uploading large files in multiple parts. (2ab1a94)- The feature is supported by the
CreateUpload
,AddUploadPart
,CompleteUpload
, andCancelUpload
protocol methods.
- The feature is supported by the
Breaking Changes
- Renamed
ChatMessageContentPart
'sCreateTextMessageContentPart
factory method toCreateTextPart
. (2ab1a94) - Renamed
ChatMessageContentPart
'sCreateImageMessageContentPart
factory method toCreateImagePart
. (2ab1a94) - Renamed
ChatMessageContentPart
'sCreateRefusalMessageContentPart
factory method toCreateRefusalPart
. (2ab1a94) - Renamed
ImageChatMessageContentPartDetail
toChatImageDetailLevel
. (2ab1a94) - Removed
ChatMessageContentPart
'sToString
overload. (2ab1a94) - Renamed the
MaxTokens
property inChatCompletionOptions
toMaxOutputTokenCount
. (2ab1a94) - Renamed properties in
ChatTokenUsage
: - Removed the common
ListOrder
enum from the top-levelOpenAI
namespace in favor of individual enums in their corresponding sub-namespace. (2ab1a94) - Renamed the
PageSize
property toPageSizeLimit
. (2ab1a94) - Updated deletion methods to return a result object instead of a
bool
. Affected methods: - Removed setters from collection properties. (2ab1a94)
- Renamed
ChatTokenLogProbabilityInfo
toChatTokenLogProbabilityDetails
. (2ab1a94) - Renamed
ChatTokenTopLogProbabilityInfo
toChatTokenTopLogProbabilityDetails
. (2ab1a94) - Renamed the
Utf8ByteValues
properties ofChatTokenLogProbabilityDetails
andChatTokenTopLogProbabilityDetails
toUtf8Bytes
and changed their type fromIReadOnlyList<int>
toReadOnlyMemory<byte>?
. (2ab1a94) - Renamed the
Start
andEnd
properties ofTranscribedSegment
andTranscribedWord
toStartTime
andEndTime
. (2ab1a94) - Changed the type of
TranscribedSegment
'sAverageLogProbability
andNoSpeechProbability
properties fromdouble
tofloat
. (2ab1a94) - Changed the type of
TranscribedSegment
'sSeekOffset
property fromlong
toint
. (2ab1a94) - Changed the type of
TranscribedSegment
'sTokenIds
property fromIReadOnlyList<long>
toIReadOnlyList<int>
. (2ab1a94) - Updated the
Embedding.Vector
property to theEmbedding.ToFloats()
method. (2ab1a94) - Removed the optional parameter from the constructors of
VectorStoreCreationHelper
,AssistantChatMessage
, andChatFunction
. (2ab1a94) - Removed the optional
purpose
parameter fromFileClient.GetFilesAsync
andFileClient.GetFiles
methods, and added overloads wherepurpose
is required. (2ab1a94) - Renamed
ModerationClient
'sClassifyTextInput
methods toClassifyText
. (2ab1a94) - Removed duplicated
Created
property fromGeneratedImageCollection
. (2ab1a94)
Bugs Fixed
- Addressed an issue that caused multi-page queries of fine-tuning jobs, checkpoints, and events to fail. (2ab1a94)
ChatCompletionOptions
can now be serialized viaModelReaderWriter.Write()
prior to callingCompleteChat
using the options. (2ab1a94)