Skip to content

Commit

Permalink
Add usage to chat completion model
Browse files Browse the repository at this point in the history
  • Loading branch information
gradenr authored and stainless-app[bot] committed Mar 1, 2024
1 parent 4d6e95f commit 41691e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib/chat_completions_ext.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Manually curated models for streaming chat completions.
import { ChatCompletion } from '../resources/chat'

export interface ChatCompletionChunk {
id: string;
Expand All @@ -12,6 +13,8 @@ export interface ChatCompletionChunk {
object: 'chat.completion.chunk';

system_fingerprint?: string;

x_groq?: ChatCompletionChunk.XGroq;
}

export namespace ChatCompletionChunk {
Expand Down Expand Up @@ -66,6 +69,12 @@ export namespace ChatCompletionChunk {
content: Array<ChatCompletionTokenLogprob> | null;
}
}

export type XGroq = {
id?: string;
usage?: ChatCompletion.Usage;
error?: string;
}
}

export interface ChatCompletionTokenLogprob {
Expand Down

0 comments on commit 41691e1

Please sign in to comment.