File size: 353 Bytes
216f5cb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
package utils
import (
"pplx2api/config"
)
// **获取角色前缀**
func GetRolePrefix(role string) string {
if config.ConfigInstance.NoRolePrefix {
return ""
}
switch role {
case "system":
return "System: "
case "user":
return "Human: "
case "assistant":
return "Assistant: "
default:
return "Unknown: "
}
}
|