Skip to content

Commit

Permalink
Merge pull request #16 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 fedb5ce + e389f58 commit 4f500d5
Show file tree
Hide file tree
Showing 2 changed files with 59 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.ts';
import models from './models.ts';

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

export default {

prefix: '/v1',

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

}
}

0 comments on commit 4f500d5

Please sign in to comment.