fix: format lint (#316)

This commit is contained in:
cachho
2023-07-18 22:52:09 +02:00
committed by GitHub
parent bb1fbba161
commit d16eafae05
7 changed files with 11 additions and 11 deletions

View File

@@ -5,4 +5,5 @@ __version__ = importlib.metadata.version(__package__ or __name__)
from embedchain.apps.App import App # noqa: F401
from embedchain.apps.CustomApp import CustomApp # noqa: F401
from embedchain.apps.OpenSourceApp import OpenSourceApp # noqa: F401
from embedchain.apps.PersonApp import PersonApp, PersonOpenSourceApp # noqa: F401
from embedchain.apps.PersonApp import (PersonApp, # noqa: F401
PersonOpenSourceApp)

View File

@@ -1,9 +1,9 @@
import logging
from typing import Iterable, List, Union
from typing import List
from langchain.schema import BaseMessage
from embedchain.config import ChatConfig, CustomAppConfig, OpenSourceAppConfig
from embedchain.config import ChatConfig, CustomAppConfig
from embedchain.embedchain import EmbedChain
from embedchain.models import Providers

View File

@@ -1,5 +1,5 @@
import logging
from typing import Iterable, List, Union
from typing import Iterable, Union
from embedchain.config import ChatConfig, OpenSourceAppConfig
from embedchain.embedchain import EmbedChain

View File

@@ -4,7 +4,8 @@ from embedchain.apps.App import App
from embedchain.apps.OpenSourceApp import OpenSourceApp
from embedchain.config import ChatConfig, QueryConfig
from embedchain.config.apps.BaseAppConfig import BaseAppConfig
from embedchain.config.QueryConfig import DEFAULT_PROMPT, DEFAULT_PROMPT_WITH_HISTORY
from embedchain.config.QueryConfig import (DEFAULT_PROMPT,
DEFAULT_PROMPT_WITH_HISTORY)
class EmbedChainPersonApp:

View File

@@ -1,4 +1,3 @@
import logging
from typing import Any
from chromadb.api.types import Documents, Embeddings
@@ -7,7 +6,6 @@ from dotenv import load_dotenv
from embedchain.models import EmbeddingFunctions, Providers
from .BaseAppConfig import BaseAppConfig
from embedchain.models import Providers
load_dotenv()

View File

@@ -15,7 +15,8 @@ class OpenSourceAppConfig(BaseAppConfig):
:param id: Optional. ID of the app. Document metadata will have this id.
:param host: Optional. Hostname for the database server.
:param port: Optional. Port for the database server.
:param model: Optional. GPT4ALL uses the model to instantiate the class. So unlike `App`, it has to be provided before querying.
:param model: Optional. GPT4ALL uses the model to instantiate the class.
So unlike `App`, it has to be provided before querying.
"""
self.model = model or "orca-mini-3b.ggmlv3.q4_0.bin"

View File

@@ -1,6 +1,7 @@
import logging
import os
from chromadb.errors import InvalidDimensionException
from dotenv import load_dotenv
from langchain.docstore.document import Document
from langchain.memory import ConversationBufferMemory
@@ -10,8 +11,6 @@ from embedchain.config.apps.BaseAppConfig import BaseAppConfig
from embedchain.config.QueryConfig import DOCS_SITE_PROMPT_TEMPLATE
from embedchain.data_formatter import DataFormatter
from chromadb.errors import InvalidDimensionException
load_dotenv()
ABS_PATH = os.getcwd()
@@ -164,7 +163,7 @@ class EmbedChain:
except InvalidDimensionException as e:
raise InvalidDimensionException(
e.message()
+ ". This is commonly a side-effect when an embedding function, different from the one used to add the embeddings, is used to retrieve an embedding from the database."
+ ". This is commonly a side-effect when an embedding function, different from the one used to add the embeddings, is used to retrieve an embedding from the database." # noqa E501
) from None
results_formatted = self._format_result(result)