32 references to TextContent
Microsoft.Extensions.AI.Abstractions (3)
ChatCompletion\ChatMessage.cs (1)
71Contents.Add(new TextContent(value));
ChatCompletion\StreamingChatCompletionUpdate.cs (1)
77Contents.Add(new TextContent(value));
ChatCompletion\StreamingChatCompletionUpdateExtensions.cs (1)
217contents[start] = new TextContent(coalescedText.ToString())
Microsoft.Extensions.AI.Abstractions.Tests (15)
ChatCompletion\ChatCompletionTests.cs (2)
241new TextContent("Hello, "), 243new TextContent("world!"),
ChatCompletion\ChatMessageTests.cs (5)
72content.Add(new TextContent($"text-{i}")); 130new TextContent("text-1"), 131new TextContent("text-2"), 264new TextContent("content-1") 284new TextContent("content-6")
ChatCompletion\StreamingChatCompletionUpdateTests.cs (6)
44update.Contents.Add(new TextContent("text")); 48IList<AIContent> newList = [new TextContent("text")]; 97new TextContent("text-1"), 98new TextContent("text-2"), 171new TextContent("text-1"), 175new TextContent("text-2"),
Contents\TextContentTests.cs (2)
16TextContent c = new(text); 25TextContent c = new(null);
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
183completionUpdate.Contents.Add(new TextContent(update));
Microsoft.Extensions.AI.Integration.Tests (3)
ChatClientIntegrationTests.cs (1)
149new TextContent("What does this logo say?"),
PromptBasedFunctionCallingChatClient.cs (2)
67message.Contents[itemIndex] = new TextContent( 74message.Contents[itemIndex] = new TextContent(
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
251contents.Insert(0, new TextContent(message.Content));
Microsoft.Extensions.AI.OpenAI (1)
OpenAIChatClient.cs (1)
547aiContent = new TextContent(contentPart.Text);
Microsoft.Extensions.AI.OpenAI.Tests (3)
OpenAIChatClientTests.cs (3)
456new(ChatRole.System, [new TextContent("You are a really nice friend."), new TextContent("Really nice.")]), 891new TextContent("hi, how are you?"),
Microsoft.Extensions.AI.Tests (5)
ChatCompletion\FunctionInvokingChatClientTests.cs (5)
272new ChatMessage(ChatRole.Assistant, [new TextContent("extra"), new FunctionCallContent("callId1", "Func1"), new TextContent("stuff")]), 276new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } }), new TextContent("more")]), 287new ChatMessage(ChatRole.Assistant, [new TextContent("extra"), new TextContent("stuff")]),