Merge branch 'main' into bugfix/Weaviate-PDF
# Conflicts: # packages/components/package.json
This commit is contained in:
commit
93c24644d3
|
|
@ -23,9 +23,14 @@ A clear and concise description of what you expected to happen.
|
|||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Flow**
|
||||
If applicable, add exported flow in order to help replicating the problem.
|
||||
|
||||
**Setup**
|
||||
|
||||
- OS: [e.g. iOS, Windows, Linux]
|
||||
- Installation [e.g. docker, `npx flowise start`, `yarn start`]
|
||||
- Flowise Version [e.g. 1.2.11]
|
||||
- OS: [e.g. macOS, Windows, Linux]
|
||||
- Browser [e.g. chrome, safari]
|
||||
|
||||
**Additional context**
|
||||
|
|
|
|||
|
|
@ -49,9 +49,12 @@ class MultiPromptChain_Chains implements INode {
|
|||
promptTemplates.push(prompt.systemMessage)
|
||||
}
|
||||
|
||||
const chain = MultiPromptChain.fromPrompts(model, promptNames, promptDescriptions, promptTemplates, undefined, {
|
||||
verbose: process.env.DEBUG === 'true' ? true : false
|
||||
} as any)
|
||||
const chain = MultiPromptChain.fromLLMAndPrompts(model, {
|
||||
promptNames,
|
||||
promptDescriptions,
|
||||
promptTemplates,
|
||||
llmChainOpts: { verbose: process.env.DEBUG === 'true' ? true : false }
|
||||
})
|
||||
|
||||
return chain
|
||||
}
|
||||
|
|
@ -61,7 +64,7 @@ class MultiPromptChain_Chains implements INode {
|
|||
const obj = { input }
|
||||
|
||||
if (options.socketIO && options.socketIOClientId) {
|
||||
const handler = new CustomChainHandler(options.socketIO, options.socketIOClientId)
|
||||
const handler = new CustomChainHandler(options.socketIO, options.socketIOClientId, 2)
|
||||
const res = await chain.call(obj, [handler])
|
||||
return res?.text
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,12 @@ class MultiRetrievalQAChain_Chains implements INode {
|
|||
name: 'vectorStoreRetriever',
|
||||
type: 'VectorStoreRetriever',
|
||||
list: true
|
||||
},
|
||||
{
|
||||
label: 'Return Source Documents',
|
||||
name: 'returnSourceDocuments',
|
||||
type: 'boolean',
|
||||
optional: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -39,6 +45,8 @@ class MultiRetrievalQAChain_Chains implements INode {
|
|||
async init(nodeData: INodeData): Promise<any> {
|
||||
const model = nodeData.inputs?.model as BaseLanguageModel
|
||||
const vectorStoreRetriever = nodeData.inputs?.vectorStoreRetriever as VectorStoreRetriever[]
|
||||
const returnSourceDocuments = nodeData.inputs?.returnSourceDocuments as boolean
|
||||
|
||||
const retrieverNames = []
|
||||
const retrieverDescriptions = []
|
||||
const retrievers = []
|
||||
|
|
@ -49,23 +57,29 @@ class MultiRetrievalQAChain_Chains implements INode {
|
|||
retrievers.push(vs.vectorStore.asRetriever((vs.vectorStore as any).k ?? 4))
|
||||
}
|
||||
|
||||
const chain = MultiRetrievalQAChain.fromRetrievers(model, retrieverNames, retrieverDescriptions, retrievers, undefined, {
|
||||
verbose: process.env.DEBUG === 'true' ? true : false
|
||||
} as any)
|
||||
|
||||
const chain = MultiRetrievalQAChain.fromLLMAndRetrievers(model, {
|
||||
retrieverNames,
|
||||
retrieverDescriptions,
|
||||
retrievers,
|
||||
retrievalQAChainOpts: { verbose: process.env.DEBUG === 'true' ? true : false, returnSourceDocuments }
|
||||
})
|
||||
return chain
|
||||
}
|
||||
|
||||
async run(nodeData: INodeData, input: string, options: ICommonObject): Promise<string> {
|
||||
async run(nodeData: INodeData, input: string, options: ICommonObject): Promise<string | ICommonObject> {
|
||||
const chain = nodeData.instance as MultiRetrievalQAChain
|
||||
const returnSourceDocuments = nodeData.inputs?.returnSourceDocuments as boolean
|
||||
|
||||
const obj = { input }
|
||||
|
||||
if (options.socketIO && options.socketIOClientId) {
|
||||
const handler = new CustomChainHandler(options.socketIO, options.socketIOClientId)
|
||||
const handler = new CustomChainHandler(options.socketIO, options.socketIOClientId, 2, returnSourceDocuments)
|
||||
const res = await chain.call(obj, [handler])
|
||||
if (res.text && res.sourceDocuments) return res
|
||||
return res?.text
|
||||
} else {
|
||||
const res = await chain.call(obj)
|
||||
if (res.text && res.sourceDocuments) return res
|
||||
return res?.text
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,29 +35,33 @@ class ChatOpenAI_ChatModels implements INode {
|
|||
label: 'gpt-4',
|
||||
name: 'gpt-4'
|
||||
},
|
||||
{
|
||||
label: 'gpt-4-0314',
|
||||
name: 'gpt-4-0314'
|
||||
},
|
||||
{
|
||||
label: 'gpt-4-32k-0314',
|
||||
name: 'gpt-4-32k-0314'
|
||||
},
|
||||
{
|
||||
label: 'gpt-4-0613',
|
||||
name: 'gpt-4-0613'
|
||||
},
|
||||
{
|
||||
label: 'gpt-4-32k',
|
||||
name: 'gpt-4-32k'
|
||||
},
|
||||
{
|
||||
label: 'gpt-4-32k-0613',
|
||||
name: 'gpt-4-32k-0613'
|
||||
},
|
||||
{
|
||||
label: 'gpt-3.5-turbo',
|
||||
name: 'gpt-3.5-turbo'
|
||||
},
|
||||
{
|
||||
label: 'gpt-3.5-turbo-0301',
|
||||
name: 'gpt-3.5-turbo-0301'
|
||||
},
|
||||
{
|
||||
label: 'gpt-3.5-turbo-0613',
|
||||
name: 'gpt-3.5-turbo-0613'
|
||||
},
|
||||
{
|
||||
label: 'gpt-3.5-turbo-16k',
|
||||
name: 'gpt-3.5-turbo-16k'
|
||||
},
|
||||
{
|
||||
label: 'gpt-3.5-turbo-16k-0613',
|
||||
name: 'gpt-3.5-turbo-16k-0613'
|
||||
}
|
||||
],
|
||||
default: 'gpt-3.5-turbo',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,81 @@
|
|||
import { INode, INodeData, INodeParams } from '../../../src/Interface'
|
||||
import { FigmaFileLoader, FigmaLoaderParams } from 'langchain/document_loaders/web/figma'
|
||||
|
||||
class Figma_DocumentLoaders implements INode {
|
||||
label: string
|
||||
name: string
|
||||
description: string
|
||||
type: string
|
||||
icon: string
|
||||
category: string
|
||||
baseClasses: string[]
|
||||
inputs: INodeParams[]
|
||||
|
||||
constructor() {
|
||||
this.label = 'Figma'
|
||||
this.name = 'figma'
|
||||
this.type = 'Document'
|
||||
this.icon = 'figma.png'
|
||||
this.category = 'Document Loaders'
|
||||
this.description = 'Load data from a Figma file'
|
||||
this.baseClasses = [this.type]
|
||||
this.inputs = [
|
||||
{
|
||||
label: 'Access Token',
|
||||
name: 'accessToken',
|
||||
type: 'password',
|
||||
placeholder: '<FIGMA_ACCESS_TOKEN>'
|
||||
},
|
||||
{
|
||||
label: 'File Key',
|
||||
name: 'fileKey',
|
||||
type: 'string',
|
||||
placeholder: 'key'
|
||||
},
|
||||
{
|
||||
label: 'Node IDs',
|
||||
name: 'nodeIds',
|
||||
type: 'string',
|
||||
placeholder: '0, 1, 2'
|
||||
},
|
||||
{
|
||||
label: 'Recursive',
|
||||
name: 'recursive',
|
||||
type: 'boolean',
|
||||
optional: true
|
||||
},
|
||||
{
|
||||
label: 'Text Splitter',
|
||||
name: 'textSplitter',
|
||||
type: 'TextSplitter',
|
||||
optional: true
|
||||
},
|
||||
{
|
||||
label: 'Metadata',
|
||||
name: 'metadata',
|
||||
type: 'json',
|
||||
optional: true,
|
||||
additionalParams: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
async init(nodeData: INodeData): Promise<any> {
|
||||
const accessToken = nodeData.inputs?.accessToken as string
|
||||
const nodeIds = (nodeData.inputs?.nodeIds as string)?.split(',') || []
|
||||
const fileKey = nodeData.inputs?.fileKey as string
|
||||
|
||||
const options: FigmaLoaderParams = {
|
||||
accessToken,
|
||||
nodeIds,
|
||||
fileKey
|
||||
}
|
||||
|
||||
const loader = new FigmaFileLoader(options)
|
||||
const docs = await loader.load()
|
||||
|
||||
return docs
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { nodeClass: Figma_DocumentLoaders }
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 172 KiB |
|
|
@ -0,0 +1,122 @@
|
|||
import { INode, INodeData, INodeParams } from '../../../src/Interface'
|
||||
import { TextSplitter } from 'langchain/text_splitter'
|
||||
import { PuppeteerWebBaseLoader } from 'langchain/document_loaders/web/puppeteer'
|
||||
import { test } from 'linkifyjs'
|
||||
import { getAvailableURLs } from '../../../src'
|
||||
|
||||
class Puppeteer_DocumentLoaders implements INode {
|
||||
label: string
|
||||
name: string
|
||||
description: string
|
||||
type: string
|
||||
icon: string
|
||||
category: string
|
||||
baseClasses: string[]
|
||||
inputs: INodeParams[]
|
||||
|
||||
constructor() {
|
||||
this.label = 'Puppeteer Web Scraper'
|
||||
this.name = 'puppeteerWebScraper'
|
||||
this.type = 'Document'
|
||||
this.icon = 'puppeteer.svg'
|
||||
this.category = 'Document Loaders'
|
||||
this.description = `Load data from webpages`
|
||||
this.baseClasses = [this.type]
|
||||
this.inputs = [
|
||||
{
|
||||
label: 'URL',
|
||||
name: 'url',
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
label: 'Text Splitter',
|
||||
name: 'textSplitter',
|
||||
type: 'TextSplitter',
|
||||
optional: true
|
||||
},
|
||||
{
|
||||
label: 'Web Scrape for Relative Links',
|
||||
name: 'webScrape',
|
||||
type: 'boolean',
|
||||
optional: true,
|
||||
additionalParams: true
|
||||
},
|
||||
{
|
||||
label: 'Web Scrape Links Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
default: 10,
|
||||
optional: true,
|
||||
additionalParams: true
|
||||
},
|
||||
{
|
||||
label: 'Metadata',
|
||||
name: 'metadata',
|
||||
type: 'json',
|
||||
optional: true,
|
||||
additionalParams: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
async init(nodeData: INodeData): Promise<any> {
|
||||
const textSplitter = nodeData.inputs?.textSplitter as TextSplitter
|
||||
const metadata = nodeData.inputs?.metadata
|
||||
const webScrape = nodeData.inputs?.webScrape as boolean
|
||||
let limit = nodeData.inputs?.limit as string
|
||||
|
||||
let url = nodeData.inputs?.url as string
|
||||
url = url.trim()
|
||||
if (!test(url)) {
|
||||
throw new Error('Invalid URL')
|
||||
}
|
||||
|
||||
const puppeteerLoader = async (url: string): Promise<any> => {
|
||||
let docs = []
|
||||
const loader = new PuppeteerWebBaseLoader(url)
|
||||
if (textSplitter) {
|
||||
docs = await loader.loadAndSplit(textSplitter)
|
||||
} else {
|
||||
docs = await loader.load()
|
||||
}
|
||||
return docs
|
||||
}
|
||||
|
||||
let availableUrls: string[]
|
||||
let docs = []
|
||||
if (webScrape) {
|
||||
if (!limit) limit = '10'
|
||||
availableUrls = await getAvailableURLs(url, parseInt(limit))
|
||||
for (let i = 0; i < availableUrls.length; i++) {
|
||||
try {
|
||||
docs.push(...(await puppeteerLoader(availableUrls[i])))
|
||||
} catch (error) {
|
||||
console.error('Error loading url with puppeteer. URL: ', availableUrls[i], 'Error: ', error)
|
||||
continue
|
||||
}
|
||||
}
|
||||
} else {
|
||||
docs = await puppeteerLoader(url)
|
||||
}
|
||||
|
||||
if (metadata) {
|
||||
const parsedMetadata = typeof metadata === 'object' ? metadata : JSON.parse(metadata)
|
||||
let finaldocs = []
|
||||
for (const doc of docs) {
|
||||
const newdoc = {
|
||||
...doc,
|
||||
metadata: {
|
||||
...doc.metadata,
|
||||
...parsedMetadata
|
||||
}
|
||||
}
|
||||
finaldocs.push(newdoc)
|
||||
}
|
||||
return finaldocs
|
||||
}
|
||||
|
||||
return docs
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { nodeClass: Puppeteer_DocumentLoaders }
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="0.67em" height="1em" viewBox="0 0 256 383">
|
||||
<path fill="#DFDEDF"
|
||||
d="M253.422 214.246H2.192v-14.168c0-9.52 7.717-17.237 17.236-17.237h216.757c9.52 0 17.237 7.717 17.237 17.237v14.168Z"></path>
|
||||
<path fill="#FFF"
|
||||
d="M235.92 378.553H19.692c-9.666 0-17.502-7.836-17.502-17.502V214.246h251.23V361.05c0 9.666-7.835 17.502-17.502 17.502"></path>
|
||||
<path
|
||||
d="M250.302 211.398v-12.706c0-7.501-6.08-13.582-13.581-13.582H19.279c-7.501 0-13.581 6.08-13.581 13.582v12.706h244.604Zm0 151.469V217.096H5.698v145.77c0 7.502 6.08 13.582 13.581 13.582h217.442c7.501 0 13.581-6.08 13.581-13.581ZM20.554 179.413l.846-9.236l-3.592 9.31c.487-.037.974-.074 1.471-.074h1.275Zm213.401-15.57l1.254 15.57h1.512c.809 0 1.601.066 2.384.163l-5.15-15.733Zm17.247 22.164c2.977 3.394 4.798 7.826 4.798 12.685v164.175c0 10.63-8.649 19.279-19.279 19.279H19.279C8.649 382.146 0 373.498 0 362.866V198.693c0-5.152 2.043-9.827 5.347-13.29l19.22-49.817l8.381-91.554l9.456.865l-7.552 82.492l2.66 1.026l-3.61 9.358l-3.812 41.64h195.593L214.829 44.669l9.464-.763l6.402 79.469l.004-.001l20.503 62.634Zm-230.046 8.39a4.302 4.302 0 1 1 0 8.603a4.302 4.302 0 0 1 0-8.603Zm14.709 0a4.302 4.302 0 1 1 0 8.603a4.302 4.302 0 0 1 0-8.603Zm14.244 0a4.302 4.302 0 1 1 0 8.603a4.302 4.302 0 0 1 0-8.603Z"></path>
|
||||
<path
|
||||
d="M36.022 287.748c.739-.855 1.128-1.979 1.128-3.374c0-1.396-.39-2.475-1.128-3.33c-.778-.855-1.868-1.26-3.268-1.26h-6.847v9.223h6.847c1.4 0 2.49-.405 3.268-1.259Zm-3.268-13.497c2.956 0 5.29.9 7.04 2.744c1.752 1.844 2.608 4.318 2.608 7.38c0 3.102-.856 5.532-2.567 7.376c-1.751 1.846-4.085 2.79-7.081 2.79h-6.847v12.414h-5.291v-32.704h12.138Zm28.544 20.057v-9.54h5.698v21.54h-5.698v-1.942c-1.727 1.726-3.97 2.589-6.777 2.589c-2.59 0-4.662-.863-6.259-2.546c-1.597-1.683-2.374-3.842-2.374-6.518v-13.123h5.698v11.914c0 1.51.388 2.763 1.208 3.67c.777.906 1.813 1.38 3.151 1.38c3.583 0 5.353-2.46 5.353-7.424Zm27.926 5.914c1.122-1.166 1.683-2.72 1.683-4.662c0-1.942-.56-3.54-1.683-4.705c-1.166-1.166-2.59-1.77-4.36-1.77c-1.597 0-3.02.604-4.273 1.813c-1.252 1.209-1.856 2.762-1.856 4.662c0 1.899.604 3.454 1.856 4.618c1.252 1.21 2.676 1.814 4.273 1.814c1.77 0 3.194-.604 4.36-1.77Zm-3.367-16.101c2.806 0 5.31 1.08 7.425 3.238c2.115 2.2 3.15 4.92 3.15 8.2c0 3.28-1.035 6-3.15 8.159c-2.116 2.159-4.576 3.237-7.425 3.237c-2.806 0-5.18-.777-7.122-2.33v11.959h-5.698v-31.816h5.698v1.727c1.9-1.597 4.273-2.374 7.122-2.374Zm31.078 16.1c1.122-1.165 1.683-2.72 1.683-4.661c0-1.942-.561-3.54-1.683-4.705c-1.166-1.166-2.59-1.77-4.36-1.77c-1.597 0-3.021.604-4.273 1.813c-1.252 1.209-1.857 2.762-1.857 4.662c0 1.899.605 3.454 1.857 4.618c1.252 1.21 2.676 1.814 4.273 1.814c1.77 0 3.194-.604 4.36-1.77Zm-3.368-16.1c2.806 0 5.31 1.08 7.426 3.238c2.114 2.2 3.15 4.92 3.15 8.2c0 3.28-1.036 6-3.15 8.159c-2.116 2.159-4.576 3.237-7.426 3.237c-2.805 0-5.18-.777-7.122-2.33v11.959h-5.697v-31.816h5.697v1.727c1.9-1.597 4.274-2.374 7.122-2.374Zm18.991 8.935h10.403c-.345-1.338-.993-2.33-1.899-2.98c-.907-.646-1.985-.991-3.195-.991a5.684 5.684 0 0 0-3.28 1.036c-1.036.69-1.727 1.683-2.029 2.935Zm5.31-8.935c2.935 0 5.482 1.036 7.597 3.065c2.115 2.072 3.194 4.704 3.324 7.942v1.943h-16.403c.302 1.51.95 2.718 1.943 3.626c.992.906 2.114 1.38 3.452 1.38c2.461 0 4.231-.95 5.353-2.848l5.094 1.079c-.907 2.202-2.288 3.843-4.1 4.965c-1.814 1.122-3.929 1.682-6.347 1.682c-3.108 0-5.74-1.078-7.856-3.193c-2.115-2.115-3.195-4.878-3.195-8.202c0-3.323 1.08-6.086 3.238-8.245c2.115-2.114 4.75-3.194 7.9-3.194Zm26.632 17.526c1.079 0 2.288-.346 3.583-1.036l1.64 4.748c-1.986 1.079-3.842 1.597-5.612 1.597c-2.633 0-4.705-.734-6.216-2.16c-1.51-1.422-2.244-3.538-2.244-6.43v-8.936h-4.62v-4.662h4.62v-6.517h5.698v6.517h7.036v4.662h-7.036v8.504c0 2.46 1.036 3.713 3.15 3.713Zm11.954-8.591h10.403c-.345-1.338-.993-2.33-1.899-2.98c-.907-.646-1.985-.991-3.195-.991a5.684 5.684 0 0 0-3.28 1.036c-1.036.69-1.727 1.683-2.029 2.935Zm5.31-8.935c2.935 0 5.482 1.036 7.597 3.065c2.115 2.072 3.194 4.704 3.324 7.942v1.943h-16.403c.302 1.51.95 2.718 1.943 3.626c.992.906 2.114 1.38 3.452 1.38c2.461 0 4.231-.95 5.353-2.848l5.093 1.079c-.906 2.202-2.287 3.843-4.1 4.965c-1.813 1.122-3.928 1.682-6.346 1.682c-3.108 0-5.74-1.078-7.856-3.193c-2.115-2.115-3.195-4.878-3.195-8.202c0-3.323 1.08-6.086 3.238-8.245c2.115-2.114 4.75-3.194 7.9-3.194Zm20.285 8.935h10.403c-.345-1.338-.993-2.33-1.898-2.98c-.907-.646-1.986-.991-3.196-.991a5.684 5.684 0 0 0-3.28 1.036c-1.036.69-1.727 1.683-2.029 2.935Zm5.31-8.935c2.935 0 5.482 1.036 7.597 3.065c2.115 2.072 3.195 4.704 3.325 7.942v1.943h-16.404c.302 1.51.95 2.718 1.944 3.626c.992.906 2.114 1.38 3.452 1.38c2.46 0 4.23-.95 5.352-2.848l5.095 1.079c-.907 2.202-2.288 3.843-4.101 4.965c-1.814 1.122-3.929 1.682-6.346 1.682c-3.108 0-5.742-1.078-7.856-3.193c-2.115-2.115-3.196-4.878-3.196-8.202c0-3.323 1.08-6.086 3.238-8.245c2.115-2.114 4.75-3.194 7.9-3.194Zm28.66.345c.649 0 1.167.043 1.513.172l-.303 5.483h-1.251c-5.137 0-7.685 3.065-7.685 9.238v6.949h-5.697v-21.54h5.697v3.928c1.943-2.806 4.533-4.23 7.727-4.23Z"></path>
|
||||
<path fill="#00D8A2"
|
||||
d="m211.095 132.638l30.741-14.841v-14.84l-71.023-33.922l71.023-36.571v-14.31L212.155 4.373l-84.096 41.871l-85.51-41.871l-27.561 14.841v12.72L81.77 68.505l-66.782 33.922v15.37l28.621 14.841l84.803-43.462z"></path>
|
||||
<path
|
||||
d="M214.95 126.585v-6.392l23.14-11.991v7.18l-23.14 11.203Zm-198.1-18.551l22.36 12.836v5.11l-22.36-11.312v-6.634ZM131.383 81.04l76.92 38.005v7.642l-76.92-39.405V81.04Zm-85.526 39.117l78.88-39.11v6.233l-78.88 39.908v-7.031Zm55.852-63.905L21.887 17.714L42.561 7.207L128.06 51.53l84.067-44.304l21.404 10.963l-77.84 39.174c-3.113 1.566-3.108 6.01.007 7.57l77.038 38.557l-19.968 10.347l-84.708-43.403l-86.206 44.289l-19.689-11.303l79.59-39.562c3.152-1.567 3.126-6.075-.045-7.606ZM17.844 30.77v-7.014L92.29 60.899l-7.526 3.007l-66.92-33.135Zm152.654 33.548c-.102-.062-7.13-3.378-7.13-3.378l74.721-37.605v7.045L170.5 64.319Zm7.48 3.683l65.674-32.976a1.969 1.969 0 0 0 1.085-1.76v-15.6a1.97 1.97 0 0 0-1.07-1.752L213.032.222a1.97 1.97 0 0 0-1.788-.003l-82.303 41.764a1.965 1.965 0 0 1-1.769.006L43.42.207a1.97 1.97 0 0 0-1.77.007L11.28 15.648a1.969 1.969 0 0 0-1.078 1.755v15.855c0 .749.425 1.433 1.097 1.765L77.25 67.607l-65.646 32.595a1.968 1.968 0 0 0-1.092 1.727l-.287 15.59a1.969 1.969 0 0 0 1.08 1.793l31.536 15.956a1.97 1.97 0 0 0 1.772.002l82.558-41.455a1.968 1.968 0 0 1 1.775.004l81.53 41.454a1.97 1.97 0 0 0 1.748.017l31.402-15.203a1.969 1.969 0 0 0 1.111-1.771v-16.29a1.97 1.97 0 0 0-1.1-1.767l-65.66-32.257Z"></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.4 KiB |
|
|
@ -0,0 +1,95 @@
|
|||
import { INode, INodeData, INodeParams } from '../../../src/Interface'
|
||||
import { TextSplitter } from 'langchain/text_splitter'
|
||||
import { SRTLoader } from 'langchain/document_loaders/fs/srt'
|
||||
|
||||
class Subtitles_DocumentLoaders implements INode {
|
||||
label: string
|
||||
name: string
|
||||
description: string
|
||||
type: string
|
||||
icon: string
|
||||
category: string
|
||||
baseClasses: string[]
|
||||
inputs: INodeParams[]
|
||||
|
||||
constructor() {
|
||||
this.label = 'Subtitles File'
|
||||
this.name = 'subtitlesFile'
|
||||
this.type = 'Document'
|
||||
this.icon = 'subtitlesFile.svg'
|
||||
this.category = 'Document Loaders'
|
||||
this.description = `Load data from subtitles files`
|
||||
this.baseClasses = [this.type]
|
||||
this.inputs = [
|
||||
{
|
||||
label: 'Subtitles File',
|
||||
name: 'subtitlesFile',
|
||||
type: 'file',
|
||||
fileType: '.srt'
|
||||
},
|
||||
{
|
||||
label: 'Text Splitter',
|
||||
name: 'textSplitter',
|
||||
type: 'TextSplitter',
|
||||
optional: true
|
||||
},
|
||||
{
|
||||
label: 'Metadata',
|
||||
name: 'metadata',
|
||||
type: 'json',
|
||||
optional: true,
|
||||
additionalParams: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
async init(nodeData: INodeData): Promise<any> {
|
||||
const textSplitter = nodeData.inputs?.textSplitter as TextSplitter
|
||||
const subtitlesFileBase64 = nodeData.inputs?.subtitlesFile as string
|
||||
const metadata = nodeData.inputs?.metadata
|
||||
|
||||
let alldocs = []
|
||||
let files: string[] = []
|
||||
|
||||
if (subtitlesFileBase64.startsWith('[') && subtitlesFileBase64.endsWith(']')) {
|
||||
files = JSON.parse(subtitlesFileBase64)
|
||||
} else {
|
||||
files = [subtitlesFileBase64]
|
||||
}
|
||||
|
||||
for (const file of files) {
|
||||
const splitDataURI = file.split(',')
|
||||
splitDataURI.pop()
|
||||
const bf = Buffer.from(splitDataURI.pop() || '', 'base64')
|
||||
const blob = new Blob([bf])
|
||||
const loader = new SRTLoader(blob)
|
||||
|
||||
if (textSplitter) {
|
||||
const docs = await loader.loadAndSplit(textSplitter)
|
||||
alldocs.push(...docs)
|
||||
} else {
|
||||
const docs = await loader.load()
|
||||
alldocs.push(...docs)
|
||||
}
|
||||
}
|
||||
|
||||
if (metadata) {
|
||||
const parsedMetadata = typeof metadata === 'object' ? metadata : JSON.parse(metadata)
|
||||
let finaldocs = []
|
||||
for (const doc of alldocs) {
|
||||
const newdoc = {
|
||||
...doc,
|
||||
metadata: {
|
||||
...doc.metadata,
|
||||
...parsedMetadata
|
||||
}
|
||||
}
|
||||
finaldocs.push(newdoc)
|
||||
}
|
||||
return finaldocs
|
||||
}
|
||||
return alldocs
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { nodeClass: Subtitles_DocumentLoaders }
|
||||
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 24 24" id="subtitles"><path d="M20,4.25H4A2.748,2.748,0,0,0,1.25,7V17A2.748,2.748,0,0,0,4,19.75H20A2.748,2.748,0,0,0,22.75,17V7A2.748,2.748,0,0,0,20,4.25Zm-14,5H8a.75.75,0,0,1,0,1.5H6a.75.75,0,0,1,0-1.5Zm7,5.5H6a.75.75,0,0,1,0-1.5h7a.75.75,0,0,1,0,1.5Zm5,0H16a.75.75,0,0,1,0-1.5h2a.75.75,0,0,1,0,1.5Zm0-4H11a.75.75,0,0,1,0-1.5h7a.75.75,0,0,1,0,1.5Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 436 B |
|
|
@ -0,0 +1,52 @@
|
|||
import { INode, INodeData, INodeParams } from '../../../src/Interface'
|
||||
import { getBaseClasses } from '../../../src/utils'
|
||||
import { RecursiveCharacterTextSplitter, RecursiveCharacterTextSplitterParams } from 'langchain/text_splitter'
|
||||
|
||||
class LatexTextSplitter_TextSplitters implements INode {
|
||||
label: string
|
||||
name: string
|
||||
description: string
|
||||
type: string
|
||||
icon: string
|
||||
category: string
|
||||
baseClasses: string[]
|
||||
inputs: INodeParams[]
|
||||
constructor() {
|
||||
this.label = 'Latex Text Splitter'
|
||||
this.name = 'latexTextSplitter'
|
||||
this.type = 'LatexTextSplitter'
|
||||
this.icon = 'latexTextSplitter.svg'
|
||||
this.category = 'Text Splitters'
|
||||
this.description = `Split documents along Latex headings, headlines, enumerations and more.`
|
||||
this.baseClasses = [this.type, ...getBaseClasses(RecursiveCharacterTextSplitter)]
|
||||
this.inputs = [
|
||||
{
|
||||
label: 'Chunk Size',
|
||||
name: 'chunkSize',
|
||||
type: 'number',
|
||||
default: 1000,
|
||||
optional: true
|
||||
},
|
||||
{
|
||||
label: 'Chunk Overlap',
|
||||
name: 'chunkOverlap',
|
||||
type: 'number',
|
||||
optional: true
|
||||
}
|
||||
]
|
||||
}
|
||||
async init(nodeData: INodeData): Promise<any> {
|
||||
const chunkSize = nodeData.inputs?.chunkSize as string
|
||||
const chunkOverlap = nodeData.inputs?.chunkOverlap as string
|
||||
|
||||
const obj = {} as RecursiveCharacterTextSplitterParams
|
||||
|
||||
if (chunkSize) obj.chunkSize = parseInt(chunkSize, 10)
|
||||
if (chunkOverlap) obj.chunkOverlap = parseInt(chunkOverlap, 10)
|
||||
|
||||
const splitter = RecursiveCharacterTextSplitter.fromLanguage('latex', obj)
|
||||
|
||||
return splitter
|
||||
}
|
||||
}
|
||||
module.exports = { nodeClass: LatexTextSplitter_TextSplitters }
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-markdown" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M3 5m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z"></path>
|
||||
<path d="M7 15v-6l2 2l2 -2v6"></path>
|
||||
<path d="M14 13l2 2l2 -2m-2 2v-6"></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 483 B |
|
|
@ -40,6 +40,8 @@
|
|||
"node-fetch": "^2.6.11",
|
||||
"pdf-parse": "^1.1.1",
|
||||
"pdfjs-dist": "^3.7.107",
|
||||
"puppeteer": "^20.7.1",
|
||||
"srt-parser-2": "^1.2.3",
|
||||
"weaviate-ts-client": "^1.1.0",
|
||||
"ws": "^8.9.0"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -278,29 +278,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
@ -481,29 +485,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
@ -628,29 +636,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
|
|||
|
|
@ -124,29 +124,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
|
|||
|
|
@ -227,29 +227,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
|
|||
|
|
@ -287,29 +287,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
|
|||
|
|
@ -34,29 +34,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
|
|||
|
|
@ -348,29 +348,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
|
|||
|
|
@ -365,29 +365,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
|
|||
|
|
@ -294,29 +294,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
|
|||
|
|
@ -84,7 +84,14 @@
|
|||
"baseClasses": ["MultiRetrievalQAChain", "MultiRouteChain", "BaseChain", "BaseLangChain"],
|
||||
"category": "Chains",
|
||||
"description": "QA Chain that automatically picks an appropriate vector store from multiple retrievers",
|
||||
"inputParams": [],
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Return Source Documents",
|
||||
"name": "returnSourceDocuments",
|
||||
"type": "boolean",
|
||||
"optional": true
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
{
|
||||
"label": "Language Model",
|
||||
|
|
@ -291,29 +298,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
|
|||
|
|
@ -34,29 +34,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
|
|||
|
|
@ -34,29 +34,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
|
|||
|
|
@ -104,29 +104,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
|
|||
|
|
@ -34,29 +34,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
@ -318,29 +322,33 @@
|
|||
"label": "gpt-4",
|
||||
"name": "gpt-4"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0314",
|
||||
"name": "gpt-4-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0314",
|
||||
"name": "gpt-4-32k-0314"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-0613",
|
||||
"name": "gpt-4-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k",
|
||||
"name": "gpt-4-32k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-4-32k-0613",
|
||||
"name": "gpt-4-32k-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo",
|
||||
"name": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0301",
|
||||
"name": "gpt-3.5-turbo-0301"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-0613",
|
||||
"name": "gpt-3.5-turbo-0613"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k",
|
||||
"name": "gpt-3.5-turbo-16k"
|
||||
},
|
||||
{
|
||||
"label": "gpt-3.5-turbo-16k-0613",
|
||||
"name": "gpt-3.5-turbo-16k-0613"
|
||||
}
|
||||
],
|
||||
"default": "gpt-3.5-turbo",
|
||||
|
|
|
|||
Loading…
Reference in New Issue