fixed the issue in init as well
This commit is contained in:
parent
0d46c0226e
commit
9cda188c73
|
|
@ -45,7 +45,7 @@ class OpenApiChain_Chains implements INode {
|
||||||
|
|
||||||
async init(nodeData: INodeData): Promise<any> {
|
async init(nodeData: INodeData): Promise<any> {
|
||||||
const model = nodeData.inputs?.model as ChatOpenAI
|
const model = nodeData.inputs?.model as ChatOpenAI
|
||||||
const headers = nodeData.inputs?.headers as Record<string, string>
|
const headers = nodeData.inputs?.headers as string
|
||||||
const yamlFileBase64 = nodeData.inputs?.yamlFile as string
|
const yamlFileBase64 = nodeData.inputs?.yamlFile as string
|
||||||
const splitDataURI = yamlFileBase64.split(',')
|
const splitDataURI = yamlFileBase64.split(',')
|
||||||
splitDataURI.pop()
|
splitDataURI.pop()
|
||||||
|
|
@ -53,7 +53,7 @@ class OpenApiChain_Chains implements INode {
|
||||||
const utf8String = bf.toString('utf-8')
|
const utf8String = bf.toString('utf-8')
|
||||||
const chain = await createOpenAPIChain(utf8String, {
|
const chain = await createOpenAPIChain(utf8String, {
|
||||||
llm: model,
|
llm: model,
|
||||||
headers
|
headers: typeof headers === 'object' ? headers : headers ? JSON.parse(headers) : {}
|
||||||
})
|
})
|
||||||
return chain
|
return chain
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue