Skip to content

Commit

Permalink
Merge pull request #15 from Yanyutin753/main
Browse files Browse the repository at this point in the history
✨feat support /v1/models to be better use lobechat
  • Loading branch information
Vinlic authored Apr 24, 2024
2 parents 420a9e7 + 36e89c0 commit eeb3594
Show file tree
Hide file tree
Showing 2 changed files with 44 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
];
41 changes: 41 additions & 0 deletions src/api/routes/models.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import _ from 'lodash';

export default {

prefix: '/v1',

get: {
'/models': async () => {
return {
"data": [
{
"id": "glm-3-turbo",
"object": "model",
"owned_by": "glm-free-api"
},
{
"id": "glm-4",
"object": "model",
"owned_by": "glm-free-api"
},
{
"id": "glm-4v",
"object": "model",
"owned_by": "glm-free-api"
},
{
"id": "glm-v1",
"object": "model",
"owned_by": "glm-free-api"
},
{
"id": "glm-v1-vision",
"object": "model",
"owned_by": "glm-free-api"
}
]
};
}

}
}

0 comments on commit eeb3594

Please sign in to comment.