Skip to content

Commit

Permalink
✨feat support /v1/models to be better use lobechat
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanyutin753 committed Apr 24, 2024
1 parent c8ceb8b commit d7be4a0
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import chat from "./chat.ts";
import images from "./images.ts";
import ping from "./ping.ts";
import token from './token.js';
import models from './models.ts';

export default [
{
Expand All @@ -23,5 +24,6 @@ export default [
chat,
images,
ping,
token
token,
models
];
45 changes: 45 additions & 0 deletions src/api/routes/models.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import _ from 'lodash';

export default {

prefix: '/v1',

get: {
'/models': async () => {
return {
"data": [
{
"id": "concise",
"object": "model",
"owned_by": "metaso-free-api"
},
{
"id": "detail",
"object": "model",
"owned_by": "metaso-free-api"
},
{
"id": "research",
"object": "model",
"owned_by": "metaso-free-api"
},
{
"id": "concise-scholar",
"object": "model",
"owned_by": "metaso-free-api"
},
{
"id": "detail-scholar",
"object": "model",
"owned_by": "metaso-free-api"
},
{
"id": "research-scholar",
"object": "model",
"owned_by": "metaso-free-api"
}
]
};
}
}
}

0 comments on commit d7be4a0

Please sign in to comment.