// easywechat
$app = WechatApp::getMiniApp();
$api = $app->getClient();
$params = [
"service" => "wx617ea32f889ba259",
"api" => "BaichuanNPCTurbo",
"data" => [
"character_profile" => [
"character_name" => "孙悟空",
"character_info" => "孙悟空",
"user_name" => "孙悟空",
"user_info" => "孙悟空"
],
"messages" => [[
"role" => "user",
"content" => "霁云,你可以空手接白刃吗?"
]],
"temperature" => 0.8,
"top_k" => 10,
"max_tokens" => 512
],
"client_msg_id" => Str::uuid()->toString(),
];
dd($params);
$res = $api->postJson("wxa/servicemarket", $params);
return $res->toArray(false);
请求参数:
array:4 [ // app\Http\Services\Mini\ChatService.php:38
"service" => "wx617ea32f889ba259"
"api" => "BaichuanNPCTurbo"
"data" => array:5 [
"character_profile" => array:4 [
"character_name" => "孙悟空"
"character_info" => "孙悟空"
"user_name" => "孙悟空"
"user_info" => "孙悟空"
]
"messages" => array:1 [
0 => array:2 [
"role" => "user"
"content" => "霁云,你可以空手接白刃吗?"
]
]
"temperature" => 0.8
"top_k" => 10
"max_tokens" => 512
]
"client_msg_id" => "ff0f3e3b-79fe-47c0-a50b-c0179d1c2cec"
]
一直提示:{"errcode":9301013,"errmsg":"api type not match request id:[MLwlfoqB4CwT5YNs9HzUOi7och9AaMcsHYuQmJMbAzxiabSFDm1mzAdVhF6Cbumanmc] rid = 677a3e3a-59012b36-3e35f4df rid: 677a3e3a-59012b36-3e35f4df"}