export interface CachedResponse { promptText: string hasImage: boolean xml: string } export const CACHED_EXAMPLE_RESPONSES: CachedResponse[] = [ { promptText: "Give me a **animated connector** diagram of transformer's architecture", hasImage: false, xml: ` `, }, { promptText: "Replicate this in aws style", hasImage: true, xml: ` `, }, { promptText: "Replicate this flowchart.", hasImage: true, xml: ` `, }, { promptText: "Draw a cat for me", hasImage: false, xml: ` `, }, ] export function findCachedResponse( promptText: string, hasImage: boolean, ): CachedResponse | undefined { return CACHED_EXAMPLE_RESPONSES.find( (c) => c.promptText === promptText && c.hasImage === hasImage && c.xml !== "", ) }