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 Feb 25, 2024
1 parent f459d9c commit a0a35e8
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions packages/jupyter-ai-magics/jupyter_ai_magics/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
from langchain_community.llms import (
AI21,
Anthropic,
Together,
Bedrock,
Cohere,
GPT4All,
HuggingFaceHub,
OpenAI,
SagemakerEndpoint,
Together,
)

# this is necessary because `langchain.pydantic_v1.main` does not include
Expand Down Expand Up @@ -858,25 +858,28 @@ class TogetherAIProvider(BaseProvider, Together):
id = "togetherai"
name = "Together AI"
model_id_key = "model"
models = ['Austism/chronos-hermes-13b',
'DiscoResearch/DiscoLM-mixtral-8x7b-v2',
'EleutherAI/llemma_7b',
'Gryphe/MythoMax-L2-13b',
'Meta-Llama/Llama-Guard-7b',
'Nexusflow/NexusRaven-V2-13B',
'NousResearch/Nous-Capybara-7B-V1p9',
'NousResearch/Nous-Hermes-2-Yi-34B',
'NousResearch/Nous-Hermes-Llama2-13b',
'NousResearch/Nous-Hermes-Llama2-70b'
]
models = [
"Austism/chronos-hermes-13b",
"DiscoResearch/DiscoLM-mixtral-8x7b-v2",
"EleutherAI/llemma_7b",
"Gryphe/MythoMax-L2-13b",
"Meta-Llama/Llama-Guard-7b",
"Nexusflow/NexusRaven-V2-13B",
"NousResearch/Nous-Capybara-7B-V1p9",
"NousResearch/Nous-Hermes-2-Yi-34B",
"NousResearch/Nous-Hermes-Llama2-13b",
"NousResearch/Nous-Hermes-Llama2-70b",
]
pypi_package_deps = ["together"]
auth_strategy = EnvAuthStrategy(name="TOGETHER_API_KEY")

def __init__(self, **kwargs):
model = kwargs.get("model_id")

if model not in self.models:
kwargs["responses"] = ["Model not supported! Please check model list with %ai list"]
kwargs["responses"] = [
"Model not supported! Please check model list with %ai list"
]

super().__init__(**kwargs)

Expand Down

0 comments on commit a0a35e8

Please sign in to comment.