mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-27 08:24:06 +00:00
1688 PO Automation Project
This commit is contained in:
@@ -81,6 +81,8 @@ class ETLPDFPurchaseOrderClaudeProcessor
|
||||
// Upload PDFs to Claude
|
||||
$fileIds = $this->uploadsClaudeFiles->execute($tempPaths);
|
||||
|
||||
Log::info('fileIds: '. json_encode($fileIds));
|
||||
|
||||
$kvp = KeyValuePair::where(
|
||||
'key',
|
||||
KVPKey::CLAUDE_PROMPT_PREFIX . 'EXTRACT_1'
|
||||
@@ -93,6 +95,8 @@ class ETLPDFPurchaseOrderClaudeProcessor
|
||||
$userPrompt = $kvp->value;
|
||||
$response = $this->createsClaudeResponseWithFiles->execute($userPrompt, $fileIds);
|
||||
|
||||
Log::info('response: '. json_encode($response));
|
||||
|
||||
$textContent = $response['content'][0]['text'] ?? '[]';
|
||||
|
||||
// Strip ```json fences
|
||||
|
||||
Reference in New Issue
Block a user