1 write to _jsonSerializerOptions
Microsoft.Extensions.AI (1)
ChatCompletion\DistributedCachingChatClient.cs (1)
42
set =>
_jsonSerializerOptions
= Throw.IfNull(value);
11 references to _jsonSerializerOptions
Microsoft.Extensions.AI (11)
ChatCompletion\DistributedCachingChatClient.cs (11)
41
get =>
_jsonSerializerOptions
;
49
_jsonSerializerOptions
.MakeReadOnly();
53
return (ChatCompletion?)JsonSerializer.Deserialize(existingJson,
_jsonSerializerOptions
.GetTypeInfo(typeof(ChatCompletion)));
63
_jsonSerializerOptions
.MakeReadOnly();
67
return (IReadOnlyList<StreamingChatCompletionUpdate>?)JsonSerializer.Deserialize(existingJson,
_jsonSerializerOptions
.GetTypeInfo(typeof(IReadOnlyList<StreamingChatCompletionUpdate>)));
78
_jsonSerializerOptions
.MakeReadOnly();
80
var newJson = JsonSerializer.SerializeToUtf8Bytes(value,
_jsonSerializerOptions
.GetTypeInfo(typeof(ChatCompletion)));
89
_jsonSerializerOptions
.MakeReadOnly();
91
var newJson = JsonSerializer.SerializeToUtf8Bytes(value,
_jsonSerializerOptions
.GetTypeInfo(typeof(IReadOnlyList<StreamingChatCompletionUpdate>)));
101
_jsonSerializerOptions
.MakeReadOnly();
102
return CachingHelpers.GetCacheKey(values,
_jsonSerializerOptions
);