Fix LangfusePromptGateway compile() to match langfuse SDK's Record<string,string> variable type

This commit is contained in:
2026-08-12 20:56:39 +02:00
parent cf3c12774f
commit bb479f7749

View File

@@ -19,7 +19,10 @@ export class LangfusePromptGateway implements PromptFetcher {
version: prompt.version,
config: (prompt.config ?? {}) as Record<string, unknown>,
compile: (variables) =>
prompt.compile(variables) as { role: 'system' | 'user' | 'assistant'; content: string }[],
prompt.compile(variables as Record<string, string>) as {
role: 'system' | 'user' | 'assistant';
content: string;
}[],
};
}
}