Skip to content

Commit 079528d

Browse files
committed
📦 NEW: Variable support
1 parent f1e5fc3 commit 079528d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/langbase/src/pipes/pipes.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ export interface Message {
2222
tool_calls?: ToolCall[];
2323
}
2424

25+
export interface Variable {
26+
name: string;
27+
value: string;
28+
}
29+
2530
export interface GenerateOptions {
26-
messages: Message[];
31+
messages?: Message[];
32+
variables?: Variable[];
2733
}
2834

2935
interface ChoiceNonStream {
@@ -93,7 +99,7 @@ export class Pipe {
9399
): Promise<GenerateNonStreamResponse> {
94100
return this.request.post<GenerateNonStreamResponse>({
95101
endpoint: '/beta/generate',
96-
body: {options, stream: false},
102+
body: {...options, stream: false},
97103
stream: false,
98104
});
99105
}

0 commit comments

Comments
 (0)