From 5253ff9eef2a683b55c2c6347b7ed8c150ba5408 Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Tue, 13 Aug 2024 11:33:44 -0700 Subject: [PATCH] pr feedback --- .../src/test-project-setup/conversation_handler_project.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/integration-tests/src/test-project-setup/conversation_handler_project.ts b/packages/integration-tests/src/test-project-setup/conversation_handler_project.ts index 00c5e9cadb..00ead426c4 100644 --- a/packages/integration-tests/src/test-project-setup/conversation_handler_project.ts +++ b/packages/integration-tests/src/test-project-setup/conversation_handler_project.ts @@ -386,10 +386,13 @@ class ConversationHandlerTestProject extends TestProjectBase { defaultConversationHandlerFunction, apolloClient ); - // Assert that tool was used. I.e. that LLM used value returned by the tool. - assert.match(response.content, /Seattle/); + // Assert that tool use content blocks are emitted in case LLM selects client tool. + // The content blocks are string serialized, but not as a proper JSON, + // hence string matching is employed below to detect some signals that tool use blocks kinds were emitted. assert.match(response.content, /toolUse/); assert.match(response.content, /toolUseId/); + // Assert that LLM attempts to pass parameter when asking for tool use. + assert.match(response.content, /city=Seattle/); }; private assertCustomConversationHandlerCanExecuteTurn = async (