gpt4 book ai didi

山魈:请输入数组

转载 作者:行者123 更新时间:2023-12-05 01:05:52 24 4
gpt4 key购买 nike

我不明白为什么我得到一个无效的数组!

response = Unirest.post "#{@@endpoint}/messages/send.json", 
headers:{ "Accept" => "application/json" },
parameters:{
:key => @@apikey,
:message => {
:text => "example text",
:subject => "bla bla",
:from_email => "info@site.com",
:from_name => "site.com",
to: [
{
:email => "myemail@gmail.com",
:name => "myname",
:type => "to"
}
]
}
}

我收到这个错误
{"status":"error","code":-2,"name":"ValidationError","message":"Validation error: {\"message\":{\"to\":[\"Please enter an array\"]}}"}

最佳答案

to 数组不应该是

[to]=> 
array(
[0]=>array(
[email] => "myemail@gmail.com",
[name] => "myname",
[type] => "to"
)
)

关于山魈:请输入数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20825754/

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