forked from jupyterlab/jupyter-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow usage without NVIDIA partner package (jupyterlab#622)
- Loading branch information
Showing
5 changed files
with
35 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
packages/jupyter-ai-magics/jupyter_ai_magics/partner_providers/nvidia.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from jupyter_ai_magics.providers import BaseProvider, EnvAuthStrategy | ||
from langchain_nvidia_ai_endpoints import ChatNVIDIA | ||
|
||
|
||
class ChatNVIDIAProvider(BaseProvider, ChatNVIDIA): | ||
id = "nvidia-chat" | ||
name = "NVIDIA" | ||
models = [ | ||
"playground_llama2_70b", | ||
"playground_nemotron_steerlm_8b", | ||
"playground_mistral_7b", | ||
"playground_nv_llama2_rlhf_70b", | ||
"playground_llama2_13b", | ||
"playground_steerlm_llama_70b", | ||
"playground_llama2_code_13b", | ||
"playground_yi_34b", | ||
"playground_mixtral_8x7b", | ||
"playground_neva_22b", | ||
"playground_llama2_code_34b", | ||
] | ||
model_id_key = "model" | ||
auth_strategy = EnvAuthStrategy(name="NVIDIA_API_KEY") | ||
pypi_package_deps = ["langchain_nvidia_ai_endpoints"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters