@@ -99,7 +99,7 @@ public virtual async Task<ClientResult<OpenAIEmbedding>> GenerateEmbeddingAsync(
9999 Argument . AssertNotNullOrEmpty ( input , nameof ( input ) ) ;
100100
101101 options ??= new ( ) ;
102- CreateEmbeddingGenerationOptions ( BinaryData . FromObjectAsJson ( input ) , ref options ) ;
102+ CreateEmbeddingGenerationOptions ( BinaryData . FromObjectAsJson ( input , SourceGenerationContext . Default . String ) , ref options ) ;
103103
104104 using BinaryContent content = options ;
105105 ClientResult result = await GenerateEmbeddingsAsync ( content , cancellationToken . ToRequestOptions ( ) ) . ConfigureAwait ( false ) ;
@@ -118,7 +118,7 @@ public virtual ClientResult<OpenAIEmbedding> GenerateEmbedding(string input, Emb
118118 Argument . AssertNotNullOrEmpty ( input , nameof ( input ) ) ;
119119
120120 options ??= new ( ) ;
121- CreateEmbeddingGenerationOptions ( BinaryData . FromObjectAsJson ( input ) , ref options ) ;
121+ CreateEmbeddingGenerationOptions ( BinaryData . FromObjectAsJson ( input , SourceGenerationContext . Default . String ) , ref options ) ;
122122
123123 using BinaryContent content = options ;
124124 ClientResult result = GenerateEmbeddings ( content , cancellationToken . ToRequestOptions ( ) ) ;
@@ -137,7 +137,7 @@ public virtual async Task<ClientResult<OpenAIEmbeddingCollection>> GenerateEmbed
137137 Argument . AssertNotNullOrEmpty ( inputs , nameof ( inputs ) ) ;
138138
139139 options ??= new ( ) ;
140- CreateEmbeddingGenerationOptions ( BinaryData . FromObjectAsJson ( inputs ) , ref options ) ;
140+ CreateEmbeddingGenerationOptions ( BinaryData . FromObjectAsJson ( inputs , SourceGenerationContext . Default . IEnumerableString ) , ref options ) ;
141141
142142 using BinaryContent content = options ;
143143 ClientResult result = await GenerateEmbeddingsAsync ( content , cancellationToken . ToRequestOptions ( ) ) . ConfigureAwait ( false ) ;
@@ -157,7 +157,7 @@ public virtual ClientResult<OpenAIEmbeddingCollection> GenerateEmbeddings(IEnume
157157 Argument . AssertNotNullOrEmpty ( inputs , nameof ( inputs ) ) ;
158158
159159 options ??= new ( ) ;
160- CreateEmbeddingGenerationOptions ( BinaryData . FromObjectAsJson ( inputs ) , ref options ) ;
160+ CreateEmbeddingGenerationOptions ( BinaryData . FromObjectAsJson ( inputs , SourceGenerationContext . Default . IEnumerableString ) , ref options ) ;
161161
162162 using BinaryContent content = options ;
163163 ClientResult result = GenerateEmbeddings ( content , cancellationToken . ToRequestOptions ( ) ) ;
@@ -176,7 +176,7 @@ public virtual async Task<ClientResult<OpenAIEmbeddingCollection>> GenerateEmbed
176176 Argument . AssertNotNullOrEmpty ( inputs , nameof ( inputs ) ) ;
177177
178178 options ??= new ( ) ;
179- CreateEmbeddingGenerationOptions ( BinaryData . FromObjectAsJson ( inputs ) , ref options ) ;
179+ CreateEmbeddingGenerationOptions ( BinaryData . FromObjectAsJson ( inputs , SourceGenerationContext . Default . IEnumerableReadOnlyMemoryInt32 ) , ref options ) ;
180180
181181 using BinaryContent content = options ;
182182 ClientResult result = await GenerateEmbeddingsAsync ( content , cancellationToken . ToRequestOptions ( ) ) . ConfigureAwait ( false ) ;
@@ -195,7 +195,7 @@ public virtual ClientResult<OpenAIEmbeddingCollection> GenerateEmbeddings(IEnume
195195 Argument . AssertNotNullOrEmpty ( inputs , nameof ( inputs ) ) ;
196196
197197 options ??= new ( ) ;
198- CreateEmbeddingGenerationOptions ( BinaryData . FromObjectAsJson ( inputs ) , ref options ) ;
198+ CreateEmbeddingGenerationOptions ( BinaryData . FromObjectAsJson ( inputs , SourceGenerationContext . Default . IEnumerableReadOnlyMemoryInt32 ) , ref options ) ;
199199
200200 using BinaryContent content = options ;
201201 ClientResult result = GenerateEmbeddings ( content , cancellationToken . ToRequestOptions ( ) ) ;
0 commit comments