Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: elastic search #600

Merged
merged 30 commits into from
Sep 13, 2023
Merged

fix: elastic search #600

merged 30 commits into from
Sep 13, 2023

Conversation

cachho
Copy link
Contributor

@cachho cachho commented Sep 12, 2023

Description

  • fixes elastic search
  • updates doc example
  • updated tests

Fixes #599

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Please delete options that are not relevant.

  • Unit Test
  • Test Script (please provide)
from embedchain import CustomApp
from embedchain.config import CustomAppConfig, ElasticsearchDBConfig
from embedchain.embedder.openai import OpenAiEmbedder
from embedchain.llm.openai import OpenAILlm
from embedchain.vectordb.elasticsearch import ElasticsearchDB

es_config = ElasticsearchDBConfig()

es_app = CustomApp(
    config=CustomAppConfig(log_level="INFO"),
    llm=OpenAILlm(),
    embedder=OpenAiEmbedder(),
    db=ElasticsearchDB(config=es_config),
)

es_app.add("lorem ipsum")
a = es_app.query("Tell me why?")
print(a)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Made sure Checks passed

@cachho cachho changed the title Fix/elastic search fix: elastic search Sep 12, 2023
@cachho cachho mentioned this pull request Sep 12, 2023
1 task
@taranjeet
Copy link
Member

@cachho : this looks good. Merging it.

@taranjeet taranjeet merged commit 119ec5e into mem0ai:main Sep 13, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: elasticsearch not working
2 participants