4 references to SerializeToElement
Microsoft.Extensions.AI (2)
ChatCompletion\ChatClientStructuredOutputExtensions.cs (1)
144schema = JsonSerializer.SerializeToElement(new JsonObject
Functions\AIFunctionFactory.cs (1)
322return JsonSerializer.SerializeToElement(result, _returnTypeInfo);
Microsoft.Extensions.AI.Ollama (2)
OllamaChatClient.cs (2)
426Arguments = JsonSerializer.SerializeToElement(fcc.Arguments, ToolCallJsonSerializerOptions.GetTypeInfo(typeof(IDictionary<string, object?>))), 434JsonElement jsonResult = JsonSerializer.SerializeToElement(frc.Result, ToolCallJsonSerializerOptions.GetTypeInfo(typeof(object)));