Closed eugene-graft closed 2 months ago
Hi @eugene-graft, please set preamble=""
on cl.chat
eg
cl.chat(message=message, model=model, preamble="").meta.billed_units.input_tokens
alternatively, you can use command-r
command-r-plus
. These models don't charge for the preamble.
This works, thank you
Hi Cohere team. Since the Generate API is deprecated I'm considering migration to a new Chat API. While testing a new API I found a significant difference for billed input tokens between the old and new APIs. I have not found anything relevant in the docs.
Consider an example below: A prompt (
message
) is 6 tokens long. The Generate API bills for 6 input tokens. Could you please explain why a new Chat API bills for 57 tokens given the input is the same?cohere SDK version:
5.5.5