Closed
Description
The calculation method of the number of tokens in LLM is always related to LLM, as well as the maximum number of tokens.
However, in SearchClient, it is specified as the applicable token calculation method for OpenAI.
kernel-memory/dotnet/CoreLib/Search/SearchClient.cs
Lines 183 to 186 in a26407b
My idea is to extract int MaxTokens {get;}
and int TokenCount(string text)
together into ITextGeneration, so that providers of LLM can implement this part on their own.