mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-08 19:48:51 +01:00
feat: show model based on configured Keys
This commit is contained in:
parent
41f351786f
commit
131af50034
5 changed files with 38 additions and 7 deletions
|
|
@ -28,6 +28,14 @@ app.use('/api/convos', routes.convos);
|
|||
app.use('/api/customGpts', routes.customGpts);
|
||||
app.use('/api/prompts', routes.prompts);
|
||||
|
||||
app.get('/api/models', function (req, res) {
|
||||
const hasOpenAI = !!process.env.OPENAI_KEY;
|
||||
const hasChatGpt = !!process.env.CHATGPT_TOKEN;
|
||||
const hasBing = !!process.env.BING_TOKEN;
|
||||
|
||||
res.send(JSON.stringify({ hasOpenAI, hasChatGpt, hasBing }));
|
||||
});
|
||||
|
||||
app.listen(port, host, () => {
|
||||
if (host=='0.0.0.0')
|
||||
console.log(`Server listening on all interface at port ${port}. Use http://localhost:${port} to access it`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue