12 writes to StopSequences
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\ChatOptions.cs (1)
89options.StopSequences = new List<string>(StopSequences);
Microsoft.Extensions.AI.Abstractions.Tests (2)
ChatCompletion\ChatOptionsTests.cs (2)
77options.StopSequences = stopSequences; 137options.StopSequences = stopSequences;
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
AzureAIInferenceChatClientTests.cs (1)
320StopSequences = ["great"],
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
50options.StopSequences ??= [];
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaChatClientTests.cs (1)
271StopSequences = ["great"],
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIChatClientTests.cs (1)
366StopSequences = ["great"],
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
118StopSequences = ["hello", "world"],
Microsoft.ML.GenAI.LLaMA (2)
Llama3CausalLMChatClient.cs (2)
40options.StopSequences = new List<string> { _eotToken }; 52options.StopSequences ??= [];
Microsoft.ML.GenAI.Phi (2)
Phi3\Phi3CausalLMChatClient.cs (2)
45options.StopSequences = [_eotToken]; 57options.StopSequences ??= [];
24 references to StopSequences
Microsoft.Extensions.AI (1)
ChatCompletion\OpenTelemetryChatClient.cs (1)
253if (options.StopSequences is IList<string> stopSequences)
Microsoft.Extensions.AI.Abstractions (3)
ChatCompletion\ChatOptions.cs (3)
67/// <see cref="StopSequences"/>, and <see cref="AdditionalProperties"/>, are shallow-cloned, meaning a new collection instance is created, 87if (StopSequences is not null) 89options.StopSequences = new List<string>(StopSequences);
Microsoft.Extensions.AI.Abstractions.Tests (6)
ChatCompletion\ChatOptionsTests.cs (6)
25Assert.Null(options.StopSequences); 40Assert.Null(clone.StopSequences); 91Assert.Same(stopSequences, options.StopSequences); 106Assert.Equal(stopSequences, clone.StopSequences); 161Assert.NotSame(stopSequences, deserialized.StopSequences); 162Assert.Equal(stopSequences, deserialized.StopSequences);
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
304if (options.StopSequences is { Count: > 0 } stopSequences)
Microsoft.Extensions.AI.Integration.Tests (2)
PromptBasedFunctionCallingChatClient.cs (2)
51if (!options.StopSequences.Contains("</tool_calls>")) 53options.StopSequences.Add("</tool_calls>");
Microsoft.Extensions.AI.Ollama (2)
OllamaChatClient.cs (2)
309if (options.StopSequences is { Count: > 0 }) 311(request.Options ??= new()).stop = [.. options.StopSequences];
Microsoft.Extensions.AI.OpenAI (1)
OpenAIChatClient.cs (1)
412if (options.StopSequences is { Count: > 0 } stopSequences)
Microsoft.ML.GenAI.Core (2)
CausalLMPipelineChatClient.cs (2)
40var stopSequences = options?.StopSequences ?? Array.Empty<string>(); 64var stopSequences = options?.StopSequences ?? Array.Empty<string>();
Microsoft.ML.GenAI.LLaMA (3)
Llama3CausalLMChatClient.cs (3)
34if (options.StopSequences != null) 36options.StopSequences.Add(_eotToken); 53options.StopSequences.Add(_eotToken);
Microsoft.ML.GenAI.Phi (3)
Phi3\Phi3CausalLMChatClient.cs (3)
39if (options.StopSequences != null) 41options.StopSequences.Add(_eotToken); 58options.StopSequences.Add(_eotToken);