mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-27 13:46:37 +08:00
Remove the unauth complaint
This commit is contained in:
parent
72c39c0495
commit
fe39a837e9
@ -25,6 +25,7 @@ import CancelIcon from "../icons/cancel.svg";
|
||||
import StopIcon from "../icons/pause.svg";
|
||||
import McpToolIcon from "../icons/tool.svg";
|
||||
import {
|
||||
BOT_HELLO,
|
||||
ChatMessage,
|
||||
createMessage,
|
||||
DEFAULT_TOPIC,
|
||||
@ -1055,6 +1056,18 @@ function _Chat() {
|
||||
return session.mask.hideContext ? [] : session.mask.context.slice();
|
||||
}, [session.mask.context, session.mask.hideContext]);
|
||||
|
||||
if (
|
||||
context.length === 0 &&
|
||||
session.messages.at(0)?.content !== BOT_HELLO.content
|
||||
) {
|
||||
// Intentionally prevent adding BOT_HELLO message
|
||||
// const copiedHello = Object.assign({}, BOT_HELLO);
|
||||
// if (!accessStore.isAuthorized()) {
|
||||
// copiedHello.content = Locale.Error.Unauthorized;
|
||||
// }
|
||||
// context.push(copiedHello);
|
||||
}
|
||||
|
||||
// preview messages
|
||||
const renderMessages = useMemo(() => {
|
||||
return context.concat(session.messages as RenderMessage[]).concat(
|
||||
|
@ -329,8 +329,8 @@ You are an AI assistant with access to system tools. Your role is to help users
|
||||
|
||||
4. INTERACTION FLOW:
|
||||
A. When user makes a request:
|
||||
- IMMEDIATELY use appropriate tool if available
|
||||
- DO NOT ask if user wants you to use the tool
|
||||
- Use an appropriate tool if available
|
||||
- ASK if user wants you to use the tool
|
||||
- DO NOT just describe what you could do
|
||||
B. After receiving tool response:
|
||||
- Explain results clearly
|
||||
@ -653,6 +653,17 @@ const siliconflowModels = [
|
||||
|
||||
let seq = 1000; // 内置的模型序号生成器从1000开始
|
||||
export const DEFAULT_MODELS = [
|
||||
...googleModels.map((name) => ({
|
||||
name,
|
||||
available: true,
|
||||
sorted: seq++,
|
||||
provider: {
|
||||
id: "google",
|
||||
providerName: "Google",
|
||||
providerType: "google",
|
||||
sorted: 1, // Keep original provider sort order
|
||||
},
|
||||
})),
|
||||
...openaiModels.map((name) => ({
|
||||
name,
|
||||
available: true,
|
||||
@ -661,7 +672,7 @@ export const DEFAULT_MODELS = [
|
||||
id: "openai",
|
||||
providerName: "OpenAI",
|
||||
providerType: "openai",
|
||||
sorted: 1, // 这里是固定的,确保顺序与之前内置的版本一致
|
||||
sorted: 2, // 这里是固定的,确保顺序与之前内置的版本一致
|
||||
},
|
||||
})),
|
||||
...openaiModels.map((name) => ({
|
||||
@ -672,17 +683,6 @@ export const DEFAULT_MODELS = [
|
||||
id: "azure",
|
||||
providerName: "Azure",
|
||||
providerType: "azure",
|
||||
sorted: 2,
|
||||
},
|
||||
})),
|
||||
...googleModels.map((name) => ({
|
||||
name,
|
||||
available: true,
|
||||
sorted: seq++,
|
||||
provider: {
|
||||
id: "google",
|
||||
providerName: "Google",
|
||||
providerType: "google",
|
||||
sorted: 3,
|
||||
},
|
||||
})),
|
||||
|
Loading…
Reference in New Issue
Block a user