From 0ac333b5c803df9b14636b13f31dbf9fe3f60b07 Mon Sep 17 00:00:00 2001 From: KOUNOIKE Yuusuke Date: Sat, 6 May 2023 09:46:43 +0900 Subject: [PATCH] =?UTF-8?q?episode=E6=8A=BD=E5=87=BA=E3=81=AB=E5=A4=B1?= =?UTF-8?q?=E6=95=97=E3=81=97=E3=81=9F=E3=81=A8=E3=81=8D=E3=80=810?= =?UTF-8?q?=E3=81=A0=E3=81=A3=E3=81=9F=E3=81=AE=E3=82=92-1=E3=81=AB?= =?UTF-8?q?=E3=81=99=E3=82=8B=EF=BC=88=E7=AC=AC=E3=82=BC=E3=83=AD=E8=A9=B1?= =?UTF-8?q?=E3=81=AB=E5=82=99=E3=81=88=E3=82=8B=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose/config.yml.example | 3 ++- gpt/gpt_client.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose/config.yml.example b/docker-compose/config.yml.example index 01bc78f..6ea355e 100644 --- a/docker-compose/config.yml.example +++ b/docker-compose/config.yml.example @@ -15,7 +15,8 @@ log: level: DEBUG recording: basepath: "/recorded" - contentpathtemplate: "{{.Program.Name | fold}}-{{.Program.StartTime.Format \"20060102-1504\"}}-{{.Service.Name | fold}}.m2ts" + contentpathtemplate: | + {{.Title}}{{if ne .Episode -1}} #{{.Episode}}{{end}}{{if ne .Subtitle ""}}「{{.Subtitle}}」{{end}}-{{.Program.StartTime.Format "20060102-1504"}}-{{.Service.Name}}.m2ts encoding: enabled: true basepath: "/encoded" diff --git a/gpt/gpt_client.go b/gpt/gpt_client.go index ca3e84f..06fabdc 100644 --- a/gpt/gpt_client.go +++ b/gpt/gpt_client.go @@ -10,7 +10,7 @@ import ( ) const systemPrompt = `Parse user message and output with this format: -{"title": title name of the program, "subtitle": subtitle name of the program including the part used to extract the number of episodes, excluding flags such as "[新]", "[再]", etc., empty if it does not exist, "episode": number of episodes extracted from Arabic or Chinese numerals in numeric type, 0 if not present} +{"title": title name of the program, "subtitle": subtitle name of the program including the part used to extract the number of episodes, excluding flags such as "[新]", "[再]", etc., empty if it does not exist, "episode": number of episodes extracted from Arabic or Chinese numerals in numeric type, -1 if not present} Please return in strict JSON format. Never include non-JSON content in the output, such as commentary.` const transcribeInitialPrompt = `そうだ。今日はピクニックしない?天気もいいし、絶好のピクニック日和だと思う。いいですね。