mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
fix(Anthropic Chat Model Node): Fix LmChatAnthropic node to work when both thinking is enabled and tools used (#16010)
This commit is contained in:
committed by
GitHub
parent
0bea193814
commit
e662998c67
@@ -1,12 +1,9 @@
|
||||
import type { StructuredTool } from 'langchain/tools';
|
||||
import type { Tool } from '@langchain/core/tools';
|
||||
import { type IDataObject, type INodeExecutionData } from 'n8n-workflow';
|
||||
|
||||
import { convertObjectBySchema } from './convertToSchema';
|
||||
|
||||
export async function executeTool(
|
||||
tool: StructuredTool,
|
||||
query: string | object,
|
||||
): Promise<INodeExecutionData> {
|
||||
export async function executeTool(tool: Tool, query: string | object): Promise<INodeExecutionData> {
|
||||
let convertedQuery: string | object = query;
|
||||
if ('schema' in tool && tool.schema) {
|
||||
convertedQuery = convertObjectBySchema(query, tool.schema);
|
||||
|
||||
Reference in New Issue
Block a user