Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add Token Estimation before executing the request #196

@MrunmayS

Description

@MrunmayS
  • encode: This encodes the text passed in, using the model-specific tokenizer.
  • decode: This decodes the tokens passed in, using the model-specific tokenizer.
  • token_counter: This returns the number of tokens for a given input - it uses the tokenizer based on the model, and defaults to tiktoken if no model-specific tokenizer is available. Jump to code

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions