2
0

🐛 Fix openai total tokens variable set when streaming

This commit is contained in:
Baptiste Arnaud
2024-07-17 14:47:12 +02:00
parent 0ee820b4da
commit c6645d4505
8 changed files with 72 additions and 45 deletions

View File

@ -13,6 +13,10 @@ export type VariableStore = {
}[]
}
export type AsyncVariableStore = Omit<VariableStore, 'set'> & {
set: (variableId: string, value: unknown) => Promise<void>
}
export type LogsStore = {
add: (
log:
@ -63,7 +67,7 @@ export type ActionDefinition<
run: (params: {
credentials: CredentialsFromAuthDef<A>
options: z.infer<BaseOptions> & z.infer<Options>
variables: VariableStore
variables: AsyncVariableStore
}) => Promise<{
stream?: ReadableStream<any>
httpError?: { status: number; message: string }