|
我们有一个后端将图片给 google ocr 获取图片文本内容,然后将文本内容给 deepseek 提取程序可用的 json 数据。运行良好
$response = $client->post($url, [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => "Bearer {$token}",
],
'timeout' => 30,
'json' => [
'model' => 'deepseek-chat',
'messages' => [
[
'role' => 'system',
'content' => 'You are a Singapore vocational skills certificate expert and PHP developer. Your task is to extract key information about the certificate from the given text and return it in JSON format. so long as recipient.id 、recipient.name 、competency.code 、competency.description 、date_issued 、certificate_number field',
],
[
'role' => 'user',
'content' => $this->text,
],
],
],
]); |