You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -108,15 +114,6 @@ public async Task<Embedding> GenerateEmbeddingAsync(string text, CancellationTok
108
114
/// <remarks>
109
115
/// It throws if text is null and Includes empty stop token because addBos is left true to be consistent with the CountTokens implementation.</remarks>
110
116
/// <see cref="CountTokens(string)"/>
111
-
publicIReadOnlyList<string>GetTokens(stringtext)
112
-
{
113
-
/* see relevant unit tests for important implementation notes regarding unicode */
@@ -128,14 +133,7 @@ private static InferenceParams OptionsToParams(TextGenerationOptions options, In
128
133
/// <remarks>
129
134
/// It throws if text is null and Includes empty stop token because addBos is left true to be consistent with the CountTokens implementation.</remarks>
130
135
/// <see cref="CountTokens(string)"/>
131
-
publicIReadOnlyList<string>GetTokens(stringtext)
132
-
{
133
-
/* see relevant unit tests for important implementation notes regarding unicode */
//TODO: the below does not work with the new memory efficient context handling - we probably need to define Microsoft.Extensions.AI.IEmbeddingGenerator GetService interface that creates the context on the fly
/// <param name="text">Input string to be tokenized</param>
180
+
/// <returns>Read-only list of tokens for the input test</returns>
181
+
/// <remarks>
182
+
/// It throws if text is null and Includes empty stop token because addBos is left true to be consistent with the CountTokens implementation.</remarks>
183
+
/// <see cref="CountTokens(string)"/>
184
+
publicIReadOnlyList<string>GetTokens(stringtext)
185
+
{
186
+
// Ensure the context from last time is disposed (it always should be)
0 commit comments