首先在https://ai.geelib.360.cn/copilotcode/#/history 官网下载 jupyter插件安装包。
1.依赖环境
Python>3.8 : 如,pip install python=3.12
Jupyterlab: 如,pip install jupyterlab~=4.0
Notebook:如, pip install notebook~=7.2
langchain_openai, pip install langchain_openai~=0.1.25
2.安装jupyter-ai-magics
pip install jupyter_ai_magics-1.0.0-py3-none-any.whl
3.安装 jupyter-ai
pip install jupyter_ai-1.0.0-py3-none-any.whl
4.使用方法
命令行
jupyter-notebook
打开home
;/view/open jupyterLab
打开即可使用对话窗口,即可看到指令说明-chat指令:
/ask — 对你学习的数据进行提问/clear — 清空聊天窗口/generate — 根据输入生成notebook/learn — 让智效Jupyternaut学习文件或文件夹内容/export — 将聊天历史导出为Markdown文档/fix — 修复你在notebook中选中的错误单元/help — 帮助-learn:
/learn –d删除已经学习的内容`cell` 使用
- 先加载
%load_ext jupyter_ai_magics
- 查看模型
%ai list
- 选择
360zhixiao
模型
- 使用模型
%%ai zhixiao-chat:Qwen2.5-Coder-32B-Instruct-zx –f code列表排序代码-f 可有可无,类型包括(code、markdown、math、html、json、text)- 先加载