:zap: [Enhance] Auto add /v1 for endpoint requests
Browse files
server.js
CHANGED
@@ -86,7 +86,7 @@ app.post("/models", async (req, res) => {
|
|
86 |
|
87 |
const response = await axios({
|
88 |
method: openai_request_method,
|
89 |
-
url: openai_endpoint + "/models",
|
90 |
headers: openai_request_headers,
|
91 |
proxy: httpProxyDict,
|
92 |
});
|
@@ -108,7 +108,7 @@ app.post("/chat/completions", async (req, res) => {
|
|
108 |
|
109 |
const response = await axios({
|
110 |
method: openai_request_method,
|
111 |
-
url: openai_endpoint + "/chat/completions",
|
112 |
data: openai_request_body,
|
113 |
headers: openai_request_headers,
|
114 |
responseType: "stream",
|
|
|
86 |
|
87 |
const response = await axios({
|
88 |
method: openai_request_method,
|
89 |
+
url: openai_endpoint + "/v1/models",
|
90 |
headers: openai_request_headers,
|
91 |
proxy: httpProxyDict,
|
92 |
});
|
|
|
108 |
|
109 |
const response = await axios({
|
110 |
method: openai_request_method,
|
111 |
+
url: openai_endpoint + "/v1/chat/completions",
|
112 |
data: openai_request_body,
|
113 |
headers: openai_request_headers,
|
114 |
responseType: "stream",
|