V 1.1.2 新增了生图包 以及各种转发和接口
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user