update available models
This commit is contained in:
@@ -5,6 +5,7 @@ import localtunnel from "localtunnel";
|
||||
import ngrok from 'ngrok';
|
||||
import {v4 as uuidv4} from "uuid";
|
||||
import './proxyAgent.mjs';
|
||||
|
||||
const app = express();
|
||||
const port = process.env.PORT || 8080;
|
||||
const validApiKey = process.env.PASSWORD;
|
||||
@@ -20,6 +21,7 @@ const availableModels = [
|
||||
"llama3",
|
||||
"gemini_pro",
|
||||
"gemini_1_5_pro",
|
||||
"gemini_1_5_flash",
|
||||
"databricks_dbrx_instruct",
|
||||
"command_r",
|
||||
"command_r_plus",
|
||||
@@ -133,7 +135,12 @@ app.post("/v1/chat/completions", OpenAIApiKeyAuth, (req, res) => {
|
||||
created: Math.floor(new Date().getTime() / 1000),
|
||||
model: jsonBody.model,
|
||||
system_fingerprint: "114514",
|
||||
choices: [{ index: 0, delta: { role: "assistant", content: "" }, logprobs: null, finish_reason: null }],
|
||||
choices: [{
|
||||
index: 0,
|
||||
delta: {role: "assistant", content: ""},
|
||||
logprobs: null,
|
||||
finish_reason: null
|
||||
}],
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -330,7 +337,11 @@ app.post("/v1/messages", AnthropicApiKeyAuth, (req, res) => {
|
||||
},
|
||||
})
|
||||
);
|
||||
res.write(createEvent("content_block_start", { type: "content_block_start", index: 0, content_block: { type: "text", text: "" } }));
|
||||
res.write(createEvent("content_block_start", {
|
||||
type: "content_block_start",
|
||||
index: 0,
|
||||
content_block: {type: "text", text: ""}
|
||||
}));
|
||||
res.write(createEvent("ping", {type: "ping"}));
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user