fixed all the linting issues
This commit is contained in:
parent
06f933132b
commit
4a4c940dbd
|
|
@ -32,7 +32,7 @@ class ApiChain_Chains implements INode {
|
||||||
{
|
{
|
||||||
label: 'Document',
|
label: 'Document',
|
||||||
name: 'document',
|
name: 'document',
|
||||||
type: 'Document',
|
type: 'Document'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -61,16 +61,16 @@ class ApiChain_Chains implements INode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getOpenAPIChain = async (documents: Document[], llm: BaseLanguageModel, options: any = {}) => {
|
const getOpenAPIChain = async (documents: Document[], llm: BaseLanguageModel) => {
|
||||||
const texts = documents.map(({ pageContent }) => pageContent);
|
const texts = documents.map(({ pageContent }) => pageContent)
|
||||||
const apiResponsePrompt = new PromptTemplate({
|
const apiResponsePrompt = new PromptTemplate({
|
||||||
inputVariables: ["api_docs", "question", "api_url", "api_response"],
|
inputVariables: ['api_docs', 'question', 'api_url', 'api_response'],
|
||||||
template: "Given this {api_response} response for {api_url}. use the given response to answer this {question}",
|
template: 'Given this {api_response} response for {api_url}. use the given response to answer this {question}'
|
||||||
});
|
})
|
||||||
|
|
||||||
const chain = APIChain.fromLLMAndAPIDocs(llm, texts.toString(), {
|
const chain = APIChain.fromLLMAndAPIDocs(llm, texts.toString(), {
|
||||||
apiResponsePrompt,
|
apiResponsePrompt,
|
||||||
verbose: process.env.DEBUG === 'true' ? true : false,
|
verbose: process.env.DEBUG === 'true' ? true : false
|
||||||
})
|
})
|
||||||
return chain
|
return chain
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue