kagisearch / pyllms

Minimal Python library to connect to LLMs (OpenAI, Anthropic, AI21, Cohere, Aleph Alpha, HuggingfaceHub, Google PaLM2, with a built-in model performance benchmark.

Home Page:https://kagi.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug in count tokens in google

uripeled2 opened this issue · comments

In Google you are calculating the tokens by the length of the prompt and completion but it should be done with google count_message_tokens function/endpoint

Please make a PR :)