neokd / NeoGPT

Chat effortlessly, execute commands, and interpret code with Llama3, Phi3, and more - your local AI assistant. Enjoy seamless interaction while ensuring ultimate privacy
https://neogpt.dev
MIT License
68 stars 62 forks source link

Add token counting functionality to magic_commands.py #194

Closed ayushmorbar closed 4 months ago

ayushmorbar commented 4 months ago

This pull request adds a new feature to the magic_commands.py file that allows users to calculate the number of tokens in a given prompt. The functionality is implemented using the Tiktoken library and includes a new command "/tokens [prompt]". This feature enhances the usability of the chatbot by providing users with information about the token count in their prompts.

refer #189