-
-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hi guys,
I love your library—great job. However, I have some suggestions about the API you used in the last package.
Designing the API like this one is not really best way:
var encoder = ModelToEncoder.For("gpt-4o"); //
I suggest using intuitive object names and method names.
The following is widely more acceptably standard in the software industry for many reasons:
`var encoder = TokenEncoder.Create("gpt-4o");
or
var encoder = new TokenEncoder.For("gpt-4o");
You can also use the Tiktoken or Tiiktoken encoder. ModelEncoder is not an intuitive name. We are not encoding Models. Tokenizer is not a concept of model by its original paper. We should stay consistent with the references which we use.
Another suggestion related to providing the "string" ("gpt-xy") is ok, but some kind of enum or similar round string would be helpful.
var encoder = new TokenEncoder.For(Models.Gpt4o);
Hope this helps.