Compare commits

..
2 Commits
Author SHA1 Message Date
Deshraj YadavandGitHub ea76868d65 [docs]: update readme (#767) 2023-10-04 18:14:16 -07:00
Deshraj Yadav f31351bedb [OpenSearch] Small bug fixes in query 2023-10-04 18:07:46 -07:00
4 changed files with 9 additions and 7 deletions
+5 -3
View File
@@ -36,7 +36,7 @@ The documentation for embedchain can be found at [docs.embedchain.ai](https://do
## 💻 Usage
Embedchain empowers you to create chatbot models similar to ChatGPT, using your own evolving dataset.
Embedchain empowers you to create ChatGPT like apps, on your own dynamic dataset.
### Data Types Supported
@@ -46,7 +46,9 @@ Embedchain empowers you to create chatbot models similar to ChatGPT, using your
* Sitemap
* Doc file
* Code documentation website loader
* Notion
* Notion and many more.
You can find the full list of data types on [our documentation](https://docs.embedchain.ai/data-sources/csv).
### Queries
@@ -87,7 +89,7 @@ If you utilize this repository, please consider citing it with:
```
@misc{embedchain,
author = {Taranjeet Singh},
author = {Taranjeet Singh, Deshraj Yadav},
title = {Embedchain: Framework to easily create LLM powered bots over any dataset},
year = {2023},
publisher = {GitHub},
+1 -1
View File
@@ -352,7 +352,7 @@ class EmbedChain(JSONSerializable):
# get existing ids, and discard doc if any common id exist.
where = {"url": src}
if self.config.id is not None:
where.update({"metadata.app_id": self.config.id})
where["app_id"] = self.config.id
db_result = self.db.get(ids=ids, where=where) # optional filter
existing_ids = set(db_result["ids"])
+2 -2
View File
@@ -93,7 +93,7 @@ class OpenSearchDB(BaseVectorDB):
if "app_id" in where:
app_id = where["app_id"]
query["query"]["bool"]["must"].append({"term": {"metadata.app_id": app_id}})
query["query"]["bool"]["must"].append({"term": {"metadata.app_id.keyword": app_id}})
# OpenSearch syntax is different from Elasticsearch
response = self.client.search(index=self._get_index(), body=query, _source=True, size=limit)
@@ -168,7 +168,7 @@ class OpenSearchDB(BaseVectorDB):
pre_filter = {"match_all": {}} # default
if "app_id" in where:
app_id = where["app_id"]
pre_filter = {"bool": {"must": [{"term": {"metadata.app_id": app_id}}]}}
pre_filter = {"bool": {"must": [{"term": {"metadata.app_id.keyword": app_id}}]}}
docs = docsearch.similarity_search(
input_query,
search_type="script_scoring",
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "embedchain"
version = "0.0.66"
version = "0.0.67"
description = "embedchain is a framework to easily create LLM powered bots over any dataset"
authors = ["Taranjeet Singh"]
license = "Apache License"