Update
This commit is contained in:
@@ -24,7 +24,7 @@ public static function getVectorEmbeddingBgeSmall($embedding_query)
|
||||
// Use the new API endpoint
|
||||
$response = Http::withHeaders([])->withOptions(['verify' => (app()->environment() == 'local') ? false : true])->timeout(800)
|
||||
->get(
|
||||
'hhttps://worker-embedding-mag.prime-42b.workers.dev',
|
||||
'https://worker-embedding-mag.prime-42b.workers.dev',
|
||||
[
|
||||
'query' => $embedding_query,
|
||||
]
|
||||
@@ -44,6 +44,7 @@ public static function getVectorEmbeddingBgeSmall($embedding_query)
|
||||
} catch (Exception $e) {
|
||||
$currentAttempt++;
|
||||
if ($currentAttempt >= $maxRetries) {
|
||||
throw $e;
|
||||
// we can throw exception here
|
||||
}
|
||||
// Optional: Add sleep for a few seconds if you want to delay the next attempt
|
||||
|
||||
Reference in New Issue
Block a user