28 references to TextContent
Microsoft.Extensions.AI (1)
ChatCompletion\CachingChatClient.cs (1)
130TextContent coalescedContent = new(null) // will patch the text after examining all items in the run
Microsoft.Extensions.AI.Abstractions (2)
ChatCompletion\ChatMessage.cs (1)
72Contents.Add(new TextContent(value));
ChatCompletion\StreamingChatCompletionUpdate.cs (1)
57Contents.Add(new TextContent(value));
Microsoft.Extensions.AI.Abstractions.Tests (13)
ChatCompletion\ChatMessageTests.cs (5)
71content.Add(new TextContent($"text-{i}")); 129new TextContent("text-1"), 130new TextContent("text-2"), 263new TextContent("content-1") 288new 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); 26TextContent c = new(null);
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIInferenceChatClient.cs (2)
110returnMessage.Contents.Add(new TextContent(choice.Message.Content) 183completionUpdate.Contents.Add(new TextContent(update)
Microsoft.Extensions.AI.Integration.Tests (2)
PromptBasedFunctionCallingChatClient.cs (2)
67message.Contents[itemIndex] = new TextContent( 74message.Contents[itemIndex] = new TextContent(
Microsoft.Extensions.AI.Ollama (2)
OllamaChatClient.cs (2)
140update.Contents.Add(new TextContent(message.Content) { ModelId = modelId }); 223contents.Insert(0, new TextContent(message.Content));
Microsoft.Extensions.AI.OpenAI (1)
OpenAIChatClient.cs (1)
544aiContent = new TextContent(contentPart.Text);
Microsoft.Extensions.AI.Tests (5)
ChatCompletion\FunctionInvokingChatClientTests.cs (5)
216new ChatMessage(ChatRole.Assistant, [new TextContent("extra"), new FunctionCallContent("callId1", "Func1"), new TextContent("stuff")]), 220new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } }), new TextContent("more")]), 228new ChatMessage(ChatRole.Assistant, [new TextContent("extra"), new TextContent("stuff")]),