V 1.1.2 新增了生图包 以及各种转发和接口

This commit is contained in:
2025-06-14 22:12:37 +08:00
parent c07369c297
commit 3514cf53f8
42 changed files with 3971 additions and 74 deletions
+10
View File
@@ -115,6 +115,16 @@ public class ForwardWordService(ApplicationDbContext context)
throw new Exception("参数错误");
}
// 判断请求的url是不是满足条件
if (string.IsNullOrEmpty(request.GptUrl))
{
throw new Exception("请求的url为空");
}
if (!request.GptUrl.StartsWith("https://ark.cn-beijing.volces.com") && !request.GptUrl.StartsWith("https://api.moonshot.cn") && !request.GptUrl.StartsWith("https://laitool.net") && !request.GptUrl.StartsWith("https://api.laitool.cc") && !request.GptUrl.StartsWith("https://laitool.cc"))
{
throw new Exception("请求的url不合法");
}
// 获取提示词预设
Prompt? prompt = await _context.Prompt.FirstOrDefaultAsync(x => x.PromptTypeId == request.PromptTypeId && x.Id == request.PromptId);
if (prompt == null)