Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 16, 2023
1 parent 20d8649 commit b66765c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/jupyter-ai-magics/jupyter_ai_magics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
GPT4AllEmbeddingsProvider,
HfHubEmbeddingsProvider,
OpenAIEmbeddingsProvider,
QianfanEmbeddingsEndpointProvider
QianfanEmbeddingsEndpointProvider,
)
from .exception import store_exception
from .magics import AiMagics
Expand All @@ -27,8 +27,8 @@
GPT4AllProvider,
HfHubProvider,
OpenAIProvider,
QianfanProvider,
SmEndpointProvider,
QianfanProvider
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
AuthStrategy,
AwsAuthStrategy,
EnvAuthStrategy,
Field, MultiEnvAuthStrategy,
Field,
MultiEnvAuthStrategy,
)
from langchain.embeddings import (
BedrockEmbeddings,
Expand Down Expand Up @@ -130,7 +131,9 @@ def __init__(self, **kwargs):
pypi_package_deps = ["gpt4all"]


class QianfanEmbeddingsEndpointProvider(BaseEmbeddingsProvider, QianfanEmbeddingsEndpoint):
class QianfanEmbeddingsEndpointProvider(
BaseEmbeddingsProvider, QianfanEmbeddingsEndpoint
):
id = "qianfan"
name = "ERNIE-Bot"
models = ["ERNIE-Bot", "ERNIE-Bot-4"]
Expand Down
2 changes: 1 addition & 1 deletion packages/jupyter-ai-magics/jupyter_ai_magics/magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from IPython import get_ipython
from IPython.core.magic import Magics, line_cell_magic, magics_class
from IPython.display import HTML, JSON, Markdown, Math
from jupyter_ai_magics.utils import decompose_model_id, get_lm_providers
from jupyter_ai_magics.aliases import MODEL_ID_ALIASES
from jupyter_ai_magics.utils import decompose_model_id, get_lm_providers
from langchain.chains import LLMChain
from langchain.schema import HumanMessage

Expand Down
7 changes: 2 additions & 5 deletions packages/jupyter-ai-magics/jupyter_ai_magics/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
HuggingFaceHub,
OpenAI,
OpenAIChat,
SagemakerEndpoint,
QianfanLLMEndpoint,
SagemakerEndpoint,
)
from langchain.llms.sagemaker_endpoint import LLMContentHandler
from langchain.llms.utils import enforce_stop_tokens
Expand Down Expand Up @@ -711,10 +711,7 @@ def allows_concurrency(self):
class QianfanProvider(BaseProvider, QianfanChatEndpoint):
id = "qianfan"
name = "ERNIE-Bot"
models = [
"ERNIE-Bot",
"ERNIE-Bot-4"
]
models = ["ERNIE-Bot", "ERNIE-Bot-4"]
model_id_key = "model_name"
pypi_package_deps = ["qianfan"]
auth_strategy = MultiEnvAuthStrategy(names=["QIANFAN_AK", "QIANFAN_SK"])

0 comments on commit b66765c

Please sign in to comment.