Issue with UiPath: Token Limit Exceeded in Prompt

Hi Team,

I’m facing issues in UiPath where if the prompt we are passing exceeds 4097 tokens, the entire flow is stopped. Is there a way to check the total token count? Please advise on this.

@ydhanabalan

basically there are the set of words…

you can split the string with space and then get the count to check number of tokens

System.Text.RegularExpressions.Regex.Split(str,"\s"+).Count-1

cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.