make notice clearer
This commit is contained in:
@@ -428,6 +428,7 @@ app.post("/v1/messages", AnthropicApiKeyAuth, (req, res) => {
|
|||||||
app.use((req, res, next) => {
|
app.use((req, res, next) => {
|
||||||
const { revision, branch } = getGitRevision();
|
const { revision, branch } = getGitRevision();
|
||||||
res.status(404).send("Not Found (YouChat_Proxy " + revision + "@" + branch + ")");
|
res.status(404).send("Not Found (YouChat_Proxy " + revision + "@" + branch + ")");
|
||||||
|
console.log("收到了错误路径的请求,请检查您使用的API端点是否正确。")
|
||||||
});
|
});
|
||||||
|
|
||||||
app.listen(port, async () => {
|
app.listen(port, async () => {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import { execSync } from "child_process";
|
|||||||
function getGitRevision() {
|
function getGitRevision() {
|
||||||
// get git revision and branch
|
// get git revision and branch
|
||||||
try {
|
try {
|
||||||
const revision = execSync("git rev-parse --short HEAD").toString().trim();
|
const revision = execSync("git rev-parse --short HEAD", { stdio: "pipe" }).toString().trim();
|
||||||
const branch = execSync("git rev-parse --abbrev-ref HEAD").toString().trim();
|
const branch = execSync("git rev-parse --abbrev-ref HEAD", { stdio: "pipe" }).toString().trim();
|
||||||
return { revision, branch };
|
return { revision, branch };
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return { revision: "unknown", branch: "unknown" };
|
return { revision: "unknown", branch: "unknown" };
|
||||||
|
|||||||
Reference in New Issue
Block a user