Skip to main content

Run a IPython interpreter in the LLM virtual environment

Project description

llm-jupyter

PyPI Changelog Tests License

Run a IPython interpreter in the LLM virtual environment

Installation

Install this plugin in the same environment as LLM.

llm install llm-jupyter

Usage

IPython

This plugin adds a new ipython command to LLM. This executes IPython in the same virtual environment as LLM itself.

You can use this to check the Python version

llm ipython --version
# Should output '8.20.0' or similar

Or to start a IPython shell. In that shell you can import llm and use it to interact with models:

llm ipython
In [1]: !llm 'Who are you?'
# Output: I am an AI digital assistant here to help you with any questions or tasks you may have. How can I assist you today?

Notebook

This plugin also adds a new notebook command to LLM. This executes a Jupyter Notebook in the same virtual environment as LLM itself.

llm notebook
!llm 'Who are you?'
# Output: I am an AI digital assistant here to help you with any questions or tasks you may have. How can I assist you today?

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

git clone git@github.com:lucasrcezimbra/llm-jupyter.git
cd llm-jupyter
python -m venv .venv
source .venv/bin/activate
pip install -e .[test]

Now install the dependencies and test dependencies:

llm install -e '.[test]'

To run the tests:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_jupyter-0.1.0.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

llm_jupyter-0.1.0-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page