Commit 63e2915c by haojie

1

parent 0bd60672
......@@ -45,8 +45,7 @@ public function submit($user_id, array $data = [])
'prompt' => $prompt,
'prompt_img' => $prompt_img,
'user_id' => $user_id,
# 'prompt_num' => $prompt_num,
'prompt_num' => 1,
'prompt_num' => $prompt_num,
];
# 保存任务
$task_id = Task::query()->create($list)->id;
......@@ -54,8 +53,7 @@ public function submit($user_id, array $data = [])
# 返回任务id
return [
'task_id' => $task_id,
# 测试
'prompt_num' => 1
'prompt_num' => $prompt_num
];
}
......@@ -120,6 +118,7 @@ public function gpt_callback($data = [])
*/
public function prompt_callback($data = [])
{
Log::info('接收到回调');
$credentials = Arr::only($data, ['user_id', 'task_id', 'result_img', 'prompt_id']);
# 必须字段
$prompt_id = $credentials['prompt_id'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment