Skip to content

Commit

Permalink
Merge pull request #6 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 a71b74e + c65d64a commit f449c0c
Show file tree
Hide file tree
Showing 2 changed files with 31 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
];
28 changes: 28 additions & 0 deletions src/api/routes/models.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import _ from 'lodash';


export default {

prefix: '/v1',

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

}

}

0 comments on commit f449c0c

Please sign in to comment.