From 1a513506921844bf56b5abda80e17b582d1ad9af Mon Sep 17 00:00:00 2001 From: Parker Stafford <52351508+Parker-Stafford@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:10:21 -0800 Subject: [PATCH] fix(playground): handle experiment id's for non streaming (#5601) --- .../PlaygroundDatasetExamplesTable.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/app/src/pages/playground/PlaygroundDatasetExamplesTable.tsx b/app/src/pages/playground/PlaygroundDatasetExamplesTable.tsx index 908253e0b2..6db0c794ef 100644 --- a/app/src/pages/playground/PlaygroundDatasetExamplesTable.tsx +++ b/app/src/pages/playground/PlaygroundDatasetExamplesTable.tsx @@ -507,6 +507,12 @@ export function PlaygroundDatasetExamplesTable({ }); return; } + updateInstance({ + instanceId, + patch: { + experimentId: response.chatCompletionOverDataset.experimentId, + }, + }); setExampleDataForInstance({ instanceId, data: createExampleResponsesForInstance( @@ -514,7 +520,12 @@ export function PlaygroundDatasetExamplesTable({ ), }); }, - [markPlaygroundInstanceComplete, notifyError, setExampleDataForInstance] + [ + markPlaygroundInstanceComplete, + notifyError, + setExampleDataForInstance, + updateInstance, + ] ); useEffect(() => { @@ -584,6 +595,10 @@ export function PlaygroundDatasetExamplesTable({ if (activeRunId === null) { continue; } + updateInstance({ + instanceId: instance.id, + patch: { experimentId: null }, + }); const variables = { input: getChatCompletionOverDatasetInput({ credentials,