1 type derived from ChatResponse
Microsoft.Extensions.AI (1)
241 instantiations of ChatResponse
Aspire.Azure.AI.OpenAI.Tests (1)
Aspire.OpenAI.Tests (1)
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions (3)
Microsoft.Extensions.AI.Abstractions.Tests (17)
Microsoft.Extensions.AI.Evaluation (2)
Microsoft.Extensions.AI.Evaluation.Console (1)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (3)
Microsoft.Extensions.AI.Evaluation.NLP.Tests (17)
Microsoft.Extensions.AI.Evaluation.Reporting (3)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (5)
Microsoft.Extensions.AI.Evaluation.Safety (1)
Microsoft.Extensions.AI.Integration.Tests (1)
Microsoft.Extensions.AI.OpenAI (2)
Microsoft.Extensions.AI.OpenAI.Tests (16)
OpenAIConversionTests.cs (16)
1519var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant,
1558var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Hello"));
1566var emptyResponse = new ChatResponse([]);
1588var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant,
1633var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Test"))
1656var chatResponse = new ChatResponse(new ChatMessage(inputRole, "Test"));
1994var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Test"))
2007var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Hello, world!"))
2032var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Test message"))
2064var chatResponse = new ChatResponse([])
2091var chatResponse = new ChatResponse(messages)
2128var chatResponse = new ChatResponse(messages)
2159var chatResponse = new ChatResponse(messages)
2181var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Default test"));
2199var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Model test"));
2214var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Model priority test"))
Microsoft.Extensions.AI.Tests (159)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (11)
23var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, JsonSerializer.Serialize(expectedResult, JsonContext2.Default.Animal)))
100var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, JsonSerializer.Serialize(expectedResult, JsonContext2.Default.Options)))
161var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, JsonSerializer.Serialize(expectedResult, JsonContext2.Default.Options)));
196var expectedResponse = new ChatResponse(
239var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "This is not valid JSON"));
258var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "null"));
277var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, [new UriContent("https://example.com", "image/*")]));
297var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, JsonSerializer.Serialize(expectedResult, JsonContext2.Default.Options)));
332var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, JsonSerializer.Serialize(payload, JsonContext2.Default.Options)));
364var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, JsonSerializer.Serialize(expectedResult, jso)));
425return Task.FromResult(new ChatResponse(new ChatMessage(ChatRole.Assistant, resultDuplicatedJson)));
ChatCompletion\FunctionInvokingChatClientTests.cs (80)
379return Task.FromResult(new ChatResponse(
384return Task.FromResult(new ChatResponse(new ChatMessage(ChatRole.Assistant, "done")));
392return YieldAsync(new ChatResponse(
397return YieldAsync(new ChatResponse(new ChatMessage(ChatRole.Assistant, "done")).ToChatResponseUpdates());
460return Task.FromResult(new ChatResponse(
465return Task.FromResult(new ChatResponse(new ChatMessage(ChatRole.Assistant, "done")));
473return YieldAsync(new ChatResponse(
478return YieldAsync(new ChatResponse(new ChatMessage(ChatRole.Assistant, "done")).ToChatResponseUpdates());
541return Task.FromResult(new ChatResponse(
546return Task.FromResult(new ChatResponse(new ChatMessage(ChatRole.Assistant, "done")));
554return YieldAsync(new ChatResponse(
559return YieldAsync(new ChatResponse(new ChatMessage(ChatRole.Assistant, "done")).ToChatResponseUpdates());
669return Task.FromResult(new ChatResponse(message));
713return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
760return Task.FromResult(new ChatResponse(message));
765return Task.FromResult(new ChatResponse(message));
805return Task.FromResult(new ChatResponse(message));
1248return new(message);
1370return Task.FromResult(new ChatResponse(message));
1412return new ChatResponse(new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId-abc", "Func1")]))
1420return new ChatResponse(new ChatMessage(ChatRole.Assistant, "done!"));
1648return Task.FromResult(new ChatResponse { Messages = messages });
1743return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
2043return new ChatResponse(message);
2049return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
2098return new ChatResponse(message);
2104return new ChatResponse(message);
2113return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
2119return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
2161return new ChatResponse(new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1")]));
2165return new ChatResponse(new ChatMessage(ChatRole.Assistant, "Done"));
2228return new ChatResponse(message) { Usage = usage };
2292return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
2388return new ChatResponse([new ChatMessage(ChatRole.Assistant,
2395return new ChatResponse([new ChatMessage(ChatRole.Assistant,
2401return new ChatResponse([new ChatMessage(ChatRole.Assistant, "Done")]);
2425return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
2482return new ChatResponse([new ChatMessage(ChatRole.Assistant,
2489return new ChatResponse([new ChatMessage(ChatRole.Assistant,
2495return new ChatResponse([new ChatMessage(ChatRole.Assistant, "Done")]);
2519return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
2589return new ChatResponse([new ChatMessage(ChatRole.Assistant,
2595return new ChatResponse([new ChatMessage(ChatRole.Assistant,
2600return new ChatResponse([new ChatMessage(ChatRole.Assistant, "Done")]);
2624return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
2687return new ChatResponse([new ChatMessage(ChatRole.Assistant,
2695return new ChatResponse([new ChatMessage(ChatRole.Assistant,
2701return new ChatResponse([new ChatMessage(ChatRole.Assistant, "Done")]);
2726return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
2791return new ChatResponse([new ChatMessage(ChatRole.Assistant,
2797return new ChatResponse([new ChatMessage(ChatRole.Assistant,
2802return new ChatResponse([new ChatMessage(ChatRole.Assistant, "Done")]);
2826return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
2889return new ChatResponse([new ChatMessage(ChatRole.Assistant,
2894return new ChatResponse([new ChatMessage(ChatRole.Assistant, "Done")]);
2912return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
2967return new ChatResponse([new ChatMessage(ChatRole.Assistant,
2975return new ChatResponse([new ChatMessage(ChatRole.Assistant,
2980return new ChatResponse([new ChatMessage(ChatRole.Assistant, "Done")]);
3004return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
3068return new ChatResponse([new ChatMessage(ChatRole.Assistant,
3076return new ChatResponse([new ChatMessage(ChatRole.Assistant,
3081return new ChatResponse([new ChatMessage(ChatRole.Assistant, "Done")]);
3105return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
3174return new ChatResponse([new ChatMessage(ChatRole.Assistant,
3182return new ChatResponse([new ChatMessage(ChatRole.Assistant,
3187return new ChatResponse([new ChatMessage(ChatRole.Assistant, "Done")]);
3211return YieldAsync(new ChatResponse(message).ToChatResponseUpdates());
3386Task.FromResult(new ChatResponse(new ChatMessage(ChatRole.Assistant, "world")))
3423Task.FromResult(new ChatResponse(new ChatMessage(ChatRole.Assistant, "world")))
3472return new ChatResponse(
3480var response = new ChatResponse(
3536return new ChatResponse(
3544return new ChatResponse(new ChatMessage(ChatRole.Assistant, "done"));
3551var response = new ChatResponse(
3560var response = new ChatResponse(new ChatMessage(ChatRole.Assistant, "done"));
3607return new ChatResponse(new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1")]));
3611return new ChatResponse(new ChatMessage(ChatRole.Assistant, "done"));
3618var response = new ChatResponse(new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1")]));
3623var response = new ChatResponse(new ChatMessage(ChatRole.Assistant, "done"));
ChatRouting\SemanticRoutingChatClientTests.cs (7)
97ChatResponse expected = new(new ChatMessage(ChatRole.Assistant, "code"));
105Task.FromResult(new ChatResponse(new ChatMessage(ChatRole.Assistant, "writing"))),
149Task.FromResult(new ChatResponse(new ChatMessage(ChatRole.Assistant, "code"))),
154Task.FromResult(new ChatResponse(new ChatMessage(ChatRole.Assistant, "writing"))),
192Task.FromResult(new ChatResponse(new ChatMessage(ChatRole.Assistant, "profiled"))),
194ChatResponse expected = new(new ChatMessage(ChatRole.Assistant, "default"));
245Task.FromResult(new ChatResponse());
Microsoft.Extensions.DataIngestion.Tests (6)
Microsoft.ML.GenAI.Core (1)
898 references to ChatResponse
Aspire.Azure.AI.OpenAI.Tests (2)
Aspire.OpenAI.Tests (3)
Microsoft.AspNetCore.Components.AI (1)
Microsoft.Extensions.AI (46)
Microsoft.Extensions.AI.Abstractions (88)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.ChatResponse.g.cs (50)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse>? _ChatResponse;
21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> ChatResponse
24get => _ChatResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.ChatResponse));
27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> Create_ChatResponse(global::System.Text.Json.JsonSerializerOptions options)
29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.ChatResponse>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> jsonTypeInfo))
31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.ChatResponse>
37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.ChatResponse>(options, objectInfo);
58DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
60Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Messages,
61Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Messages = value!,
68AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Messages", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>), global::System.Array.Empty<global::System.Type>(), null),
79DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
89AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Text", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
100DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
102Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ResponseId,
103Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ResponseId = value!,
110AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
120DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
122Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ConversationId,
123Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ConversationId = value!,
130AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ConversationId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
140DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
142Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ModelId,
143Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ModelId = value!,
150AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
160DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
162Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).CreatedAt,
163Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).CreatedAt = value!,
170AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("CreatedAt", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset?), global::System.Array.Empty<global::System.Type>(), null),
180DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
182Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).FinishReason,
183Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).FinishReason = value!,
190AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("FinishReason", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ChatFinishReason?), global::System.Array.Empty<global::System.Type>(), null),
200DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
202Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Usage,
203Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Usage = value!,
210AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Usage", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.UsageDetails), global::System.Array.Empty<global::System.Type>(), null),
220DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
222Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ContinuationToken,
223Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ContinuationToken = value!,
230AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ContinuationToken", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ResponseContinuationToken), global::System.Array.Empty<global::System.Type>(), null),
240DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
250AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null),
260DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
262Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).AdditionalProperties,
263Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).AdditionalProperties = value!,
270AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null),
Microsoft.Extensions.AI.Abstractions.Tests (103)
Generated\361d1da7f942c932\TestJsonSerializerContext.ChatResponse.g.cs (50)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse>? _ChatResponse;
19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> ChatResponse
22get => _ChatResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.ChatResponse));
25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> Create_ChatResponse(global::System.Text.Json.JsonSerializerOptions options)
27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.ChatResponse>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> jsonTypeInfo))
29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.ChatResponse>
35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.ChatResponse>(options, objectInfo);
56DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
58Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Messages,
59Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Messages = value!,
66AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Messages", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>), global::System.Array.Empty<global::System.Type>(), null),
78DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
88AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Text", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
99DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
101Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ResponseId,
102Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ResponseId = value!,
109AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
119DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
121Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ConversationId,
122Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ConversationId = value!,
129AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ConversationId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
139DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
141Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ModelId,
142Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ModelId = value!,
149AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
159DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
161Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).CreatedAt,
162Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).CreatedAt = value!,
169AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("CreatedAt", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset?), global::System.Array.Empty<global::System.Type>(), null),
179DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
181Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).FinishReason,
182Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).FinishReason = value!,
189AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("FinishReason", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ChatFinishReason?), global::System.Array.Empty<global::System.Type>(), null),
199DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
201Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Usage,
202Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Usage = value!,
209AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Usage", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.UsageDetails), global::System.Array.Empty<global::System.Type>(), null),
219DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
221Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ContinuationToken,
222Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ContinuationToken = value!,
229AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ContinuationToken", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ResponseContinuationToken), global::System.Array.Empty<global::System.Type>(), null),
239DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
249AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null),
259DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
261Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).AdditionalProperties,
262Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).AdditionalProperties = value!,
269AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null),
Microsoft.Extensions.AI.Evaluation (20)
Microsoft.Extensions.AI.Evaluation.Console (1)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (21)
Microsoft.Extensions.AI.Evaluation.NLP (3)
Microsoft.Extensions.AI.Evaluation.NLP.Tests (17)
Microsoft.Extensions.AI.Evaluation.Quality (39)
Microsoft.Extensions.AI.Evaluation.Reporting (81)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.ChatResponse.g.cs (50)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse>? _ChatResponse;
21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> ChatResponse
24get => _ChatResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.ChatResponse));
27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> Create_ChatResponse(global::System.Text.Json.JsonSerializerOptions options)
29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.ChatResponse>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> jsonTypeInfo))
31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.ChatResponse>
37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.ChatResponse>(options, objectInfo);
58DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
60Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Messages,
61Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Messages = value!,
68AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Messages", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>), global::System.Array.Empty<global::System.Type>(), null),
80DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
90AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Text", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
101DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
103Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ResponseId,
104Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ResponseId = value!,
111AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
121DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
123Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ConversationId,
124Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ConversationId = value!,
131AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ConversationId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
141DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
143Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ModelId,
144Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ModelId = value!,
151AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
161DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
163Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).CreatedAt,
164Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).CreatedAt = value!,
171AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("CreatedAt", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset?), global::System.Array.Empty<global::System.Type>(), null),
181DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
183Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).FinishReason,
184Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).FinishReason = value!,
191AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("FinishReason", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ChatFinishReason?), global::System.Array.Empty<global::System.Type>(), null),
201DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
203Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Usage,
204Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Usage = value!,
211AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Usage", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.UsageDetails), global::System.Array.Empty<global::System.Type>(), null),
221DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
223Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ContinuationToken,
224Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ContinuationToken = value!,
231AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ContinuationToken", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ResponseContinuationToken), global::System.Array.Empty<global::System.Type>(), null),
241DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
251AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null),
261DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
263Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).AdditionalProperties,
264Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).AdditionalProperties = value!,
271AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null),
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.ScenarioRunResult.g.cs (7)
34ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult((string)args[0], (string)args[1], (string)args[2], (global::System.DateTime)args[3], (global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>)args[4], (global::Microsoft.Extensions.AI.ChatResponse)args[5], (global::Microsoft.Extensions.AI.Evaluation.EvaluationResult)args[6], (global::Microsoft.Extensions.AI.Evaluation.Reporting.ChatDetails)args[7], (global::System.Collections.Generic.IList<string>)args[8], (int?)args[9]),
37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string), typeof(global::System.DateTime), typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>), typeof(global::Microsoft.Extensions.AI.ChatResponse), typeof(global::Microsoft.Extensions.AI.Evaluation.EvaluationResult), typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ChatDetails), typeof(global::System.Collections.Generic.IList<string>), typeof(int?)}, modifiers: null),
161var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.ChatResponse>
176AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetProperty("ModelResponse", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ChatResponse), global::System.Array.Empty<global::System.Type>(), null),
179properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.ChatResponse>(options, info5);
302global::Microsoft.Extensions.AI.ChatResponse __value_ModelResponse = ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)value).ModelResponse;
391ParameterType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (58)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.ChatResponse.g.cs (50)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse>? _ChatResponse;
21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> ChatResponse
24get => _ChatResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.ChatResponse));
27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> Create_ChatResponse(global::System.Text.Json.JsonSerializerOptions options)
29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.ChatResponse>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> jsonTypeInfo))
31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.ChatResponse>
37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.ChatResponse>(options, objectInfo);
58DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
60Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Messages,
61Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Messages = value!,
68AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Messages", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>), global::System.Array.Empty<global::System.Type>(), null),
80DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
90AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Text", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
101DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
103Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ResponseId,
104Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ResponseId = value!,
111AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
121DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
123Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ConversationId,
124Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ConversationId = value!,
131AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ConversationId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
141DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
143Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ModelId,
144Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ModelId = value!,
151AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
161DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
163Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).CreatedAt,
164Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).CreatedAt = value!,
171AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("CreatedAt", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset?), global::System.Array.Empty<global::System.Type>(), null),
181DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
183Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).FinishReason,
184Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).FinishReason = value!,
191AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("FinishReason", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ChatFinishReason?), global::System.Array.Empty<global::System.Type>(), null),
201DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
203Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Usage,
204Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Usage = value!,
211AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Usage", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.UsageDetails), global::System.Array.Empty<global::System.Type>(), null),
221DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
223Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ContinuationToken,
224Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ContinuationToken = value!,
231AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ContinuationToken", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ResponseContinuationToken), global::System.Array.Empty<global::System.Type>(), null),
241DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
251AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null),
261DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
263Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).AdditionalProperties,
264Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).AdditionalProperties = value!,
271AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null),
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.ScenarioRunResult.g.cs (7)
34ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult((string)args[0], (string)args[1], (string)args[2], (global::System.DateTime)args[3], (global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>)args[4], (global::Microsoft.Extensions.AI.ChatResponse)args[5], (global::Microsoft.Extensions.AI.Evaluation.EvaluationResult)args[6], (global::Microsoft.Extensions.AI.Evaluation.Reporting.ChatDetails)args[7], (global::System.Collections.Generic.IList<string>)args[8], (int?)args[9]),
37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string), typeof(global::System.DateTime), typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>), typeof(global::Microsoft.Extensions.AI.ChatResponse), typeof(global::Microsoft.Extensions.AI.Evaluation.EvaluationResult), typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ChatDetails), typeof(global::System.Collections.Generic.IList<string>), typeof(int?)}, modifiers: null),
161var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.AI.ChatResponse>
176AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult).GetProperty("ModelResponse", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ChatResponse), global::System.Array.Empty<global::System.Type>(), null),
179properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.AI.ChatResponse>(options, info5);
302global::Microsoft.Extensions.AI.ChatResponse __value_ModelResponse = ((global::Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRunResult)value).ModelResponse;
391ParameterType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (4)
Microsoft.Extensions.AI.Evaluation.Safety (11)
Microsoft.Extensions.AI.Integration.Tests (53)
ChatClientIntegrationTests.cs (33)
56var response = await ChatClient.GetResponseAsync("What's the biggest animal?");
66var response = await ChatClient.GetResponseAsync(
84var response = await ChatClient.GetResponseAsync(
121var response = await ChatClient.GetResponseAsync("Explain in 10 words how AI works");
181var response = await ChatClient.GetResponseAsync(
199var response = await ChatClient.GetResponseAsync(
234var response = await chatClient.GetResponseAsync(messages, new()
250var response = await chatClient.GetResponseAsync("What is the result of SecretComputation on 42 and 84?", new()
302var response = await chatClient.GetResponseAsync(messages, new()
334var response = await chatClient.GetResponseAsync(messages, new()
366var response = await chatClient.GetResponseAsync(messages, new()
376private static void AssertUsageAgainstActivities(ChatResponse response, List<Activity> activities)
507var response = await chatClient.GetResponseAsync("Briefly, what is the most popular tower in Paris?", options);
573var response = await chatClient.GetResponseAsync("How much older is Elsa than Anna? Return the age difference as a single number.", new()
605var response = await chatClient.GetResponseAsync("Are birds real?", new()
626var response = await chatClient.GetResponseAsync("What's the current secret number?", new()
641var firstResponse = await ChatClient.GetResponseAsync([message]);
643var secondResponse = await ChatClient.GetResponseAsync([message]);
657var firstResponse = await chatClient.GetResponseAsync([message]);
662var secondResponse = await chatClient.GetResponseAsync([message]);
668var thirdResponse = await chatClient.GetResponseAsync([message]);
734var response = await chatClient.GetResponseAsync([message]);
741var secondResponse = await chatClient.GetResponseAsync([message]);
773var response = await chatClient.GetResponseAsync([message]);
781var secondResponse = await chatClient.GetResponseAsync([message]);
815var response = await chatClient.GetResponseAsync([message]);
824var secondResponse = await chatClient.GetResponseAsync([message]);
941var response = await chatClient.GetResponseAsync([new(ChatRole.User, "What's the biggest animal?")]);
1146var response = await chatClient.GetResponseAsync(messages);
1189var response = await chatClient.GetResponseAsync(messages);
1247var response = await chatClient.GetResponseAsync(messages, new() { Tools = [getWeather] });
1329var response = await chatClient.GetResponseAsync(messages);
1383public Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
ImageGeneratingChatClientIntegrationTests.cs (14)
69protected async Task<ChatResponse> GetResponseAsync(bool useStreaming, IEnumerable<ChatMessage> messages, ChatOptions? options = null, IChatClient? chatClient = null)
82static ChatResponse ValidateChatResponse(ChatResponse response)
127var response = await GetResponseAsync(useStreaming,
165var response = await GetResponseAsync(useStreaming,
199var firstResponse = await GetResponseAsync(useStreaming, chatHistory, chatOptions);
204var secondResponse = await GetResponseAsync(useStreaming, chatHistory, chatOptions);
249var firstResponse = await GetResponseAsync(useStreaming, chatHistory, chatOptions);
254var secondResponse = await GetResponseAsync(useStreaming, chatHistory, chatOptions);
259var thirdResponse = await GetResponseAsync(useStreaming, chatHistory, chatOptions);
294var firstResponse = await GetResponseAsync(useStreaming, chatHistory, chatOptions);
299var secondResponse = await GetResponseAsync(useStreaming, chatHistory, chatOptions);
304var thirdResponse = await GetResponseAsync(useStreaming, chatHistory, chatOptions);
340var response = await GetResponseAsync(useStreaming,
Microsoft.Extensions.AI.OllamaSharp.Integration.Tests (3)
Microsoft.Extensions.AI.OpenAI (20)
Microsoft.Extensions.AI.OpenAI.Tests (131)
OpenAIConversionTests.cs (20)
893ChatResponse response = cc.AsChatResponse();
924var response = updates.ToChatResponse();
1513Assert.Throws<ArgumentNullException>("response", () => ((ChatResponse)null!).AsOpenAIChatCompletion());
1519var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant,
1558var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Hello"));
1566var emptyResponse = new ChatResponse([]);
1588var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant,
1633var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Test"))
1656var chatResponse = new ChatResponse(new ChatMessage(inputRole, "Test"));
1975Assert.Throws<ArgumentNullException>("response", () => ((ChatResponse)null!).AsOpenAIResponseResult());
1994var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Test"))
2007var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Hello, world!"))
2032var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Test message"))
2064var chatResponse = new ChatResponse([])
2091var chatResponse = new ChatResponse(messages)
2128var chatResponse = new ChatResponse(messages)
2159var chatResponse = new ChatResponse(messages)
2181var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Default test"));
2199var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Model test"));
2214var chatResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "Model priority test"))
OpenAIResponseClientIntegrationTests.cs (24)
38var response = await ChatClient.GetResponseAsync("Use the code interpreter to calculate the square root of 42. Return only the nearest integer value and no other text.", new()
82var response = await ChatClient.GetResponseAsync(
156ChatResponse response = streaming
196ChatResponse response = await CreateChatClient()!.GetResponseAsync("Which tools are available on the wiki_tools MCP server?", chatOptions);
228ChatResponse response = streaming ?
268ChatResponse response = streaming ?
331ChatResponse response = await ChatClient.GetResponseAsync(
362var response = await ChatClient.GetResponseAsync("What's the biggest animal?", chatOptions);
395var response = await chatClient.GetResponseAsync("What time is it?", chatOptions);
533ChatResponse response = streaming ?
572var response = await client.GetResponseAsync("What is 25 plus 17? Use the AddNumbers function.", chatOptions);
596var response = await client.GetResponseAsync("What's the weather in Seattle? Use GetWeather.", chatOptions);
620var response = await client.GetResponseAsync("Call GetDotnetLogo and tell me what you see in the image.", chatOptions);
645var response = await client.GetResponseAsync("Call GetDocument and tell me what text is in the PDF.", chatOptions);
673var response = await client.GetResponseAsync("Call AnalyzeImage and describe what you see.", chatOptions);
708var response1 = await ChatClient.GetResponseAsync(chatHistory, chatOptions);
726var response2 = await ChatClient.GetResponseAsync(chatHistory, chatOptions);
745var response3 = await ChatClient.GetResponseAsync(deserializedHistory, chatOptions);
789var response1 = await ChatClient.GetStreamingResponseAsync(chatHistory, chatOptions).ToChatResponseAsync();
807var response2 = await ChatClient.GetStreamingResponseAsync(chatHistory, chatOptions).ToChatResponseAsync();
826var response3 = await ChatClient.GetStreamingResponseAsync(deserializedHistory, chatOptions).ToChatResponseAsync();
862var response = await client.GetResponseAsync(
966var response = await client.GetResponseAsync(
1009var response = await client.GetResponseAsync(
OpenAIResponseClientTests.cs (69)
153var response = await client.GetResponseAsync("hello", new()
897var response = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "Search the web for the temperature today in Fremont")], chatOptions);
1088var response = await client.GetResponseAsync("hello", new()
1265var response = await client.GetResponseAsync("hello", chatOptions);
1361var response = await client.GetResponseAsync("hello", new()
1495var response = await client.GetResponseAsync(
1616var response = await client.GetResponseAsync(
1768var response = await client.GetResponseAsync(messages);
1995var response = await client.GetResponseAsync("Tell me the path to the README.md file for Microsoft.Extensions.AI.Abstractions in the dotnet/extensions repository", chatOptions);
2405var response = await client.GetStreamingResponseAsync("Tell me the path to the README.md file for Microsoft.Extensions.AI.Abstractions in the dotnet/extensions repository", chatOptions)
2615var response = await client.GetResponseAsync("Test error handling", chatOptions);
2724var response = await client.GetResponseAsync("hello", new ChatOptions { Tools = [mcpTool] });
2814var response = await client.GetResponseAsync("hello", new ChatOptions { Tools = [mcpTool] });
2876var response = await client.GetResponseAsync("hello", new()
2967var response = await client.GetResponseAsync([], new()
3384var response = await client.GetResponseAsync("Calculate the sum of numbers from 1 to 5", new()
3604var response = await client.GetStreamingResponseAsync("Calculate the sum of numbers from 1 to 10 using Python", new()
3734var response = updates.ToChatResponse();
3812var response = await client.GetResponseAsync("hello", new()
3870var response = await client.GetResponseAsync("hello", new()
3929var response = await client.GetResponseAsync("hello", new()
3990var response = await client.GetResponseAsync("hello", new()
4052var response = await client.GetResponseAsync("hello", new()
4115var response = await client.GetResponseAsync("hello", new()
4340var response = await client.GetResponseAsync("hello", new()
4631var response = await client.GetResponseAsync("hello", new()
4692var response = await client.GetResponseAsync("hello", new()
4821var response = await client.GetResponseAsync([
4877var response = await client.GetResponseAsync([
4939var response = await client.GetResponseAsync([
4996var response = await client.GetResponseAsync([
5053var response = await client.GetResponseAsync([
5112var response = await client.GetResponseAsync([
5175var response = await client.GetResponseAsync([
5230var response = await client.GetResponseAsync([
5285var response = await client.GetResponseAsync([
5342var response = await client.GetResponseAsync([
5399var response = await client.GetResponseAsync([
5436var response = await client.GetResponseAsync("test");
5468var response = await client.GetResponseAsync("test");
5512var response = await client.GetResponseAsync("test");
5568var response = await client.GetResponseAsync([
5613var response = await client.GetResponseAsync("test");
6083var response = updates.ToChatResponse();
6128var response = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "")]);
6169var response = await client.GetResponseAsync("harmful request");
6223var response = await client.GetResponseAsync("What is in this image?");
6286var response = await client.GetResponseAsync("What is in this image?");
6368var response = await client.GetResponseAsync("Generate an image of a cat", new ChatOptions
6845var response = await client.GetResponseAsync("Create a hello world file", new()
7127var response = await client.GetResponseAsync("What is the latest news about .NET?", new()
7300var response = updates.ToChatResponse();
7364var response = await client.GetResponseAsync("hello", new()
7451var response = await client.GetResponseAsync("hello", new()
7543var response = await client.GetResponseAsync("hello", new()
7610var response = await client.GetResponseAsync("hello", new()
7720var response = await client.GetResponseAsync("hello", new()
7820var response = await client.GetResponseAsync("hello", new()
7925var response = await client.GetResponseAsync("hello", new()
8025var response = await client.GetResponseAsync("hello", new()
8112var response = await client.GetResponseAsync("hello", new()
8203var response = await client.GetResponseAsync("hello", new()
8289var response = await client.GetResponseAsync("hello", new()
8402var response = await client.GetResponseAsync("hello", new()
8501var response = await client.GetResponseAsync("hello", new()
8605var response = await client.GetResponseAsync("hello", new()
8718var response = await client.GetResponseAsync("hello", new()
8836var response = await client.GetResponseAsync(
8946var response = updates.ToChatResponse();
Microsoft.Extensions.AI.Tests (183)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (10)
23var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, JsonSerializer.Serialize(expectedResult, JsonContext2.Default.Animal)))
100var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, JsonSerializer.Serialize(expectedResult, JsonContext2.Default.Options)))
161var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, JsonSerializer.Serialize(expectedResult, JsonContext2.Default.Options)));
196var expectedResponse = new ChatResponse(
239var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "This is not valid JSON"));
258var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, "null"));
277var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, [new UriContent("https://example.com", "image/*")]));
297var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, JsonSerializer.Serialize(expectedResult, JsonContext2.Default.Options)));
332var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, JsonSerializer.Serialize(payload, JsonContext2.Default.Options)));
364var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, JsonSerializer.Serialize(expectedResult, jso)));
ChatCompletion\FunctionInvokingChatClientTests.cs (38)
419ChatResponse response;
498ChatResponse response;
582ChatResponse response;
1212var response = await client.GetStreamingResponseAsync(messages, options, CancellationToken.None).ToChatResponseAsync();
1254ChatResponse response = await client.GetResponseAsync(messages, options);
1379var result = await chatClient.GetResponseAsync(messages, chatOptions);
1404Func<IEnumerable<ChatMessage>, ChatOptions?, CancellationToken, ChatResponse> callback =
2055ChatResponse response = streaming
2126ChatResponse response = streaming
2174var response = await client2.GetResponseAsync([new ChatMessage(ChatRole.User, "hello")], options);
2234var result = await service.GetResponseAsync(new EnumeratedOnceEnumerable<ChatMessage>(chat), options, cts.Token);
2298var result = await service.GetStreamingResponseAsync(new EnumeratedOnceEnumerable<ChatMessage>(chat), options, cts.Token).ToChatResponseAsync();
2433var result = await client.GetStreamingResponseAsync([new ChatMessage(ChatRole.User, "test")], options).ToChatResponseAsync();
2438var result = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "test")], options);
2527var result = await client.GetStreamingResponseAsync([new ChatMessage(ChatRole.User, "test")], options).ToChatResponseAsync();
2536var result = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "test")], options);
2632var result = await client.GetStreamingResponseAsync([new ChatMessage(ChatRole.User, "test")], options).ToChatResponseAsync();
2642var result = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "test")], options);
2737var result = await client.GetStreamingResponseAsync([new ChatMessage(ChatRole.User, "test")], options).ToChatResponseAsync();
2745var result = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "test")], options);
2837var result = await client.GetStreamingResponseAsync([new ChatMessage(ChatRole.User, "test")], options).ToChatResponseAsync();
2847var result = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "test")], options);
2920var result = await client.GetStreamingResponseAsync([new ChatMessage(ChatRole.User, "test")], options).ToChatResponseAsync();
2925var result = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "test")], options);
3012var result = await client.GetStreamingResponseAsync([new ChatMessage(ChatRole.User, "test")], options).ToChatResponseAsync();
3021var result = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "test")], options);
3113var result = await client.GetStreamingResponseAsync([new ChatMessage(ChatRole.User, "test")], options).ToChatResponseAsync();
3123var result = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "test")], options);
3219var result = await client.GetStreamingResponseAsync([new ChatMessage(ChatRole.User, "test")], options).ToChatResponseAsync();
3230var result = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "test")], options);
3480var response = new ChatResponse(
3491ChatResponse response = streaming
3551var response = new ChatResponse(
3560var response = new ChatResponse(new ChatMessage(ChatRole.Assistant, "done"));
3568ChatResponse response = streaming
3618var response = new ChatResponse(new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1")]));
3623var response = new ChatResponse(new ChatMessage(ChatRole.Assistant, "done"));
3631ChatResponse response = streaming
ChatCompletion\ImageGeneratingChatClientTests.cs (6)
52var response = await client.GetResponseAsync([new(ChatRole.User, "test")], chatOptions);
89var response = await client.GetResponseAsync([new(ChatRole.User, "test")], chatOptions);
137var response = await client.GetResponseAsync([new(ChatRole.User, "test")], chatOptions);
269var response = await client.GetResponseAsync([new(ChatRole.User, "test")], null);
331var response = await client.GetResponseAsync([new(ChatRole.User, "test")], chatOptions);
426var response = await client.GetResponseAsync([new(ChatRole.User, "test")], chatOptions);
ChatCompletion\UseDelegateChatClientTests.cs (6)
67ChatResponse response = await client.GetResponseAsync(expectedMessages, expectedOptions, expectedCts.Token);
102var cc = await innerClient.GetResponseAsync(messages, options, cancellationToken);
110ChatResponse response = await client.GetResponseAsync(expectedMessages, expectedOptions, expectedCts.Token);
161ChatResponse response = await client.GetResponseAsync(expectedMessages, expectedOptions, expectedCts.Token);
205var cc = await innerClient.GetResponseAsync(messages, options, cancellationToken);
232ChatResponse response = await client.GetResponseAsync(expectedMessages, expectedOptions, expectedCts.Token);
ChatRouting\FailoverChatClientTests.cs (20)
57Task<ChatResponse> operation = streaming
81Task<ChatResponse> operation = streaming
105Task<ChatResponse> operation = streaming
257ChatResponse expected = new(new ChatMessage(ChatRole.Assistant, "ok"));
275ChatResponse response = streaming
367ChatResponse expected = new(new ChatMessage(ChatRole.Assistant, "ok"));
395ChatResponse response = await router.GetResponseAsync([new(ChatRole.User, "hi")]);
432ChatResponse expected = new(new ChatMessage(ChatRole.Assistant, "ok"));
446ChatResponse response = await router.GetResponseAsync([new(ChatRole.User, "hi")]);
486GetResponseAsyncCallback = (_, _, _) => Task.FromResult<ChatResponse>(null!),
502ChatResponse? response = await router.GetResponseAsync([new(ChatRole.User, "hi")]);
651ChatResponse response =
743ChatResponse expected = new(new ChatMessage(ChatRole.Assistant, "ok"));
758ChatResponse response = await client.GetResponseAsync([new(ChatRole.User, "hi")]);
782ChatResponse response =
810ChatResponse response =
861ChatResponse response =
884ChatResponse response =
915ChatResponse response =
1003ChatResponse response =
Generated\361d1da7f942c932\TestJsonSerializerContext.ChatResponse.g.cs (50)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse>? _ChatResponse;
19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> ChatResponse
22get => _ChatResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.ChatResponse));
25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> Create_ChatResponse(global::System.Text.Json.JsonSerializerOptions options)
27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.ChatResponse>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.ChatResponse> jsonTypeInfo))
29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.ChatResponse>
35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.ChatResponse>(options, objectInfo);
56DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
58Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Messages,
59Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Messages = value!,
66AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Messages", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.Extensions.AI.ChatMessage>), global::System.Array.Empty<global::System.Type>(), null),
78DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
88AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Text", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
99DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
101Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ResponseId,
102Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ResponseId = value!,
109AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ResponseId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
119DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
121Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ConversationId,
122Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ConversationId = value!,
129AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ConversationId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
139DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
141Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ModelId,
142Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ModelId = value!,
149AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ModelId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
159DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
161Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).CreatedAt,
162Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).CreatedAt = value!,
169AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("CreatedAt", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset?), global::System.Array.Empty<global::System.Type>(), null),
179DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
181Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).FinishReason,
182Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).FinishReason = value!,
189AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("FinishReason", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ChatFinishReason?), global::System.Array.Empty<global::System.Type>(), null),
199DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
201Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Usage,
202Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).Usage = value!,
209AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("Usage", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.UsageDetails), global::System.Array.Empty<global::System.Type>(), null),
219DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
221Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ContinuationToken,
222Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).ContinuationToken = value!,
229AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("ContinuationToken", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.ResponseContinuationToken), global::System.Array.Empty<global::System.Type>(), null),
239DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
249AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("RawRepresentation", InstanceMemberBindingFlags, null, typeof(object), global::System.Array.Empty<global::System.Type>(), null),
259DeclaringType = typeof(global::Microsoft.Extensions.AI.ChatResponse),
261Getter = static obj => ((global::Microsoft.Extensions.AI.ChatResponse)obj).AdditionalProperties,
262Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.ChatResponse)obj).AdditionalProperties = value!,
269AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.ChatResponse).GetProperty("AdditionalProperties", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.AI.AdditionalPropertiesDictionary), global::System.Array.Empty<global::System.Type>(), null),
Microsoft.Extensions.DataIngestion.Tests (7)
Microsoft.ML.GenAI.Core (1)
Microsoft.ML.GenAI.LLaMA (1)
Microsoft.ML.GenAI.Phi (1)