feat: add translate command
This commit is contained in:
parent
eecbaf18b3
commit
899491e867
9 changed files with 236 additions and 9 deletions
14
openai/prompts/prompts.go
Normal file
14
openai/prompts/prompts.go
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package prompts
|
||||
|
||||
import "fmt"
|
||||
|
||||
func General() string {
|
||||
return "You are a helpful assistant."
|
||||
}
|
||||
|
||||
func Translate(targetLang string) string {
|
||||
return fmt.Sprintf(
|
||||
"You are a helpful assistant. Your task is to help translate the following text to %s. You should not interpret the text. You should structure the translated text to look natural in native %s, while keeping the meaning unchanged.",
|
||||
targetLang, targetLang,
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue