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
We recently integrated Microsoft Word with LocalAI through a local Word Add-in. You can see a demo of the integration here. We're planning to add a feature that allows users to see how many tokens are left before calling '/v1/chat/completions'. The question is:
Is it possible for LocalAI to count the tokens of the prompt
before calling '/v1/chat/completions'? Any insights would be greatly appreciated.
For OpenAI models, this cookbook might be a direction. For other models with different tokenizers, it is not as clear how to implement such a function.
The text was updated successfully, but these errors were encountered:
We recently integrated Microsoft Word with LocalAI through a local Word Add-in. You can see a demo of the integration here. We're planning to add a feature that allows users to see how many tokens are left before calling '/v1/chat/completions'. The question is:
For OpenAI models, this cookbook might be a direction. For other models with different tokenizers, it is not as clear how to implement such a function.
The text was updated successfully, but these errors were encountered: