Skip to content

Commit

Permalink
Merge pull request #81 from Yanyutin753/tem-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 committed Apr 24, 2024
2 parents b9d479b + 04db70b commit e828428
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 @@ -4,6 +4,7 @@ import Response from '@/lib/response/Response.ts';
import chat from "./chat.ts";
import ping from "./ping.ts";
import token from './token.ts';
import models from './models.ts';

export default [
{
Expand All @@ -21,5 +22,6 @@ export default [
},
chat,
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": "moonshot-v1",
"object": "model",
"owned_by": "kimi-free-api"
},
{
"id": "moonshot-v1-8k",
"object": "model",
"owned_by": "kimi-free-api"
},
{
"id": "moonshot-v1-32k",
"object": "model",
"owned_by": "kimi-free-api"
},
{
"id": "moonshot-v1-128k",
"object": "model",
"owned_by": "kimi-free-api"
},
{
"id": "moonshot-v1-vision",
"object": "model",
"owned_by": "kimi-free-api"
}
]
};
}

}
}

0 comments on commit e828428

Please sign in to comment.