Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/openai/resources/beta/threads/mod.ts>Run.Usage

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
interface Run.Usage
import { type Run } from "https://deno.land/x/openai@v4.38.5/resources/beta/threads/mod.ts";
const { Usage } = Run;

Usage statistics related to the run. This value will be null if the run is not in a terminal state (i.e. in_progress, queued, etc.).

Properties

completion_tokens: number

Number of completion tokens used over the course of the run.

prompt_tokens: number

Number of prompt tokens used over the course of the run.

total_tokens: number

Total number of tokens used (prompt + completion).