Skip to content

Commit

Permalink
优化名称准确度
Browse files Browse the repository at this point in the history
  • Loading branch information
aiqinxuancai committed Jul 24, 2023
1 parent 400e299 commit baf8c63
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions WkyFast/Service/ChatGptTranslatorManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ namespace WkyFast.Service
internal class ChatGPTTranslatorManager
{
const string kSystemMessage = """
请从指定文本中返回作品名称,请返回如下JSON格式:
请从我提供的内容中告诉我这个作品的名称,请返回如下JSON格式:
{ "title": <string> }
请注意:
1.不要添加解释。
2.如果包含多种语言的作品名称,请使用第一个
2.内容中可能包含多种语言的作品名称,通常可能会使用符号/进行分割,请返回第一种语言名称
3.请避免将字幕组名称及字幕名称等识别为标题。
4.不要对作品名称进行删减或翻译
5.不要对作品名称中的字符进行转换
以下为需要提取的内容
4.不要对作品名称进行删减或翻译以及字符的转换
5.作品名称不会包含包含[]【】等符号
以下为内容

""";

Expand Down Expand Up @@ -58,6 +58,13 @@ public static async Task<string> GetEpisode(string s)
{
JObject root = JObject.Parse(result.Response);
var title = (string)root["title"];

if (title.Contains("/"))
{
title.Split("/")

Check failure on line 64 in WkyFast/Service/ChatGptTranslatorManager.cs

View workflow job for this annotation

GitHub Actions / Dotnet Build

; expected

Check failure on line 64 in WkyFast/Service/ChatGptTranslatorManager.cs

View workflow job for this annotation

GitHub Actions / Dotnet Build

; expected
}


_cache[s] = title;
return title;
}
Expand Down

0 comments on commit baf8c63

Please sign in to comment.