theodo-group / LLPhant

LLPhant - A comprehensive PHP Generative AI Framework using OpenAI GPT 4. Inspired by Langchain
MIT License
858 stars 92 forks source link

[Feature] Support for OpenSearch #242

Open aarongerig opened 2 weeks ago

aarongerig commented 2 weeks ago

Hello there! 👋

We would like to add support for OpenSearch to this library. Is that something you are interested in also? If so, I could try to contribute a VectorStore class, which is compatible with the OpenSearch PHP client.

Any feedback is appreciated!

f-lombardo commented 2 weeks ago

Hi @aarongerig, I think that new ideas are always welcome here! I'd just like to understand what benefits the Opensearch PHP client will give to users compared to the current Elasticsearch implementation. Is it possible to use the ElasticsearchVectorStore to connect to OpenSearch? And do you think that a new implementation using Opensearch client would also be able to connect to Elasticsearch? Thank you.

aarongerig commented 2 weeks ago

Hi @f-lombardo, Thank you for your feedback! Unfortunately, I was not able to use the current ElasticsearchVectorStore to connect to OpenSearch. The two libraries have some differences, which are not covered in that implementation. I basically copied and then manipulated the code to create a OpenSearchVectorStore, which works great with OpenSearch's PHP client and OpenSearch's API. I don't think that this new implementation of OpenSearch client is compatible with Elasticsearch. I will open a PR for you to see the differences between them. Cheers!