mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 08:00:13 +01:00
This commit is contained in:
parent
ba400854b0
commit
69c18db9ed
4 changed files with 81 additions and 9 deletions
|
|
@ -45,6 +45,18 @@ 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 ChatGPTContinueWrite(msg string, contextMsgs []string) (ret string, retContextMsgs []string) {
|
||||
if "" == OpenAIAPIKey {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue