fix: #418 valid model config

This commit is contained in:
yidadaa
2023-04-04 01:05:33 +08:00
parent 7572c99f4d
commit 4e644cfca7
4 changed files with 64 additions and 55 deletions

View File

@@ -1,5 +1,5 @@
import type { ChatRequest, ChatReponse } from "./api/openai/typing";
import { filterConfig, Message, ModelConfig, useAccessStore } from "./store";
import { Message, ModelConfig, useAccessStore } from "./store";
import Locale from "./locales";
import { showToast } from "./components/ui-lib";
@@ -123,11 +123,6 @@ export async function requestChatStream(
filterBot: options?.filterBot,
});
// valid and assign model config
if (options?.modelConfig) {
Object.assign(req, filterConfig(options.modelConfig));
}
console.log("[Request] ", req);
const controller = new AbortController();