Codestral AI代码补全和聊天工具,适用于JupyterLab
项目描述
jupyterlab-codestral
AI代码补全和聊天工具,适用于JupyterLab,Notebook 7和JupyterLite,由MistralAI提供✨
一个显示Codestral扩展在JupyterLite中的屏幕录制
需求
[!NOTE] 此扩展旨在在JupyterLite中使用,以在浏览器中启用特定的AI代码补全和聊天功能。要启用JupyterLab和Jupyter Notebook中的更多AI提供商,我们建议直接使用Jupyter AI扩展。目前Jupyter AI与JupyterLite不兼容,但将来可能在某种程度上兼容。
- JupyterLab >= 4.1.0或Notebook >= 7.1.0
[!WARNING] 此扩展仍处于非常实验性的阶段。它不是官方的MistralAI扩展。它正在探索将MistralAI API与JupyterLab集成,该API还可以在JupyterLite中使用。有关JupyterLab的更完整的AI扩展,请参阅Jupyter AI。
✨ 在您的浏览器中尝试它 ✨
您可以使用JupyterLite在您的浏览器中尝试此扩展
有关如何提供API密钥的更多信息,请参阅下面的使用部分。
安装
要安装此扩展,请执行以下操作
pip install jupyterlab-codestral
使用
- 前往 https://console.mistral.ai/api-keys/ 创建API密钥。
- 打开JupyterLab设置,进入Codestral部分输入API密钥
- 打开聊天窗口,或使用内联补全功能
卸载
要删除扩展,请执行以下命令
pip uninstall jupyterlab-codestral
贡献
开发安装
注意:您需要NodeJS来构建扩展包。
jlpm
命令是JupyterLab安装的yarn的固定版本。您可以在以下示例中用yarn
或npm
代替jlpm
。
# Clone the repo to your local environment
# Change directory to the jupyterlab_codestral directory
# Install package in development mode
pip install -e "."
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm build
您可以在不同的终端中同时监视源目录并运行JupyterLab,以监视扩展源代码的变化并自动重新构建扩展。
# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm watch
# Run JupyterLab in another terminal
jupyter lab
在监视命令运行时,每次保存的更改都将立即本地构建并可供正在运行的JupyterLab使用。刷新JupyterLab以在浏览器中加载更改(您可能需要等待几秒钟以重新构建扩展)。
默认情况下,jlpm build
命令为此扩展生成源映射,以便更容易使用浏览器开发者工具进行调试。要为JupyterLab核心扩展也生成源映射,可以运行以下命令
jupyter lab build --minimize=False
开发卸载
pip uninstall jupyterlab-codestral
在开发模式下,您还需要删除由jupyter labextension develop
命令创建的符号链接。要找到其位置,可以运行jupyter labextension list
以确定labextensions
文件夹的位置。然后您可以删除该文件夹中的名为jupyterlab-codestral
的符号链接。
打包扩展
项目详情
下载文件
下载您平台上的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分布
构建分布
jupyterlab_codestral-0.1.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 2eb30ecaf6d4091de8dc6a99899e70ac8c587d1257902c5f52a41117cdf1f2fe |
|
MD5 | dac6115b49a99951ab2dd275b5f010b0 |
|
BLAKE2b-256 | 068b220b6358314d81a185a76b2c0a62f11feccbd390b4c68a5c9810cfca121e |
jupyterlab_codestral-0.1.0-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | cb2c9688bbfba208658c0fbe57b4ce054476952c23eea22d75642d5fc4ffac72 |
|
MD5 | d7c035f0f87992c391d873423ae19da6 |
|
BLAKE2b-256 | 91006871f38e1e57c6f7592bcb58d7a6410f50c3be6f5fe8c36b689ca76f7391 |