Streaming checkbox for OpenAI-compatible providers

This commit is contained in:
Matt Rubens
2025-01-05 20:14:58 -05:00
parent 376ffa3f2a
commit 2cdfff02c0
4 changed files with 62 additions and 45 deletions

View File

@@ -477,21 +477,16 @@ const ApiOptions = ({ showModelOptions, apiErrorMessage, modelIdErrorMessage }:
<OpenAiModelPicker />
<div style={{ display: 'flex', alignItems: 'center' }}>
<VSCodeCheckbox
checked={apiConfiguration?.includeStreamOptions ?? true}
checked={apiConfiguration?.openAiStreamingEnabled ?? true}
onChange={(e: any) => {
const isChecked = e.target.checked
setApiConfiguration({
...apiConfiguration,
includeStreamOptions: isChecked
openAiStreamingEnabled: isChecked
})
}}>
Include stream options
Enable streaming
</VSCodeCheckbox>
<span
className="codicon codicon-info"
title="Stream options are for { include_usage: true }. Some providers may not support this option."
style={{ marginLeft: '5px', cursor: 'help' }}
></span>
</div>
<VSCodeCheckbox
checked={azureApiVersionSelected}