This commit is contained in:
Henry
2023-07-30 14:03:15 +01:00
parent 922bef7bf2
commit 27660b8ed3
@@ -116,16 +116,7 @@ const runPrediction = async (
*/
const promptValues = handleEscapeCharacters(promptValuesRaw, true)
if (inputVariables.length === 1) {
if (isStreaming) {
const handler = new CustomChainHandler(socketIO, socketIOClientId)
const res = await chain.run(input, [loggerHandler, handler])
return res
} else {
const res = await chain.run(input, [loggerHandler])
return res
}
} else if (inputVariables.length > 1) {
if (inputVariables.length > 0) {
let seen: string[] = []
for (const variable of inputVariables) {