Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(weave): unhide completion iterations #3137

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ export const PlaygroundSettings: React.FC<PlaygroundSettingsProps> = ({
gap: '4px',
mt: 2,
}}>
<ResponseFormatEditor
responseFormat={playgroundState.responseFormat}
setResponseFormat={value =>
setPlaygroundStateField(idx, 'responseFormat', value)
}
/>
<FunctionEditor
playgroundState={playgroundState}
functions={playgroundState.functions}
Expand All @@ -71,22 +77,24 @@ export const PlaygroundSettings: React.FC<PlaygroundSettingsProps> = ({
}
/>

<ResponseFormatEditor
responseFormat={playgroundState.responseFormat}
setResponseFormat={value =>
setPlaygroundStateField(idx, 'responseFormat', value)
<StopSequenceEditor
stopSequences={playgroundState.stopSequences}
setStopSequences={value =>
setPlaygroundStateField(idx, 'stopSequences', value)
}
/>

{/* TODO: N times to run is not supported for all models */}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only new thing, everything else if just rearranging

{/* TODO: rerun if this is not supported in the backend */}
<PlaygroundSlider
min={0}
max={2}
step={0.01}
min={1}
max={100}
step={1}
setValue={value =>
setPlaygroundStateField(idx, 'temperature', value)
setPlaygroundStateField(idx, 'nTimes', value)
}
label="Temperature"
value={playgroundState.temperature}
label="Completion iterations"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a tooltip? I'm not the target audience but I don't really know what this means... Where are the multiple iterations going to end up?

value={playgroundState.nTimes}
/>

<PlaygroundSlider
Expand All @@ -100,11 +108,15 @@ export const PlaygroundSettings: React.FC<PlaygroundSettingsProps> = ({
value={playgroundState.maxTokens}
/>

<StopSequenceEditor
stopSequences={playgroundState.stopSequences}
setStopSequences={value =>
setPlaygroundStateField(idx, 'stopSequences', value)
<PlaygroundSlider
min={0}
max={2}
step={0.01}
setValue={value =>
setPlaygroundStateField(idx, 'temperature', value)
}
label="Temperature"
value={playgroundState.temperature}
/>

<PlaygroundSlider
Expand Down Expand Up @@ -137,6 +149,7 @@ export const PlaygroundSettings: React.FC<PlaygroundSettingsProps> = ({
label="Presence penalty"
value={playgroundState.presencePenalty}
/>

<Box
sx={{
width: '100%',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type PlaygroundState = {
topP: number;
frequencyPenalty: number;
presencePenalty: number;
// nTimes: number;
nTimes: number;
maxTokensLimit: number;
model: LLMMaxTokensKey;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const DEFAULT_PLAYGROUND_STATE = {
topP: 1,
frequencyPenalty: 0,
presencePenalty: 0,
// nTimes: 1,
nTimes: 1,
maxTokensLimit: 16384,
model: DEFAULT_MODEL,
};
Expand Down Expand Up @@ -90,9 +90,9 @@ export const usePlaygroundState = () => {
}
}
}
// 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);
}
Expand Down Expand Up @@ -147,7 +147,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,
},
Expand Down
Loading