Closed CahidArda closed 1 month ago
Makes possible to define onContextFetched like:
onContextFetched
const response = await ragChat.chat(question.content, { streaming: true, onContextFetched: (context: PrepareChatResult["context"]) => { const result: PrepareChatResult["context"] = context.map(contextBit => { return { id: contextBit.id, data: JSON.stringify({ text: contextBit.data, url: contextBit.metadata.url }), metadata: contextBit.metadata } }) return result } } );
handled in #33
Makes possible to define
onContextFetched
like: