mirror of
https://github.com/LLM-Red-Team/glm-free-api.git
synced 2024-12-22 17:09:22 +08:00
✨feat support /v1/models to be better use lobechat
This commit is contained in:
parent
420a9e71c0
commit
36e89c0b2a
@ -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 [
|
||||
{
|
||||
@ -23,5 +24,6 @@ export default [
|
||||
chat,
|
||||
images,
|
||||
ping,
|
||||
token
|
||||
token,
|
||||
models
|
||||
];
|
41
src/api/routes/models.ts
Normal file
41
src/api/routes/models.ts
Normal file
@ -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"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user