Skip to content

Commit

Permalink
fix(playground): handle experiment id's for non streaming (#5601)
Browse files Browse the repository at this point in the history
  • Loading branch information
Parker-Stafford authored Dec 3, 2024
1 parent 37c2092 commit 1a51350
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion app/src/pages/playground/PlaygroundDatasetExamplesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -507,14 +507,25 @@ export function PlaygroundDatasetExamplesTable({
});
return;
}
updateInstance({
instanceId,
patch: {
experimentId: response.chatCompletionOverDataset.experimentId,
},
});
setExampleDataForInstance({
instanceId,
data: createExampleResponsesForInstance(
response.chatCompletionOverDataset
),
});
},
[markPlaygroundInstanceComplete, notifyError, setExampleDataForInstance]
[
markPlaygroundInstanceComplete,
notifyError,
setExampleDataForInstance,
updateInstance,
]
);

useEffect(() => {
Expand Down Expand Up @@ -584,6 +595,10 @@ export function PlaygroundDatasetExamplesTable({
if (activeRunId === null) {
continue;
}
updateInstance({
instanceId: instance.id,
patch: { experimentId: null },
});
const variables = {
input: getChatCompletionOverDatasetInput({
credentials,
Expand Down

0 comments on commit 1a51350

Please sign in to comment.