Merge pull request #86 from RooVetGit/fix-openai-compatible-streaming

Add 'Include stream options' checkbox for OpenAI-compatible providers
This commit is contained in:
Matt Rubens
2024-12-13 01:41:15 -05:00
committed by GitHub
3 changed files with 29 additions and 3 deletions

View File

@@ -445,6 +445,24 @@ const ApiOptions = ({ showModelOptions, apiErrorMessage, modelIdErrorMessage }:
placeholder={"Enter Model ID..."}>
<span style={{ fontWeight: 500 }}>Model ID</span>
</VSCodeTextField>
<div style={{ display: 'flex', alignItems: 'center' }}>
<VSCodeCheckbox
checked={apiConfiguration?.includeStreamOptions ?? true}
onChange={(e: any) => {
const isChecked = e.target.checked
setApiConfiguration({
...apiConfiguration,
includeStreamOptions: isChecked
})
}}>
Include stream options
</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}
onChange={(e: any) => {