Skip to content

Commit 9021029

Browse files
authored
📦 NEW: Tool call types (#26)
* 📦 NEW: Tool call types * 👌 IMPROVE: Type * 📦 NEW: Function type
1 parent b2ed0d8 commit 9021029

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

packages/langbase/src/pipes/pipes.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,23 @@ import {Stream} from '../common/stream';
33

44
export type Role = 'user' | 'assistant' | 'system' | 'tool';
55

6+
export interface Function {
7+
name: string;
8+
arguments: string;
9+
}
10+
11+
export interface ToolCall {
12+
id: string;
13+
type: 'function';
14+
function: Function;
15+
}
16+
617
export interface Message {
718
role: Role;
8-
content: string;
19+
content: string | null;
20+
name?: string;
21+
tool_call_id?: string;
22+
tool_calls?: ToolCall[];
923
}
1024

1125
export interface GenerateOptions {

0 commit comments

Comments
 (0)