madprabh's avatar

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's avatar

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's avatar

madprabh started a new conversation+100 XP

2mos ago

Hey guys,

I am looking to integrate headless browser in my project for scrapping js based websites. any recommendations on which one to use?

madprabh's avatar

madprabh wrote a reply+100 XP

2mos ago

Thanks @martinbean this is exactly what I am looking for.

madprabh's avatar

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's avatar

madprabh started a new conversation+100 XP

2mos ago

Hey Folks,

Can I pass a user owned API key to the AI SDK? For example, like this

$response = (new SalesCoach)
    ->prompt('Analyze this sales transcript...')
    ->apiKey('MyapiKey');