(systemPrompt: string)
| 21 | }; |
| 22 | |
| 23 | export function getRequiredStreamsForPrompt(systemPrompt: string): PseudoStreamType[] { |
| 24 | return Object.entries(STREAM_REQUIREMENTS_MAP) |
| 25 | .filter(([placeholder]) => new RegExp(`\\${placeholder}(?![A-Z_])`).test(systemPrompt)) |
| 26 | .map(([_, streamType]) => streamType); |
| 27 | } |
| 28 | |
| 29 | const activeLoops: Record<string, { |
| 30 | intervalId: number | null, |