Skip to content

Calculate token consumption for OpenAI function definitions #160

@Pwuts

Description

@Pwuts
  • On 13 June, OpenAI introduced their new function calling API1
  • These functions are inserted into the prompt in a non-trivial format2
  • Neither openai-python nor tiktoken currently provide a function to calculate the expected token consumption of a set of function definitions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions