openedtech / edubot

GNU General Public License v3.0
16 stars 5 forks source link

Switch to tiktoken lib for token counting #16

Closed exciteabletom closed 1 year ago

exciteabletom commented 1 year ago

Sometimes context gets trimmed too much due to inaccurate token estimation.

We need to switch to OpenAI's tiktoken library for this.

@moodler This also will fix the issues with #11