Module llm_chain::tokens

source ·
Expand description

Tokens Module

This module provides utilities for managing tokens in Language Learning Models (LLMs), primarily focusing on measuring the sizes of prompts. This is useful for ensuring that prompts stay within the context window size supported by a given model.

Structs

  • Represents a single token.
  • A type-safe, enum-backed collection of tokens.
  • Struct representing token count information, including the maximum tokens allowed and the total number of tokens used.

Enums

Traits