mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
This commit is contained in:
parent
dd3c011736
commit
3446462184
4 changed files with 11 additions and 138 deletions
|
|
@ -45,26 +45,11 @@ func ChatGPT(msg string) (ret string) {
|
|||
return
|
||||
}
|
||||
|
||||
func ChatGPTTranslate(msg string, lang string) (ret string) {
|
||||
msg = "Translate to " + lang + ":\n" + msg
|
||||
ret, _ = ChatGPTContinueWrite(msg, nil)
|
||||
return
|
||||
}
|
||||
|
||||
func ChatGPTSummary(msg string, lang string) (ret string) {
|
||||
msg = "Summarized as follows, the result is in {" + lang + "}:\n" + msg
|
||||
ret, _ = ChatGPTContinueWrite(msg, nil)
|
||||
return
|
||||
}
|
||||
|
||||
func ChatGPTBrainStorm(msg string, lang string) (ret string) {
|
||||
msg = "Brainstorm ideas as follows, the result is in {" + lang + "}:\n" + msg
|
||||
ret, _ = ChatGPTContinueWrite(msg, nil)
|
||||
return
|
||||
}
|
||||
|
||||
func ChatGPTFixGrammarSpell(msg string, lang string) (ret string) {
|
||||
msg = "Fix grammar and spelling as follows, the result is in {" + lang + "}:\n" + msg
|
||||
func ChatGPTWithAction(msg string, action string, lang string) (ret string) {
|
||||
prompt := "{action} as follows, the result is in {lang}:\n"
|
||||
prompt = strings.Replace(prompt, "{action}", action, -1)
|
||||
prompt = strings.Replace(prompt, "{lang}", lang, -1)
|
||||
msg = prompt + msg
|
||||
ret, _ = ChatGPTContinueWrite(msg, nil)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue