davidmigloz / langchain_dart

Build LLM-powered Dart/Flutter applications.
https://langchaindart.dev
MIT License
426 stars 75 forks source link

Support Pinecone Serverless in Pinecone vector store #449

Closed AdvaitKale01 closed 5 months ago

AdvaitKale01 commented 5 months ago

System Info

Langchain.dart: ^0.7.2 Dart:Dart SDK version: 3.1.5 (stable) (Tue Oct 24 04:57:17 2023 +0000) on "windows_x64" Platform: Windows 11 Home Version 10.0.22631 Build 22631

Related Components

Reproduction

  1. Import langchain_pinecone
  2. Create pinecone index
  3. Use langchain_pinecone documentation to write code- final vectorStore = Pinecone( indexName: xxxxxxx, embeddings: embeddings, apiKey: PINECONE_API_KEY, environment: 'aped-xxxxxxxxx', );

Expected behavior

The error recieved is- [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PineconeClientException({ E/flutter (14516): "uri": "https://controller.aped-xxxxxxx.pinecone.io/databases/xxxxx", E/flutter (14516): "method": "GET", E/flutter (14516): "code": 404, E/flutter (14516): "message": "Unsuccessful response", E/flutter (14516): "body": ""

In pinecone.io, the host is- https://(project_id).svc.aped-xxxxx.pinecone.io It is serverless hosted on aws us-east-1. I tried changing baseURL and giving api key as headers but unable to interface with pinecone API

davidmigloz commented 5 months ago

Hey @AdvaitKale01,

The client we use (pinecone) currently only supports pinecone pod-based indexes.

It would be good if someone could send a PR to the client to add serverless support, I don't think there should be many changes.

Once the client supports it, we can easily add support in the LangChain.dart Pinecone vector store.