From 1a9485f64e4ef7e1909d53cc31239bede8d17e95 Mon Sep 17 00:00:00 2001 From: Josiah Lee Date: Wed, 11 Dec 2024 13:19:30 -0800 Subject: [PATCH] unhide completion iterations (#3137) --- .../PlaygroundSettings/PlaygroundSettings.tsx | 41 ++++++++++++------- .../Browse3/pages/PlaygroundPage/types.ts | 2 +- .../PlaygroundPage/usePlaygroundState.ts | 10 ++--- 3 files changed, 33 insertions(+), 20 deletions(-) diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/PlaygroundPage/PlaygroundSettings/PlaygroundSettings.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/PlaygroundPage/PlaygroundSettings/PlaygroundSettings.tsx index 5a2e8fae32c..e0971d35bfb 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/PlaygroundPage/PlaygroundSettings/PlaygroundSettings.tsx +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/PlaygroundPage/PlaygroundSettings/PlaygroundSettings.tsx @@ -59,6 +59,12 @@ export const PlaygroundSettings: React.FC = ({ gap: '4px', mt: 2, }}> + + setPlaygroundStateField(idx, 'responseFormat', value) + } + /> = ({ } /> - - setPlaygroundStateField(idx, 'responseFormat', value) + + setPlaygroundStateField(idx, 'stopSequences', value) } /> + {/* TODO: N times to run is not supported for all models */} + {/* TODO: rerun if this is not supported in the backend */} - setPlaygroundStateField(idx, 'temperature', value) + setPlaygroundStateField(idx, 'nTimes', value) } - label="Temperature" - value={playgroundState.temperature} + label="Completion iterations" + value={playgroundState.nTimes} /> = ({ value={playgroundState.maxTokens} /> - - setPlaygroundStateField(idx, 'stopSequences', value) + + setPlaygroundStateField(idx, 'temperature', value) } + label="Temperature" + value={playgroundState.temperature} /> = ({ label="Presence penalty" value={playgroundState.presencePenalty} /> + { } } } - // if (inputs.n) { - // newState.nTimes = parseInt(inputs.n, 10); - // } + if (inputs.n) { + newState.nTimes = parseInt(inputs.n, 10); + } if (inputs.temperature) { newState.temperature = parseFloat(inputs.temperature); } @@ -148,7 +148,7 @@ export const getInputFromPlaygroundState = (state: PlaygroundState) => { top_p: state.topP, frequency_penalty: state.frequencyPenalty, presence_penalty: state.presencePenalty, - // n: state.nTimes, + n: state.nTimes, response_format: { type: state.responseFormat, },