mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-27 21:56:38 +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 StopIcon from "../icons/pause.svg";
|
||||||
import McpToolIcon from "../icons/tool.svg";
|
import McpToolIcon from "../icons/tool.svg";
|
||||||
import {
|
import {
|
||||||
|
BOT_HELLO,
|
||||||
ChatMessage,
|
ChatMessage,
|
||||||
createMessage,
|
createMessage,
|
||||||
DEFAULT_TOPIC,
|
DEFAULT_TOPIC,
|
||||||
@ -1055,6 +1056,18 @@ function _Chat() {
|
|||||||
return session.mask.hideContext ? [] : session.mask.context.slice();
|
return session.mask.hideContext ? [] : session.mask.context.slice();
|
||||||
}, [session.mask.context, session.mask.hideContext]);
|
}, [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
|
// preview messages
|
||||||
const renderMessages = useMemo(() => {
|
const renderMessages = useMemo(() => {
|
||||||
return context.concat(session.messages as RenderMessage[]).concat(
|
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:
|
4. INTERACTION FLOW:
|
||||||
A. When user makes a request:
|
A. When user makes a request:
|
||||||
- IMMEDIATELY use appropriate tool if available
|
- Use an appropriate tool if available
|
||||||
- DO NOT ask if user wants you to use the tool
|
- ASK if user wants you to use the tool
|
||||||
- DO NOT just describe what you could do
|
- DO NOT just describe what you could do
|
||||||
B. After receiving tool response:
|
B. After receiving tool response:
|
||||||
- Explain results clearly
|
- Explain results clearly
|
||||||
@ -653,6 +653,17 @@ const siliconflowModels = [
|
|||||||
|
|
||||||
let seq = 1000; // 内置的模型序号生成器从1000开始
|
let seq = 1000; // 内置的模型序号生成器从1000开始
|
||||||
export const DEFAULT_MODELS = [
|
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) => ({
|
...openaiModels.map((name) => ({
|
||||||
name,
|
name,
|
||||||
available: true,
|
available: true,
|
||||||
@ -661,7 +672,7 @@ export const DEFAULT_MODELS = [
|
|||||||
id: "openai",
|
id: "openai",
|
||||||
providerName: "OpenAI",
|
providerName: "OpenAI",
|
||||||
providerType: "openai",
|
providerType: "openai",
|
||||||
sorted: 1, // 这里是固定的,确保顺序与之前内置的版本一致
|
sorted: 2, // 这里是固定的,确保顺序与之前内置的版本一致
|
||||||
},
|
},
|
||||||
})),
|
})),
|
||||||
...openaiModels.map((name) => ({
|
...openaiModels.map((name) => ({
|
||||||
@ -672,17 +683,6 @@ export const DEFAULT_MODELS = [
|
|||||||
id: "azure",
|
id: "azure",
|
||||||
providerName: "Azure",
|
providerName: "Azure",
|
||||||
providerType: "azure",
|
providerType: "azure",
|
||||||
sorted: 2,
|
|
||||||
},
|
|
||||||
})),
|
|
||||||
...googleModels.map((name) => ({
|
|
||||||
name,
|
|
||||||
available: true,
|
|
||||||
sorted: seq++,
|
|
||||||
provider: {
|
|
||||||
id: "google",
|
|
||||||
providerName: "Google",
|
|
||||||
providerType: "google",
|
|
||||||
sorted: 3,
|
sorted: 3,
|
||||||
},
|
},
|
||||||
})),
|
})),
|
||||||
|
Loading…
Reference in New Issue
Block a user