From e9af3e754f49ffecc81aae2b984b2baf679909f7 Mon Sep 17 00:00:00 2001 From: oleg Date: Fri, 16 Feb 2024 09:31:53 +0100 Subject: [PATCH] fix(OpenAI Node): Always show jsonOutput toggle for OpenAI message operation (no-changelog) (#8651) --- .../vendors/OpenAi/actions/text/message.operation.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/actions/text/message.operation.ts b/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/actions/text/message.operation.ts index 90c20f800..762851a39 100644 --- a/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/actions/text/message.operation.ts +++ b/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/actions/text/message.operation.ts @@ -6,9 +6,9 @@ import type { } from 'n8n-workflow'; import { NodeConnectionType, updateDisplayOptions } from 'n8n-workflow'; +import type { Tool } from 'langchain/tools'; import { apiRequest } from '../../transport'; import type { ChatCompletion } from '../../helpers/interfaces'; -import type { Tool } from 'langchain/tools'; import { formatToOpenAIAssistantTool } from '../../helpers/utils'; import { modelRLC } from '../descriptions'; @@ -81,13 +81,8 @@ const properties: INodeProperties[] = [ name: 'jsonOutput', type: 'boolean', description: - 'Whether to attempt to return the response in JSON format, supported by gpt-3.5-turbo-1106 and gpt-4-1106-preview', + 'Whether to attempt to return the response in JSON format. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106.', default: false, - displayOptions: { - show: { - modelId: ['gpt-3.5-turbo-1106', 'gpt-4-1106-preview'], - }, - }, }, { displayName: 'Connect your own custom n8n tools to this node on the canvas', @@ -212,7 +207,7 @@ export async function execute(this: IExecuteFunctions, i: number): Promise