Skip to content

Commit

Permalink
updated types
Browse files Browse the repository at this point in the history
  • Loading branch information
nalbion committed Mar 12, 2024
1 parent 51989ec commit a24921e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/llm/message.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
// as per 'openai/resources/index.mjs'
export type ChatCompletionRole = 'system' | 'user' | 'assistant' | 'tool' | 'function';

export type LlmMessage = {
role: ChatCompletionRole;
content: string;
};
export type LlmMessage =
| {
role: ChatCompletionRole;
content: string;
}
| {
role: 'assistant';
content?: string;
name?: string;
tool_calls: ChatCompletionMessageToolCall[];
};

export type LlmRequestMessage =
| {
Expand Down

0 comments on commit a24921e

Please sign in to comment.