mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 13:01:14 +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.
|
Callback Order is "Chain Start -> Chain End" for cached responses.
|
||||||
*/
|
*/
|
||||||
if (this.cachedResponse) {
|
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.
|
//split at whitespace, and keep the whitespace. This is to preserve the original formatting.
|
||||||
const result = cachedValue.split(/(\s+)/)
|
const result = cachedValue.split(/(\s+)/)
|
||||||
result.forEach((token: string, index: number) => {
|
result.forEach((token: string, index: number) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user