mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
Remove commented unused code - unlikely to interface productively with other langchain components, even if implemented
This commit is contained in:
@@ -86,18 +86,8 @@ class ChatGooglePaLM_ChatModels implements INode {
|
|||||||
'while a top-k of 3 means that the next token is selected from ' +
|
'while a top-k of 3 means that the next token is selected from ' +
|
||||||
'among the 3 most probable tokens (using temperature).'
|
'among the 3 most probable tokens (using temperature).'
|
||||||
}
|
}
|
||||||
/*
|
// 'The "examples" field should contain a list of pairs of strings to use as prior turns for this conversation.'
|
||||||
{
|
// NB: While 'examples:[]' exists in langchain.ts backend, it is unlikely to be actually used there, since ChatOpenAI doesn't support it
|
||||||
label: 'Examples',
|
|
||||||
name: 'examplesObj',
|
|
||||||
type: 'json',
|
|
||||||
optional: true,
|
|
||||||
additionalParams: true
|
|
||||||
//default: { list:[] },
|
|
||||||
//description:
|
|
||||||
// 'The "examples" field should contain a list of pairs of strings to use as prior turns for this conversation.'
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +96,6 @@ class ChatGooglePaLM_ChatModels implements INode {
|
|||||||
const temperature = nodeData.inputs?.temperature as string
|
const temperature = nodeData.inputs?.temperature as string
|
||||||
const topP = nodeData.inputs?.topP as string
|
const topP = nodeData.inputs?.topP as string
|
||||||
const topK = nodeData.inputs?.topK as string
|
const topK = nodeData.inputs?.topK as string
|
||||||
//const examplesObj = nodeData.inputs?.examplesObj
|
|
||||||
|
|
||||||
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
|
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
|
||||||
const googleMakerSuiteKey = getCredentialParam('googleMakerSuiteKey', credentialData, nodeData)
|
const googleMakerSuiteKey = getCredentialParam('googleMakerSuiteKey', credentialData, nodeData)
|
||||||
@@ -120,18 +109,6 @@ class ChatGooglePaLM_ChatModels implements INode {
|
|||||||
if (topP) obj.topP = parseFloat(topP)
|
if (topP) obj.topP = parseFloat(topP)
|
||||||
if (topK) obj.topK = parseFloat(topK)
|
if (topK) obj.topK = parseFloat(topK)
|
||||||
|
|
||||||
/*
|
|
||||||
let parsedExamples: any | undefined = undefined
|
|
||||||
if (examplesObj) {
|
|
||||||
try {
|
|
||||||
parsedExamples = typeof examplseObj === 'object' ? examplseObj : JSON.parse(examplseObj)
|
|
||||||
obj.examples = parsedExamples.examples || []
|
|
||||||
} catch (exception) {
|
|
||||||
throw new Error("Invalid JSON in the GooglePaLM's examplseObj: " + exception)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
const model = new ChatGooglePaLM(obj)
|
const model = new ChatGooglePaLM(obj)
|
||||||
return model
|
return model
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user