feat: model set avatar

This commit is contained in:
archer
2023-04-28 10:06:14 +08:00
parent 606105d633
commit 08ae4073bd
6 changed files with 61 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ import { authModel } from '@/service/utils/auth';
/* 获取我的模型 */
export default async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
try {
const { name, search, share, service, security, systemPrompt, temperature } =
const { name, avatar, search, share, service, security, systemPrompt, temperature } =
req.body as ModelUpdateParams;
const { modelId } = req.query as { modelId: string };
const { authorization } = req.headers;
@@ -40,6 +40,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
},
{
name,
avatar,
systemPrompt,
temperature,
'share.isShare': share.isShare,