diff --git a/src/api/routes/index.ts b/src/api/routes/index.ts index 72dc88f..c4dd754 100644 --- a/src/api/routes/index.ts +++ b/src/api/routes/index.ts @@ -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 [ { @@ -21,5 +22,6 @@ export default [ }, chat, 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..2581d2e --- /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": "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" + } + ] + }; + } + + } +} \ No newline at end of file