Ver código fonte

[Data loader] Make json data loader work for other languages (#897)

Co-authored-by: Deven Patel <deven298@yahoo.com>
Deven Patel 1 ano atrás
pai
commit
a054f7be9c
2 arquivos alterados com 2 adições e 2 exclusões
  1. 1 1
      embedchain/loaders/json.py
  2. 1 1
      pyproject.toml

+ 1 - 1
embedchain/loaders/json.py

@@ -34,7 +34,7 @@ class JSONLoader(BaseLoader):
 
         # Load json data from various sources. TODO: add support for dictionary
         if os.path.isfile(content):
-            with open(content, "r") as json_file:
+            with open(content, "r", encoding="utf-8") as json_file:
                 json_data = json.load(json_file)
         elif re.match(VALID_URL_PATTERN, content):
             response = requests.get(content)

+ 1 - 1
pyproject.toml

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