Initial push

This commit is contained in:
Henry
2023-04-06 22:17:34 +01:00
commit 05c86ff9c5
162 changed files with 9112 additions and 0 deletions
@@ -0,0 +1,33 @@
import { INode } from '../../../src/Interface'
import { getBaseClasses } from '../../../src/utils'
class Calculator implements INode {
label: string
name: string
description: string
type: string
icon: string
category: string
baseClasses: string[]
constructor() {
this.label = 'Calculator'
this.name = 'calculator'
this.type = 'Calculator'
this.icon = 'calculator.svg'
this.category = 'Tools'
this.description = 'Perform calculations on response'
}
async getBaseClasses(): Promise<string[]> {
const { Calculator } = await import('langchain/tools')
return getBaseClasses(Calculator)
}
async init(): Promise<any> {
const { Calculator } = await import('langchain/tools')
return new Calculator()
}
}
module.exports = { nodeClass: Calculator }
@@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-calculator" 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="M4 3m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"></path>
<path d="M8 7m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v1a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"></path>
<path d="M8 14l0 .01"></path>
<path d="M12 14l0 .01"></path>
<path d="M16 14l0 .01"></path>
<path d="M8 17l0 .01"></path>
<path d="M12 17l0 .01"></path>
<path d="M16 17l0 .01"></path>
</svg>

After

Width:  |  Height:  |  Size: 698 B