Browse Source

修正gitignore

master
RealXLFD 3 months ago
parent
commit
70989f1f18
  1. 31
      main.go

31
main.go

@ -0,0 +1,31 @@
package main
import (
"git.realxlfd.cc/RealXLFD/golib/openai"
"github.com/k0kubun/pp/v3"
)
func main() {
openai.SetBase(`https://openai-api.proxy.realxlfd.top`)
openai.SetProxy(`http://127.0.0.1:7890`)
models, errs := openai.GetModels(
`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`,
)
pp.Println(errs)
pp.Println(models)
chat := openai.New(&openai.Model{
Id: `gpt-4-turbo-preview`,
})
msg, token, errs := chat.AddPrompt(
`Your task is to extract TV show information from filenames, including the title, season, and episode number, while ignoring the production team's name. If the season or episode is not specified, infer them. Format your response as "{Show Title} {Season Number} {Episode Number}". For instance, the file "[Airota&VCB-Studio] SLOW LOOP [08][Ma10p_1080p][x265_flac].mkv" should be responded to with "{SLOW LOOP} {01} {08}".`,
).AddMsg(
openai.Msg{
Role: openai.RoleUser,
Content: `[LoliHouse] Rikei ga Koi ni Ochita no de Shoumei
shitemita 4th - 02 [WebRip 1080p HEVC-10bit AAC ASSx2]`,
},
).Completion(true)
pp.Println(errs)
pp.Println(token)
pp.Println(msg)
}
Loading…
Cancel
Save