You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
447 B
10 lines
447 B
import { defineWrappedResponseHandler } from "#server/utils/handler";
|
|
import { R } from "#server/utils/response";
|
|
import { getCurrentUser } from "#server/utils/context";
|
|
import { listAllEnabledModelsForUser } from "#server/service/llm";
|
|
|
|
export default defineWrappedResponseHandler(async (event) => {
|
|
const user = await getCurrentUser(event);
|
|
const list = await listAllEnabledModelsForUser(user?.id ?? null);
|
|
return R.success({ list });
|
|
});
|
|
|