mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-24 14:40:22 +09:00
Remove detailed error error message.
This commit is contained in:
parent
9c648e5b64
commit
8ce2cf5c3b
@ -101,8 +101,7 @@ async function requestBedrock(req: NextRequest) {
|
|||||||
shouldStream,
|
shouldStream,
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log("[Bedrock Request] Endpoint:", endpoint);
|
console.log("[Bedrock Request] Initiating request");
|
||||||
console.log("[Bedrock Request] Model ID:", modelId);
|
|
||||||
|
|
||||||
// Handle tools for different models
|
// Handle tools for different models
|
||||||
const isMistralLargeModel = modelId
|
const isMistralLargeModel = modelId
|
||||||
|
@ -228,14 +228,14 @@ export class BedrockApi implements LLMApi {
|
|||||||
const headers = getHeaders();
|
const headers = getHeaders();
|
||||||
headers.XModelID = modelConfig.model;
|
headers.XModelID = modelConfig.model;
|
||||||
headers.XEncryptionKey = accessStore.encryptionKey;
|
headers.XEncryptionKey = accessStore.encryptionKey;
|
||||||
|
if (process.env.NODE_ENV !== "production") {
|
||||||
console.log("[Bedrock Client] Request:", {
|
console.debug("[Bedrock Client] Request:", {
|
||||||
path: chatPath,
|
path: chatPath,
|
||||||
model: modelConfig.model,
|
model: modelConfig.model,
|
||||||
messages: messages.length,
|
messages: messages.length,
|
||||||
stream: shouldStream,
|
stream: shouldStream,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
const finalRequestBody = this.formatRequestBody(messages, modelConfig);
|
const finalRequestBody = this.formatRequestBody(messages, modelConfig);
|
||||||
console.log(
|
console.log(
|
||||||
"[Bedrock Client] Request Body:",
|
"[Bedrock Client] Request Body:",
|
||||||
|
@ -28,13 +28,11 @@ export interface ModelValidationConfig {
|
|||||||
export function encrypt(data: string, encryptionKey: string): string {
|
export function encrypt(data: string, encryptionKey: string): string {
|
||||||
if (!data) return "";
|
if (!data) return "";
|
||||||
if (!encryptionKey) {
|
if (!encryptionKey) {
|
||||||
console.error("[AWS Encryption Error] Encryption key is required");
|
|
||||||
throw new Error("Encryption key is required for AWS credential encryption");
|
throw new Error("Encryption key is required for AWS credential encryption");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return AES.encrypt(data, encryptionKey).toString();
|
return AES.encrypt(data, encryptionKey).toString();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("[AWS Encryption Error]:", error);
|
|
||||||
throw new Error("Failed to encrypt AWS credentials");
|
throw new Error("Failed to encrypt AWS credentials");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user