Add quick reply, skill definition, and tag seeds for multilingual support
- Implemented QuickReplySeed structure and seeds for both English and Chinese languages. - Created SkillDefinitionSeed structure with detailed instructions and examples for the "After-sales Escalation" skill in both languages. - Added TagSeed structure and corresponding seeds for categorizing inquiries in English and Chinese. - Refactored skill and tag initialization to utilize the new seed structures, ensuring proper data handling and multilingual support. - Updated tests to verify that English seeds do not contain Chinese text, ensuring data integrity.
This commit is contained in:
Vendored
+2
-1
@@ -2,6 +2,7 @@ package skill
|
||||
|
||||
import (
|
||||
"agent-desk/cmd/testdata/seedlang"
|
||||
"agent-desk/cmd/testdata/seeds"
|
||||
"regexp"
|
||||
"testing"
|
||||
)
|
||||
@@ -9,7 +10,7 @@ import (
|
||||
var hanTextPattern = regexp.MustCompile(`\p{Han}`)
|
||||
|
||||
func TestEnglishSkillSeedDoesNotContainChineseText(t *testing.T) {
|
||||
for _, item := range buildSeedItems(seedlang.English) {
|
||||
for _, item := range seeds.SkillDefinitionSeeds(seedlang.English) {
|
||||
values := []string{item.Name, item.Description, item.Instruction, item.Examples, item.ToolWhitelist, item.Remark}
|
||||
for _, value := range values {
|
||||
if hanTextPattern.MatchString(value) {
|
||||
|
||||
Reference in New Issue
Block a user