両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
python:jupyterlab:jupyter_ai [2024/03/17 06:47] – [開発インストール] ともやん | python:jupyterlab:jupyter_ai [2025/08/01 07:53] (現在) – [モデル プロバイダー] ともやん |
---|
<WRAP color_term> | <WRAP color_term> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
<font color="#FF8700"><b>$</b></font> <font color="#26A269">pipx</font> inject jupyterlab ai21 anthropic boto3 cohere qianfan langchain-google-genai gpt4all huggingface_hub ipywidgets pillow langchain_nvidia_ai_endpoints openai | <font color="#FF8700"><b>$</b></font> <font color="#26A269">pipx</font> inject jupyterlab ai21 anthropic boto3 cohere qianfan langchain-google-genai gpt4all huggingface_hub ipywidgets pillow langchain_nvidia_ai_endpoints langchain-openai |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_result><html><pre> | <WRAP color_result><html><pre> |
injected package <b>langchain-nvidia-ai-endpoints</b> into venv <b>jupyterlab</b> | injected package <b>langchain-nvidia-ai-endpoints</b> into venv <b>jupyterlab</b> |
done! ✨ 🌟 ✨ | done! ✨ 🌟 ✨ |
injected package <b>openai</b> into venv <b>jupyterlab</b> | injected package <b>langchain-openai</b> into venv <b>jupyterlab</b> |
done! ✨ 🌟 ✨ | done! ✨ 🌟 ✨ |
</pre></html></WRAP> | </pre></html></WRAP> |
==== モデル プロバイダー ==== | ==== モデル プロバイダー ==== |
<WRAP mintbl> | <WRAP mintbl> |
^ Provider ^^ Provider ID ^ Environment variable(s) ^Python package(s) | | ^ Provider ^^ Provider ID ^ Environment variable(s) ^ Python package(s) ^ |
| [[https://www.ai21.com/|AI21]] | AI21 Labs | <html><code>ai21</code></html> | <html><code>AI21_API_KEY</code></html> | <html><code>ai21</code></html> | | | [[https://www.ai21.com/|AI21]] | AI21 Labs | ''ai21'' | ''AI21_API_KEY'' | ''ai21'' | |
| [[https://www.anthropic.com/|Anthropic]] | | <html><code>anthropic</code></html> | <html><code>ANTHROPIC_API_KEY</code></html> | <html><code>anthropic</code></html> | | | [[https://www.anthropic.com/|Anthropic]] | | ''anthropic'' | ''ANTHROPIC_API_KEY'' | ''langchain-anthropic'' | |
| Anthropic (chat) | | <html><code>anthropic-chat</code></html> | <html><code>ANTHROPIC_API_KEY</code></html> | <html><code>anthropic</code></html> | | | Anthropic (chat) | | ''anthropic-chat'' | ''ANTHROPIC_API_KEY'' | ''langchain-anthropic'' | |
| [[https://aws.amazon.com/bedrock/|Bedrock]] | Amazon Bedrock | <html><code>bedrock</code></html> | N/A | <html><code>boto3</code></html> | | | [[https://aws.amazon.com/bedrock/|Bedrock]] | Amazon Bedrock | ''bedrock'' | N/A | ''langchain-aws'' | |
| Bedrock (chat) | | <html><code>bedrock-chat</code></html> | N/A | <html><code>boto3</code></html> | | | Bedrock (chat) | | ''bedrock-chat'' | N/A | ''langchain-aws'' | |
| [[https://cohere.com/|Cohere]] | | <html><code>cohere</code></html> | <html><code>COHERE_API_KEY</code></html> | <html><code>cohere</code></html> | | | Bedrock (custom/provisioned) | | ''bedrock-custom'' | N/A | ''langchain-aws'' | |
| [[https://yiyan.baidu.com/|ERNIE-Bot]] | Chatbot developed by Baidu | <html><code>qianfan</code></html> | <html><code>QIANFAN_AK</code></html>, <html><code>QIANFAN_SK</code></html> | <html><code>qianfan</code></html> | | | [[https://cohere.com/|Cohere]] | | ''cohere'' | ''COHERE_API_KEY'' | ''langchain-cohere'' | |
| [[https://gemini.google.com/|Gemini]] | | <html><code>gemini</code></html> | <html><code>GOOGLE_API_KEY</code></html> [[https://aistudio.google.com/app/apikey|Get API key | Google AI Studio]] | <html><code>langchain-google-genai</code></html> | | | [[https://yiyan.baidu.com/|ERNIE-Bot]] | Chatbot developed by Baidu | ''qianfan'' | ''QIANFAN_AK'', ''QIANFAN_SK'' | ''qianfan'' | |
| [[https://gpt4all.io/|GPT4All]] | | <html><code>gpt4all</code></html> | N/A | <html><code>gpt4all</code></html> | | | [[https://gemini.google.com/|Gemini]] | | ''gemini'' | ''GOOGLE_API_KEY'' [[https://aistudio.google.com/app/apikey|Get API key | Google AI Studio]] | ''langchain-google-genai'' | |
| [[https://huggingface.co/|Hugging Face Hub]] | | <html><code>huggingface_hub</code></html> | <html><code>HUGGINGFACEHUB_API_TOKEN</code></html> | <html><code>huggingface_hub</code></html>, <html><code>ipywidgets</code></html>, <html><code>pillow</code></html> | | | [[https://gpt4all.io/|GPT4All]] | | ''gpt4all'' | N/A | ''gpt4all'' | |
| [[https://www.nvidia.com/en-us/ai-data-science/|NVIDIA]] | NVIDIA AI | <html><code>nvidia-chat</code></html> | <html><code>NVIDIA_API_KEY</code></html> | <html><code>langchain_nvidia_ai_endpoints</code></html> | | | [[https://huggingface.co/|Hugging Face Hub]] | | ''huggingface_hub'' | ''HUGGINGFACEHUB_API_TOKEN'' | ''huggingface_hub'', ''ipywidgets'', ''pillow'' | |
| [[https://platform.openai.com|OpenAI]] | | <html><code>openai</code></html> | <html><code>OPENAI_API_KEY</code></html> [[https://platform.openai.com/api-keys|API keys - OpenAI API]] | <html><code>openai</code></html> | | | [[https://mistral.ai/|MistralAI]] | | ''mistralai'' | ''MISTRAL_API_KEY'' | ''langchain-mistralai'' | |
| OpenAI (chat) | | <html><code>openai-chat</code></html> | <html><code>OPENAI_API_KEY</code></html> | <html><code>openai</code></html> | | | [[https://www.nvidia.com/en-us/ai-data-science/|NVIDIA]] | NVIDIA AI | ''nvidia-chat'' | ''NVIDIA_API_KEY'' | ''langchain_nvidia_ai_endpoints'' | |
| [[https://aws.amazon.com/sagemaker/|SageMaker]] | Amazon SageMaker | <html><code>sagemaker-endpoint</code></html> | N/A | <html><code>boto3</code></html> | | | [[https://ollama.com/|Ollama]] | | ''ollama'' | N/A | ''langchain-ollama'' | |
| | [[https://platform.openai.com|OpenAI]] | | ''openai'' | ''OPENAI_API_KEY'' [[https://platform.openai.com/api-keys|API keys - OpenAI API]] | ''langchain-openai'' | |
| | OpenAI (chat) | | ''openai-chat'' | ''OPENAI_API_KEY'' | ''langchain-openai'' | |
| | [[https://aws.amazon.com/sagemaker/|SageMaker]] | Amazon SageMaker | ''sagemaker-endpoint'' | N/A | ''langchain-aws'' | |
</WRAP> | </WRAP> |
[[rtd>jupyter-ai.readthedocs.io/en/latest/users/index.html#model-providers|Model providers - Users — Jupyter AI documentation]] より🤔\\ | [[rtd>jupyter-ai.readthedocs.io/en/latest/users/index.html#model-providers|Model providers - Users — Jupyter AI documentation]] より🤔\\ |
公式: [[https://jupyter-ai.readthedocs.io/en/latest/contributors/index.html#development-install|Development install - Contributors — Jupyter AI documentation]] [[gtr>https://jupyter-ai.readthedocs.io/en/latest/contributors/index.html#development-install|翻訳]]\\ | 公式: [[https://jupyter-ai.readthedocs.io/en/latest/contributors/index.html#development-install|Development install - Contributors — Jupyter AI documentation]] [[gtr>https://jupyter-ai.readthedocs.io/en/latest/contributors/index.html#development-install|翻訳]]\\ |
| |
[[linux:anyenv|anyenv]] で **Node.js** をインストールする🤔\\ | |
[[python:jupyterlab|JupyterLab]] をインストールする🤔\\ | [[python:jupyterlab|JupyterLab]] をインストールする🤔\\ |
| |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
<font color="#FF8700"><b>$</b></font> <font color="#26A269">micromamba</font> c<font color="#999999">reate </font><font color="#A347BA">-n</font><font color="#999999"> jupyter-ai_py311 </font><font color="#A347BA">-c</font><font color="#999999"> conda-forge python=3.11 nodejs=20</font> | <font color="#FF8700"><b>$</b></font> <font color="#26A269">mamba</font> c<font color="#999999">reate </font><font color="#A347BA">-n</font><font color="#999999"> jupyter-ai_py311 </font><font color="#A347BA">-c</font><font color="#999999"> conda-forge python=3.11 nodejs=20</font> |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_result_hlong><html><pre> | <WRAP color_result_hlong><html><pre> |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
<font color="#FF8700"><b>$</b></font> <font color="#26A269">micromamba</font> activate jupyter-ai_py311 | <font color="#FF8700"><b>$</b></font> <font color="#26A269">mamba</font> activate jupyter-ai_py311 |
(jupyter-ai_py311) <font color="#FF8700"><b>$</b></font> <font color="#26A269">./scripts/install.sh</font> | (jupyter-ai_py311) <font color="#FF8700"><b>$</b></font> <font color="#26A269">./scripts/install.sh</font> |
</pre></html></WRAP> | </pre></html></WRAP> |
Installing collected packages: accessible-pygments, mdit-py-plugins, pydata_sphinx_theme, myst_parser | Installing collected packages: accessible-pygments, mdit-py-plugins, pydata_sphinx_theme, myst_parser |
Successfully installed accessible-pygments-0.0.4 mdit-py-plugins-0.4.0 myst_parser-2.0.0 pydata_sphinx_theme-0.15.2 | Successfully installed accessible-pygments-0.0.4 mdit-py-plugins-0.4.0 myst_parser-2.0.0 pydata_sphinx_theme-0.15.2 |
| </pre></html></WRAP> |
| </WRAP> |
| |
| ==== Python 3.12 環境を試す場合🤔 ==== |
| <WRAP color_term> |
| <WRAP color_command><html><pre> |
| <font color="#FF8700"><b>$</b></font> <font color="#26A269">git</font><font color="#999999"> clone https://github.com/jupyterlab/jupyter-ai.git</font> |
| </pre></html></WRAP> |
| <WRAP color_result><html><pre> |
| Cloning into 'jupyter-ai'... |
| remote: Enumerating objects: 4239, done. |
| remote: Counting objects: 100% (957/957), done. |
| remote: Compressing objects: 100% (350/350), done. |
| remote: Total 4239 (delta 723), reused 732 (delta 591), pack-reused 3282 |
| Receiving objects: 100% (4239/4239), 8.08 MiB | 1.56 MiB/s, done. |
| Resolving deltas: 100% (2766/2766), done. |
| </pre></html></WRAP> |
| <WRAP color_command><html><pre> |
| <font color="#FF8700"><b>$</b></font> <font color="#26A269">mamba</font> c<font color="#999999">reate </font><font color="#A347BA">-n</font><font color="#999999"> jupyter-ai_py312 </font><font color="#A347BA">-c</font><font color="#999999"> conda-forge python=3.12 nodejs=20</font> |
| </pre></html></WRAP> |
| <WRAP color_result_hlong><html><pre> |
</pre></html></WRAP> | </pre></html></WRAP> |
</WRAP> | </WRAP> |