Chore/Update langchain version, openai, mistral, vertex, anthropic (#2180)

* update langchain version, openai, mistral, vertex, anthropic, introduced toolagent

* upgrade @google/generative-ai 0.7.0, replicate and faiss-node

* update cohere ver

* adding chatCohere to streaming

* update gemini to have image upload

* update google genai, remove aiplugin
This commit is contained in:
Henry Heng
2024-04-20 02:20:30 +01:00
committed by GitHub
parent f5be889ea8
commit 95beaba9d9
27 changed files with 1541 additions and 1008 deletions
@@ -1,45 +0,0 @@
import { AIPluginTool } from '@langchain/community/tools/aiplugin'
import { INode, INodeData, INodeParams } from '../../../src/Interface'
import { getBaseClasses } from '../../../src/utils'
class AIPlugin implements INode {
label: string
name: string
version: number
description: string
type: string
icon: string
category: string
baseClasses: string[]
inputs?: INodeParams[]
badge: string
constructor() {
this.label = 'AI Plugin'
this.name = 'aiPlugin'
this.version = 1.0
this.type = 'AIPlugin'
this.icon = 'aiplugin.svg'
this.category = 'Tools'
this.description = 'Execute actions using ChatGPT Plugin Url'
this.baseClasses = [this.type, ...getBaseClasses(AIPluginTool)]
this.badge = 'DEPRECATING'
this.inputs = [
{
label: 'Plugin Url',
name: 'pluginUrl',
type: 'string',
placeholder: 'https://www.klarna.com/.well-known/ai-plugin.json'
}
]
}
async init(nodeData: INodeData): Promise<any> {
const pluginUrl = nodeData.inputs?.pluginUrl as string
const aiplugin = await AIPluginTool.fromPluginUrl(pluginUrl)
return aiplugin
}
}
module.exports = { nodeClass: AIPlugin }
@@ -1,6 +0,0 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.57535 17.5607C7.7943 16.7796 7.7943 15.5133 8.57535 14.7323L14.2322 9.07542C15.0132 8.29437 16.2796 8.29437 17.0606 9.07542L19.1819 11.1967C20.744 12.7588 20.744 15.2915 19.1819 16.8536L16.3535 19.682C14.7914 21.2441 12.2588 21.2441 10.6967 19.682L8.57535 17.5607Z" stroke="black" stroke-width="2"/>
<path d="M11.404 7.66112L9.28271 5.53979" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M7.16136 11.9038L5.04004 9.78247" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M17.7676 18.2678L24.8386 25.3389" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 786 B