Error while indexing

Created on 30 September 2024, 3 months ago

Problem/Motivation

While trying to index i get below error message.

Try again later.TypeError: array_map(): Argument #2 ($array) must be of type array, null given in array_map() (line 46 of /var/www/html/vendor/openai-php/client/src/Responses/Embeddings/CreateResponse.php). OpenAI\Responses\Embeddings\CreateResponse::from() (Line: 30)
OpenAI\Resources\Embeddings->create() (Line: 220)
Drupal\provider_mistral\Plugin\AiProvider\MistralProvider->embeddings()
ReflectionMethod->invokeArgs() (Line: 150)
Drupal\ai\Plugin\ProviderProxy->wrapperCall() (Line: 81)
Drupal\ai\Plugin\ProviderProxy->__call() (Line: 72)
Drupal\ai_search\Plugin\EmbeddingStrategy\MetadataEmbeddingBase->getRawEmbeddings() (Line: 42)
Drupal\ai_search\Plugin\EmbeddingStrategy\MetadataEmbeddingBase->getEmbedding() (Line: 339)
Drupal\ai_search\Plugin\search_api\backend\SearchApiAiSearchBackend->indexItems() (Line: 350)
Drupal\search_api\Entity\Server->indexItems() (Line: 1006)
Drupal\search_api\Entity\Index->indexSpecificItems() (Line: 935)
Drupal\search_api\Entity\Index->indexItems() (Line: 160)
Drupal\search_api\IndexBatchHelper::process() (Line: 296)
_batch_process() (Line: 138)
_batch_do() (Line: 94)
_batch_page() (Line: 52)
Drupal\system\Controller\BatchController->batchPage()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

1. Enable the mistral provider and configure.
2. Enable openAI module and configure.
3. Configure VDB as milvus and configure.
4. Now configure search API add server and index.
5. Now try reindexing you will see this error

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

AI Search

Created by

🇮🇳India Megha_kundar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Megha_kundar
  • 🇬🇧United Kingdom scott_euser

    Can you try in latest 1.0.x dev please? A significant refactor happened which may sort things as I've gone thoroughly through the process from start with finish with ollama/openai combined with milvus/pinecone. Thanks!

Production build 0.71.5 2024