madprabh started a new conversation+100 XP
2mos ago
Hey Folks,
I have a situation where I want to ensure that files get uploaded completely before a batch of jobs have to run. Something like this
foreach ($files as $file) {
$projectData = $projectService->handleFileUpload($project, $file);
if (strtolower($file->getClientOriginalExtension()) === 'csv') {
$projectData->csv_text_table_name = $csvFileService->getTextTableNameFromCsvName($file, $projectData->id);
$projectData->csv_data_type_table_name = $csvFileService->getDataTypeTableNameFromCsvName($file, $projectData->id);
$projectData->save();
}
//dispatch a job to process csv file
Bus::batch([
[
new CreateCsvTextTable($projectData),
new AddRecordsCsvTextTable($projectData)
],
])->then(function (Batch $batch) {
// All jobs completed successfully...log the success in a separate table with batch id and project data id
})->dispatch();
}
But, I think before the file gets uploaded the jobs are dispatched and that causes problems since the jobs depends on reading the csv files if they are not uploaded completely there is no way for the jobs to run successfully.
madprabh started a new conversation+100 XP
2mos ago
Het Folks,
Can I invoke AI ADK in this manner. I need specific providers with specific models. I am using it as an associative array.
$response = (new CustomResearch)
->prompt(
'Here are the instructions...\n\n' . $prompt . ' and the data:' . $jsonData,
provider: [
'openai' => 'gpt-5.2',
'gemini' => 'gemini-3-pro-preview',
],
timeout: 600,
);
madprabh started a new conversation+100 XP
2mos ago
madprabh wrote a reply+100 XP
2mos ago
Thanks @martinbean this is exactly what I am looking for.
madprabh wrote a reply+100 XP
2mos ago
Thanks @vincent15000 In this case even I am a little skeptical about the AI's answers since the official doc doesn't talk anything about this.
madprabh started a new conversation+100 XP
2mos ago