diff --git a/src/api/routes/index.ts b/src/api/routes/index.ts index 6ecd2fa..16738dd 100644 --- a/src/api/routes/index.ts +++ b/src/api/routes/index.ts @@ -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 ]; \ No newline at end of file diff --git a/src/api/routes/models.ts b/src/api/routes/models.ts new file mode 100644 index 0000000..f776cb0 --- /dev/null +++ b/src/api/routes/models.ts @@ -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" + } + ] + }; + } + + } +} \ No newline at end of file