From ac138a7a27ce2035d686be31cca577c9ff6275ba Mon Sep 17 00:00:00 2001 From: Henry Heng Date: Mon, 24 Feb 2025 22:18:03 +0000 Subject: [PATCH 1/3] Chore/Claude 3.7 (#4075) * add gemini flash * add gemin flash to vertex * add gemin-1.5-flash-preview to vertex * add azure gpt 4o * add claude 3.5 sonnet * add mistral nemo * add groq llama3.1 * add gpt4o-mini to azure * o1 mini * add groq llama 3.2 * update anthropic models * add 3.5 haiku * update vertex embedding models * add azure o1 models * add o3 mini * add wolframalpha tool * Update pnpm-lock.yaml --- .../api-documentation/src/yml/swagger.yml | 20 +++++++++---------- packages/components/models.json | 5 +++++ .../nodes/chatmodels/ChatOpenAI/ChatOpenAI.ts | 2 +- pnpm-lock.yaml | 1 + 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/packages/api-documentation/src/yml/swagger.yml b/packages/api-documentation/src/yml/swagger.yml index 63cc71411..21b8f1dd0 100644 --- a/packages/api-documentation/src/yml/swagger.yml +++ b/packages/api-documentation/src/yml/swagger.yml @@ -778,11 +778,11 @@ paths: '200': description: Successfully execute refresh operation content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/VectorUpsertResponse' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VectorUpsertResponse' '400': description: Invalid request body @@ -1036,11 +1036,11 @@ paths: required: true responses: '200': - description: Feedback successfully created - content: - application/json: - schema: - $ref: '#/components/schemas/ChatMessageFeedback' + description: Feedback successfully created + content: + application/json: + schema: + $ref: '#/components/schemas/ChatMessageFeedback' '400': description: Invalid input provided '500': diff --git a/packages/components/models.json b/packages/components/models.json index a41cc589e..14944c8ee 100644 --- a/packages/components/models.json +++ b/packages/components/models.json @@ -320,6 +320,11 @@ { "name": "chatAnthropic", "models": [ + { + "label": "claude-3-7-sonnet-latest", + "name": "claude-3-7-sonnet-latest", + "description": "Most recent snapshot version of Claude Sonnet 3.7 model - hybrid reasoning model" + }, { "label": "claude-3-5-haiku-latest", "name": "claude-3-5-haiku-latest", diff --git a/packages/components/nodes/chatmodels/ChatOpenAI/ChatOpenAI.ts b/packages/components/nodes/chatmodels/ChatOpenAI/ChatOpenAI.ts index 75988122e..c893d7278 100644 --- a/packages/components/nodes/chatmodels/ChatOpenAI/ChatOpenAI.ts +++ b/packages/components/nodes/chatmodels/ChatOpenAI/ChatOpenAI.ts @@ -241,7 +241,7 @@ class ChatOpenAI_ChatModels implements INode { streaming: streaming ?? true } - if (modelName === 'o3-mini') { + if (modelName.includes('o3')) { delete obj.temperature } if ((modelName.includes('o1') || modelName.includes('o3')) && reasoningEffort) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ddd01d295..51ecbf59e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38347,3 +38347,4 @@ snapshots: react: 18.2.0 zwitch@2.0.4: {} + From 3290798d4b45930ab47bff56c671a3c734842519 Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Tue, 25 Feb 2025 07:28:21 -0500 Subject: [PATCH 2/3] Replace .edgebutton 'x' text with (#4035) replace .edgebutton 'x' text with --- packages/ui/src/views/canvas/ButtonEdge.jsx | 3 ++- packages/ui/src/views/canvas/index.css | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/views/canvas/ButtonEdge.jsx b/packages/ui/src/views/canvas/ButtonEdge.jsx index 3e93534b6..0e6810e06 100644 --- a/packages/ui/src/views/canvas/ButtonEdge.jsx +++ b/packages/ui/src/views/canvas/ButtonEdge.jsx @@ -4,6 +4,7 @@ import { useDispatch } from 'react-redux' import { useContext } from 'react' import { SET_DIRTY } from '@/store/actions' import { flowContext } from '@/store/context/ReactFlowContext' +import { IconX } from '@tabler/icons-react' import './index.css' @@ -53,7 +54,7 @@ const ButtonEdge = ({ id, sourceX, sourceY, targetX, targetY, sourcePosition, ta >
diff --git a/packages/ui/src/views/canvas/index.css b/packages/ui/src/views/canvas/index.css index e13d875e6..3ad926786 100644 --- a/packages/ui/src/views/canvas/index.css +++ b/packages/ui/src/views/canvas/index.css @@ -1,12 +1,14 @@ .edgebutton { width: 20px; height: 20px; + display: flex; + justify-content: center; + align-items: center; + padding: 0; background: #eee; border: 1px solid #fff; cursor: pointer; border-radius: 50%; - font-size: 12px; - line-height: 1; } .edgebutton:hover { From 229366968a9a7262f39d33fddd9a0e40cba2c94a Mon Sep 17 00:00:00 2001 From: Thanos Kontokostas Date: Tue, 25 Feb 2025 23:31:17 +0200 Subject: [PATCH 3/3] Adding Tavily custom tool (#4027) Adding Tavily custom tool --- .../credentials/TavilyApi.credential.ts | 25 +++++++++++ .../nodes/tools/TavilyAPI/TavilyAPI.ts | 42 +++++++++++++++++++ .../nodes/tools/TavilyAPI/tavily.svg | 1 + 3 files changed, 68 insertions(+) create mode 100644 packages/components/credentials/TavilyApi.credential.ts create mode 100644 packages/components/nodes/tools/TavilyAPI/TavilyAPI.ts create mode 100644 packages/components/nodes/tools/TavilyAPI/tavily.svg diff --git a/packages/components/credentials/TavilyApi.credential.ts b/packages/components/credentials/TavilyApi.credential.ts new file mode 100644 index 000000000..161ff4df0 --- /dev/null +++ b/packages/components/credentials/TavilyApi.credential.ts @@ -0,0 +1,25 @@ +import { INodeParams, INodeCredential } from '../src/Interface' + +class TavilyApi implements INodeCredential { + label: string + name: string + version: number + description: string + inputs: INodeParams[] + + constructor() { + this.label = 'Tavily API' + this.name = 'tavilyApi' + this.version = 1.0 + this.description = 'Tavily API is a real-time API to access Google search results' + this.inputs = [ + { + label: 'Tavily Api Key', + name: 'tavilyApiKey', + type: 'password' + } + ] + } +} + +module.exports = { credClass: TavilyApi } diff --git a/packages/components/nodes/tools/TavilyAPI/TavilyAPI.ts b/packages/components/nodes/tools/TavilyAPI/TavilyAPI.ts new file mode 100644 index 000000000..68e44c546 --- /dev/null +++ b/packages/components/nodes/tools/TavilyAPI/TavilyAPI.ts @@ -0,0 +1,42 @@ +import { TavilySearchResults } from '@langchain/community/tools/tavily_search' +import { ICommonObject, INode, INodeData, INodeParams } from '../../../src/Interface' +import { getBaseClasses, getCredentialData, getCredentialParam } from '../../../src/utils' + +class TavilyAPI_Tools implements INode { + label: string + name: string + version: number + description: string + type: string + icon: string + category: string + baseClasses: string[] + credential: INodeParams + inputs: INodeParams[] + + constructor() { + this.label = 'Tavily API' + this.name = 'tavilyAPI' + this.version = 1.0 + this.type = 'TavilyAPI' + this.icon = 'tavily.svg' + this.category = 'Tools' + this.description = 'Wrapper around TavilyAPI - a real-time API to access Google search results' + this.inputs = [] + this.credential = { + label: 'Connect Credential', + name: 'credential', + type: 'credential', + credentialNames: ['tavilyApi'] + } + this.baseClasses = [this.type, ...getBaseClasses(TavilySearchResults)] + } + + async init(nodeData: INodeData, _: string, options: ICommonObject): Promise { + const credentialData = await getCredentialData(nodeData.credential ?? '', options) + const tavilyApiKey = getCredentialParam('tavilyApiKey', credentialData, nodeData) + return new TavilySearchResults({ apiKey: tavilyApiKey }) + } +} + +module.exports = { nodeClass: TavilyAPI_Tools } diff --git a/packages/components/nodes/tools/TavilyAPI/tavily.svg b/packages/components/nodes/tools/TavilyAPI/tavily.svg new file mode 100644 index 000000000..141d1d3d6 --- /dev/null +++ b/packages/components/nodes/tools/TavilyAPI/tavily.svg @@ -0,0 +1 @@ + \ No newline at end of file