enable streaming

This commit is contained in:
Henry
2023-05-22 17:16:21 +01:00
parent 0fb16c7849
commit e89785080b
29 changed files with 909 additions and 305 deletions
@@ -121,11 +121,13 @@ class OpenAI_LLMs implements INode {
const timeout = nodeData.inputs?.timeout as string
const batchSize = nodeData.inputs?.batchSize as string
const bestOf = nodeData.inputs?.bestOf as string
const streaming = nodeData.inputs?.streaming as boolean
const obj: Partial<OpenAIInput> & { openAIApiKey?: string } = {
temperature: parseInt(temperature, 10),
modelName,
openAIApiKey
openAIApiKey,
streaming: streaming ?? true
}
if (maxTokens) obj.maxTokens = parseInt(maxTokens, 10)