gpt4 book ai didi

amazon-web-services - HITLayoutParameters如何填写

转载 作者:行者123 更新时间:2023-12-01 22:26:39 26 4
gpt4 key购买 nike

这是我通过Go向mturk发送请求的方式:

resp_create, err := svc.CreateHIT(&mturk.CreateHITInput{
Title: aws.String("Title Sample"),
Reward: aws.String("1"),
Description: aws.String("Sample Desc"),
HITLayoutId: aws.String("33XXXXXXXXXXXX"),
HITLayoutParameters: []mturk.HITLayoutParameter{"image_url", "https://nationalinterest.org/sites/default/files/styles/desktop__1260_/public/main_images/fdgtrtttr.jpg?itok=RnfT8ENG"},
AssignmentDurationInSeconds: aws.Int64(604800),
LifetimeInSeconds: aws.Int64(604800),
Keywords:aws.String("image, identification"),
})

哪些由于某种原因而失败,如何正确填充 HITLayoutParameters,需要为图像添加 []mturk.HITLayoutParameter参数。我尝试了一些基本 slice 等尝试,但到目前为止没有任何效果。

要进行生产,必须先创建 create a hit,然后在HIT创建过程中将布局参数放在必须插入 image_url和url本身的位置。此项的关键是 HITLayoutParameters,它接受列表类型。

最佳答案

经过几次尝试和错误后,这是如何执行此操作:

resp_create, err := svc.CreateHIT(&mturk.CreateHITInput{
Title: aws.String("Title Sample"),
Reward: aws.String("1"),
Description: aws.String("Sample Desc"),
HITLayoutId: aws.String("35EXXXXXXXXXXXXXXXXXX"),
HITLayoutParameters: []*mturk.HITLayoutParameter{

{ Name: aws.String("image_url"), Value: aws.String("https://nationalinterest.org/sites/default/files/styles/desktop__1260_/public/main_images/fdgtrtttr.jpg?itok=RnfT8ENG")},

},
AssignmentDurationInSeconds: aws.Int64(604800),
LifetimeInSeconds: aws.Int64(604800),
Keywords:aws.String("image, identification"),
})

关于amazon-web-services - HITLayoutParameters如何填写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59612097/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com