Bump package version to 0.1.27 (#994)

Co-authored-by: Deven Patel <deven298@yahoo.com>
This commit is contained in:
Deven Patel
2023-12-06 00:03:13 -08:00
committed by GitHub
parent 51b4966801
commit a4831d6ed9
3 changed files with 6 additions and 9 deletions

View File

@@ -536,13 +536,10 @@ class EmbedChain(JSONSerializable):
or the dry run result or the dry run result
:rtype: str, if citations is False, otherwise Tuple[str,List[Tuple[str,str,str]]] :rtype: str, if citations is False, otherwise Tuple[str,List[Tuple[str,str,str]]]
""" """
if "citations" in kwargs: citations = kwargs.get("citations", False)
citations = kwargs.pop("citations") db_kwargs = {key: value for key, value in kwargs.items() if key != "citations"}
else:
citations = False
contexts = self._retrieve_from_database( 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): if citations and len(contexts) > 0 and isinstance(contexts[0], tuple):
contexts_data_for_llm_query = list(map(lambda x: x[0], contexts)) contexts_data_for_llm_query = list(map(lambda x: x[0], contexts))

View File

@@ -1,10 +1,10 @@
import concurrent.futures import concurrent.futures
import hashlib import hashlib
import logging import logging
from urllib.parse import urlparse
import requests import requests
from tqdm import tqdm from tqdm import tqdm
from urllib.parse import urlparse
try: try:
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
@@ -38,7 +38,7 @@ class SitemapLoader(BaseLoader):
response = requests.get(sitemap_url) response = requests.get(sitemap_url)
response.raise_for_status() response.raise_for_status()
else: else:
with open(sitemap_url, "r") as file: with open(sitemap_url, "r") as file:
soup = BeautifulSoup(file, "xml") soup = BeautifulSoup(file, "xml")
links = [link.text for link in soup.find_all("loc") if link.parent.name == "url"] links = [link.text for link in soup.find_all("loc") if link.parent.name == "url"]
if len(links) == 0: if len(links) == 0:

View File

@@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "embedchain" name = "embedchain"
version = "0.1.26" version = "0.1.27"
description = "Data platform for LLMs - Load, index, retrieve and sync any unstructured data" description = "Data platform for LLMs - Load, index, retrieve and sync any unstructured data"
authors = [ authors = [
"Taranjeet Singh <taranjeet@embedchain.ai>", "Taranjeet Singh <taranjeet@embedchain.ai>",