elm.ords.services.openai

ELM Ordinances OpenAI service amd utils.

Functions

count_tokens(messages, model)

Count the number of tokens in an outgoing set of messages.

usage_from_response(current_usage, response)

OpenAI usage parser.

Classes

OpenAIService(client[, rate_limit, rate_tracker])

OpenAI Chat GPT query service