本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
Jupyter AI 安裝
若要使用 Jupyter AI,您必須先安裝 Jupyter AI 套件。對於 Amazon SageMaker AI Distribution
對於其他 IPython 環境的使用者,建議的 Jupyter AI 套件版本取決於他們正在使用的 JupyterLab 版本。
Jupyter AI Distribution 包含兩個套件。
-
jupyter_ai:此套件提供 JupyterLab 延伸模組和原生聊天使用者介面 (UI)。它使用您選擇的大型語言模型做為對話助理。 -
jupyter_ai_magics:此套件提供 IPython%%ai和%ai魔術命令,您可以使用這些命令,從筆記本儲存格調用大型語言模型 (LLM)。
注意
安裝 jupyter_ai 也會安裝 jupyter_ai_magics。不過,您可以在沒有 JupyterLab 或 jupyter_ai 的情況下獨立安裝 jupyter_ai_magics。魔術命令 %%ai 和 %ai 可在任何 IPython 核心環境中運作。如果您只安裝 jupyter_ai_magics,則無法使用聊天 UI。
對於 JupyterLab 3 的使用者,特別是 Studio Classic 使用者,我們建議您安裝 jupyter-ai 1.5.x 版jupyter-ai 版本可能不允許使用者設定其他模型參數,例如溫度、top-k 和 top-p 取樣、字符數上限或長度上限,或使用者接受授權合約。
對於不使用 SageMaker Distribution 的 JupyterLab 4 環境使用者,我們建議安裝 jupyter-ai 2.5.x 版
請參閱 Jupyter AI 文件