mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 11:36:38 +08:00
fix: fix bugs when choosing azure api version.
This commit is contained in:
parent
ffe4c91be9
commit
45e077cd18
@ -23,7 +23,6 @@ import {
|
||||
useUpdateStore,
|
||||
useAccessStore,
|
||||
ModalConfigValidator,
|
||||
AZURE_API_VERSION,
|
||||
} from "../store";
|
||||
import { Avatar } from "./chat";
|
||||
|
||||
@ -617,13 +616,11 @@ export function Settings(props: { closeSettings: () => void }) {
|
||||
);
|
||||
}}
|
||||
>
|
||||
{(accessStore.enableAOAI ? AZURE_API_VERSION : ALL_MODELS).map(
|
||||
(v) => (
|
||||
<option value={v.name} key={v.name} disabled={!v.available}>
|
||||
{v.name}
|
||||
</option>
|
||||
),
|
||||
)}
|
||||
{ALL_MODELS.map((v) => (
|
||||
<option value={v.name} key={v.name} disabled={!v.available}>
|
||||
{v.name}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</SettingItem>
|
||||
<SettingItem
|
||||
|
@ -52,10 +52,9 @@ function getRequestPath() {
|
||||
const OPENAI_REQUEST_PATH = "v1/chat/completions";
|
||||
|
||||
const { enableAOAI, azureDeployName } = useAccessStore.getState();
|
||||
const { modelConfig } = useChatStore.getState().config;
|
||||
if (!enableAOAI) return OPENAI_REQUEST_PATH;
|
||||
|
||||
const AZURE_REQUEST_PATH = `openai/deployments/${azureDeployName}/chat/completions?api-version=${modelConfig.model}`;
|
||||
const AZURE_REQUEST_PATH = `openai/deployments/${azureDeployName}/chat/completions?api-version=2023-03-15-preview`;
|
||||
return AZURE_REQUEST_PATH;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user