mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
update cacheValue to capture other outputs object
This commit is contained in:
@@ -191,7 +191,7 @@ export class CustomChainHandler extends BaseCallbackHandler {
|
||||
Callback Order is "Chain Start -> Chain End" for cached responses.
|
||||
*/
|
||||
if (this.cachedResponse) {
|
||||
const cachedValue = outputs.text as string
|
||||
const cachedValue: string = outputs.text ?? outputs.response ?? outputs.output ?? ''
|
||||
//split at whitespace, and keep the whitespace. This is to preserve the original formatting.
|
||||
const result = cachedValue.split(/(\s+)/)
|
||||
result.forEach((token: string, index: number) => {
|
||||
|
||||
Reference in New Issue
Block a user