From a4831d6ed9351e69db0a81eca37490a9d8dba8b0 Mon Sep 17 00:00:00 2001 From: Deven Patel Date: Wed, 6 Dec 2023 00:03:13 -0800 Subject: [PATCH] Bump package version to 0.1.27 (#994) Co-authored-by: Deven Patel --- embedchain/embedchain.py | 9 +++------ embedchain/loaders/sitemap.py | 4 ++-- pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/embedchain/embedchain.py b/embedchain/embedchain.py index 813bcf5c..153b64d9 100644 --- a/embedchain/embedchain.py +++ b/embedchain/embedchain.py @@ -536,13 +536,10 @@ class EmbedChain(JSONSerializable): or the dry run result :rtype: str, if citations is False, otherwise Tuple[str,List[Tuple[str,str,str]]] """ - if "citations" in kwargs: - citations = kwargs.pop("citations") - else: - citations = False - + citations = kwargs.get("citations", False) + db_kwargs = {key: value for key, value in kwargs.items() if key != "citations"} contexts = self._retrieve_from_database( - input_query=input_query, config=config, where=where, citations=citations, **kwargs + input_query=input_query, config=config, where=where, citations=citations, **db_kwargs ) if citations and len(contexts) > 0 and isinstance(contexts[0], tuple): contexts_data_for_llm_query = list(map(lambda x: x[0], contexts)) diff --git a/embedchain/loaders/sitemap.py b/embedchain/loaders/sitemap.py index 1cb7e583..77fc90f2 100644 --- a/embedchain/loaders/sitemap.py +++ b/embedchain/loaders/sitemap.py @@ -1,10 +1,10 @@ import concurrent.futures import hashlib import logging +from urllib.parse import urlparse import requests from tqdm import tqdm -from urllib.parse import urlparse try: from bs4 import BeautifulSoup @@ -38,7 +38,7 @@ class SitemapLoader(BaseLoader): response = requests.get(sitemap_url) response.raise_for_status() else: - with open(sitemap_url, "r") as file: + with open(sitemap_url, "r") as file: soup = BeautifulSoup(file, "xml") links = [link.text for link in soup.find_all("loc") if link.parent.name == "url"] if len(links) == 0: diff --git a/pyproject.toml b/pyproject.toml index 661c3f49..dd6e3b21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "embedchain" -version = "0.1.26" +version = "0.1.27" description = "Data platform for LLMs - Load, index, retrieve and sync any unstructured data" authors = [ "Taranjeet Singh ",