rpaframework icon indicating copy to clipboard operation
rpaframework copied to clipboard

`RPA.OpenAI`: create a helper keyword for counting nr of tokens in a given string

Open tonnitommi opened this issue 2 years ago • 0 comments

LLM models have restricted token counts for input/output, and currently, in Robot Framework code, it's pretty tricky to get the token counts of prompts. A helper function that returns a token count of a given string would be amazing.

For example: ${tokens}= Get Token Count ${my_prompt}

tonnitommi avatar Jun 07 '23 15:06 tonnitommi