token_count_utils
autogen.token_count_utils.count_token
count_token
Count number of tokens used by an OpenAI model.
Name | Description |
---|---|
input | (str, list, dict): Input to the model. Type: str | list[str] | dict[str, typing.Any] |
model | (str): Model name. Type: str Default: ‘gpt-3.5-turbo-0613’ |
Type | Description |
---|---|
int | int: Number of tokens from the input. |