From 7c2f90c115f61095d47706e3b48f0274245386ac Mon Sep 17 00:00:00 2001 From: pgayvallet Date: Fri, 20 Sep 2024 14:15:42 +0200 Subject: [PATCH] [Simulated function calling] specify that only one tool call can be performed at a time --- .../simulated_function_calling/get_system_instructions.ts | 3 +++ .../get_system_message_instructions.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/x-pack/plugins/inference/server/chat_complete/simulated_function_calling/get_system_instructions.ts b/x-pack/plugins/inference/server/chat_complete/simulated_function_calling/get_system_instructions.ts index 848b8d1f44f07..abfc48dfa2ef2 100644 --- a/x-pack/plugins/inference/server/chat_complete/simulated_function_calling/get_system_instructions.ts +++ b/x-pack/plugins/inference/server/chat_complete/simulated_function_calling/get_system_instructions.ts @@ -32,6 +32,9 @@ export function getSystemMessageInstructions({ IMPORTANT: make sure you start and end a tool call with the ${TOOL_USE_START} and ${TOOL_USE_END} markers, it MUST be included in the tool call. + You can only call A SINGLE TOOL at a time. Do not call multiple tools, or multiple times the same tool, in the same + response. + You may call tools like this: ${TOOL_USE_START} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/simulate_function_calling/get_system_message_instructions.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/simulate_function_calling/get_system_message_instructions.ts index c80ac022ca6c0..eaf89233a2bcd 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/simulate_function_calling/get_system_message_instructions.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/simulate_function_calling/get_system_message_instructions.ts @@ -33,6 +33,9 @@ export function getSystemMessageInstructions({ IMPORTANT: make sure you start and end a tool call with the ${TOOL_USE_START} and ${TOOL_USE_END} markers, it MUST be included in the tool call. + You can only call A SINGLE TOOL at a time. Do not call multiple tools, or multiple times the same tool, in the same + response. + You may call tools like this: ${TOOL_USE_START}