Can't save Embeddings Settings with Pincone

Created on 31 December 2023, 11 months ago
Updated 28 March 2024, 8 months ago

Problem/Motivation

When configuring /admin/config/openai/openai-embeddings/settings and selecting Pinecone as the Vector client the Api Key and Hostname throw errors.

Steps to reproduce

Proposed resolution

The Pinecode::validateConfigurationForm() does not set the configuration so the call to $this->getClient()->post() ends up with empty values.

Add $this->setConfiguration($form_state->getValues()); to:

public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
    $this->setConfiguration($form_state->getValues());
    try {
      $this->getClient()->post(
        '/describe_index_stats',
      );
    }
    catch (\Exception $exception) {
      $form_state->setErrorByName('api_key', $exception->getMessage());
      $form_state->setErrorByName('hostname', $exception->getMessage());
    }
  }

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

OpenAI Embeddings

Created by

🇺🇸United States kamkejj WI

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024