mirror of
https://github.com/LLM-Red-Team/kimi-free-api.git
synced 2024-12-23 02:49:19 +08:00
✨feat support /v1/models to be better use lobechat
This commit is contained in:
parent
77d42d9484
commit
f7c1fa7be3
@ -4,6 +4,7 @@ import Response from '@/lib/response/Response.ts';
|
|||||||
import chat from "./chat.ts";
|
import chat from "./chat.ts";
|
||||||
import ping from "./ping.ts";
|
import ping from "./ping.ts";
|
||||||
import token from './token.ts';
|
import token from './token.ts';
|
||||||
|
import models from './models.ts';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
@ -21,5 +22,6 @@ export default [
|
|||||||
},
|
},
|
||||||
chat,
|
chat,
|
||||||
ping,
|
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": "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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user