Skip to content

Commit

Permalink
update google genai, remove aiplugin
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryHengZJ committed Apr 20, 2024
1 parent 2184b05 commit f1a57df
Show file tree
Hide file tree
Showing 17 changed files with 573 additions and 611 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"node": ">=18.15.0 <19.0.0 || ^20"
},
"resolutions": {
"@qdrant/openapi-typescript-fetch": "1.2.1"
"@qdrant/openapi-typescript-fetch": "1.2.1",
"@google/generative-ai": "^0.7.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { addImagesToMessages, llmSupportsVision } from '../../../src/multiModalU
import { checkInputs, Moderation } from '../../moderation/Moderation'
import { formatResponse } from '../../outputparsers/OutputParserHelpers'

class MRKLAgentChat_Agents implements INode {
class ReActAgentChat_Agents implements INode {
label: string
name: string
version: number
Expand All @@ -27,7 +27,7 @@ class MRKLAgentChat_Agents implements INode {

constructor(fields?: { sessionId?: string }) {
this.label = 'ReAct Agent for Chat Models'
this.name = 'mrklAgentChat'
this.name = 'reactAgentChat'
this.version = 4.0
this.type = 'AgentExecutor'
this.category = 'Agents'
Expand Down Expand Up @@ -157,4 +157,4 @@ class MRKLAgentChat_Agents implements INode {
}
}

module.exports = { nodeClass: MRKLAgentChat_Agents }
module.exports = { nodeClass: ReActAgentChat_Agents }
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { createReactAgent } from '../../../src/agents'
import { checkInputs, Moderation } from '../../moderation/Moderation'
import { formatResponse } from '../../outputparsers/OutputParserHelpers'

class MRKLAgentLLM_Agents implements INode {
class ReActAgentLLM_Agents implements INode {
label: string
name: string
version: number
Expand All @@ -24,7 +24,7 @@ class MRKLAgentLLM_Agents implements INode {

constructor() {
this.label = 'ReAct Agent for LLMs'
this.name = 'mrklAgentLLM'
this.name = 'reactAgentLLM'
this.version = 2.0
this.type = 'AgentExecutor'
this.category = 'Agents'
Expand Down Expand Up @@ -107,4 +107,4 @@ class MRKLAgentLLM_Agents implements INode {
}
}

module.exports = { nodeClass: MRKLAgentLLM_Agents }
module.exports = { nodeClass: ReActAgentLLM_Agents }
4 changes: 2 additions & 2 deletions packages/components/nodes/agents/ToolAgent/ToolAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class ToolAgent_Agents implements INode {
this.version = 1.0
this.type = 'AgentExecutor'
this.category = 'Agents'
this.icon = 'function.svg'
this.description = `Agent that uses OpenAI Function Calling to pick the tools and args to call`
this.icon = 'toolAgent.png'
this.description = `Agent that uses Function Calling to pick the tools and args to call`
this.baseClasses = [this.type, ...getBaseClasses(AgentExecutor)]
this.badge = 'NEW'
this.inputs = [
Expand Down
9 changes: 0 additions & 9 deletions packages/components/nodes/agents/ToolAgent/function.svg

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { HarmBlockThreshold, HarmCategory } from '@google/generative-ai'
import type { SafetySetting } from '@google/generative-ai'
import { GoogleGenerativeAIChatInput } from '@langchain/google-genai'
import { BaseCache } from '@langchain/core/caches'
import { ICommonObject, IMultiModalOption, INode, INodeData, INodeOptionsValue, INodeParams } from '../../../src/Interface'
import { convertMultiOptionsToStringArray, getBaseClasses, getCredentialData, getCredentialParam } from '../../../src/utils'
import { getModels, MODEL_TYPE } from '../../../src/modelLoader'
import { ChatGoogleGenerativeAI } from './FlowiseChatGoogleGenerativeAI'
import { ChatGoogleGenerativeAI, GoogleGenerativeAIChatInput } from './FlowiseChatGoogleGenerativeAI'

class GoogleGenerativeAI_ChatModels implements INode {
label: string
Expand Down
Loading

0 comments on commit f1a57df

Please sign in to comment.