fix: remove sensitive info from examples

Change-Id: I7448dfaa5912f768adaacbb67cc22693590a58d2
drew/english
shentong.martin 1 year ago committed by shentongmartin
parent 07dd58eaf3
commit c802472524

@ -86,7 +86,7 @@ func main() {
return &userInfoResponse{ return &userInfoResponse{
Name: input.Name, Name: input.Name,
Email: input.Email, Email: input.Email,
Company: "Bytedance", Company: "Awesome company",
Position: "CEO", Position: "CEO",
Salary: "9999", Salary: "9999",
}, nil }, nil

@ -79,7 +79,7 @@ func main() {
return &userInfoResponse{ return &userInfoResponse{
Name: input.Name, Name: input.Name,
Email: input.Email, Email: input.Email,
Company: "Bytedance", Company: "Awesome company",
Position: "CEO", Position: "CEO",
Salary: "9999", Salary: "9999",
}, nil }, nil

@ -82,7 +82,7 @@ func main() {
// msg, err := agent.Generate(ctx, []*schema.Message{ // msg, err := agent.Generate(ctx, []*schema.Message{
// { // {
// Role: schema.User, // Role: schema.User,
// Content: "我在海淀区,给我推荐一些菜,需要有口味辣一点的菜,至少推荐有 2 家餐厅", // Content: "我在北京,给我推荐一些菜,需要有口味辣一点的菜,至少推荐有 2 家餐厅",
// }, // },
// }, react.WithCallbacks(&myCallback{})) // }, react.WithCallbacks(&myCallback{}))
// if err != nil { // if err != nil {
@ -94,7 +94,7 @@ func main() {
sr, err := ragent.Stream(ctx, []*schema.Message{ sr, err := ragent.Stream(ctx, []*schema.Message{
{ {
Role: schema.User, Role: schema.User,
Content: "我在海淀区,给我推荐一些菜,需要有口味辣一点的菜,至少推荐有 2 家餐厅", Content: "我在北京,给我推荐一些菜,需要有口味辣一点的菜,至少推荐有 2 家餐厅",
}, },
}, agent.WithComposeOptions(compose.WithCallbacks(&LoggerCallback{}))) }, agent.WithComposeOptions(compose.WithCallbacks(&LoggerCallback{})))
if err != nil { if err != nil {

@ -146,12 +146,12 @@ func (rd *restaurantDatabase) GetDishesByRestaurant(ctx context.Context, restaur
func getData() map[string][]restaurantDataItem { // nolint: byted_s_too_many_lines_in_func func getData() map[string][]restaurantDataItem { // nolint: byted_s_too_many_lines_in_func
return map[string][]restaurantDataItem{ return map[string][]restaurantDataItem{
"海淀": { "北京": {
{ {
ID: "1001", ID: "1001",
Name: "跳不动的E世界5F餐厅", Name: "云边小馆",
Place: "中关村E世界 5F, 左转进入", Place: "北京",
Desc: "这个是跳不动的E世界5F餐厅, 在E世界-5F, 口味多种多样", Desc: "这个是云边小馆, 在北京, 口味多种多样",
Score: 3, Score: 3,
Dishes: []restaurantDishDataItem{ Dishes: []restaurantDishDataItem{
{ {
@ -193,9 +193,9 @@ func getData() map[string][]restaurantDataItem { // nolint: byted_s_too_many_lin
}, },
{ {
ID: "1002", ID: "1002",
Name: "跳动的E世界地下餐厅", Name: "聚福轩食府",
Place: "中关村E世界-1F", Place: "北京",
Desc: "跳动的E世界地下餐厅, 在E世界-1F, 很多档口, 等你来探索", Desc: "北京的聚福轩食府, 很多档口, 等你来探索",
Score: 5, Score: 5,
Dishes: []restaurantDishDataItem{ Dishes: []restaurantDishDataItem{
{ {
@ -226,9 +226,9 @@ func getData() map[string][]restaurantDataItem { // nolint: byted_s_too_many_lin
}, },
{ {
ID: "1003", ID: "1003",
Name: "抖一抖的中航餐厅", Name: "花影食舍",
Place: "中航广场-1F", Place: "上海",
Desc: "非常豪华的中航餐厅, 好吃不贵", Desc: "非常豪华的花影食舍, 好吃不贵",
Score: 10, Score: 10,
Dishes: []restaurantDishDataItem{ Dishes: []restaurantDishDataItem{
{ {
@ -252,12 +252,12 @@ func getData() map[string][]restaurantDataItem { // nolint: byted_s_too_many_lin
}, },
}, },
}, },
"徐汇": { "上海": {
{ {
ID: "2001", ID: "2001",
Name: "漕河大饭店", Name: "鸿宾雅膳楼",
Place: "上海徐汇区一栋大楼里3层", Place: "上海",
Desc: "这个是漕河大饭店, 在漕河大饭店, 口味多种多样", Desc: "这个是鸿宾雅膳楼, 在上海, 口味多种多样",
Score: 3, Score: 3,
Dishes: []restaurantDishDataItem{ Dishes: []restaurantDishDataItem{
{ {
@ -276,9 +276,9 @@ func getData() map[string][]restaurantDataItem { // nolint: byted_s_too_many_lin
}, },
{ {
ID: "2002", ID: "2002",
Name: "漕河小饭店", Name: "饭醉团伙根据地",
Desc: "专注糖醋口味,你值得拥有", Desc: "专注糖醋口味,你值得拥有",
Place: "上海徐汇区二栋大楼里5层", Place: "上海",
Score: 5, Score: 5,
Dishes: []restaurantDishDataItem{ Dishes: []restaurantDishDataItem{
{ {
@ -297,8 +297,8 @@ func getData() map[string][]restaurantDataItem { // nolint: byted_s_too_many_lin
}, },
{ {
ID: "2010", ID: "2010",
Name: "漕河隐藏饭店", Name: "好吃到跺 jiojio 餐馆",
Desc: "这个是漕河隐藏饭店, 藏在一个你找不到的位置, 只等待有缘人来探索, 口味以川菜为主, 辣椒、花椒 大把大把放.", Desc: "这个是好吃到跺 jiojio 餐馆, 藏在一个你找不到的位置, 只等待有缘人来探索, 口味以川菜为主, 辣椒、花椒 大把大把放.",
Place: "它在它不在的地方", Place: "它在它不在的地方",
Score: 10, Score: 10,
Dishes: []restaurantDishDataItem{ Dishes: []restaurantDishDataItem{

Loading…
Cancel
Save