Skip to main content

A Jupyter kernel for communicating with large language models

Project description

ipy-llm-kernel

ipy-llm-kernel is a Jupyter kernel that allows you to type in English language and receive responses from a large language model (LLM).

img_1.png

It can make use of OpenAI's chatGPT, Anthropic's Claude, Helmholtz' blablador and Ollama. You need an OpenAI API, Anthropic, Google or a Helmholtz account to use it. Using it with Ollama is free but requires running an Ollama server locally.

[!CAUTION] When using the OpenAI, Google Gemini, Anthropic or any other endpoint via BiA-Bob, you are bound to the terms of service of the respective companies or organizations. The prompts you enter are transferred to their servers and may be processed and stored there. Make sure to not submit any sensitive, confidential or personal data. Also using these services may cost money.

Usage

After starting jupyter lab, select the LLM Kernel.

img.png

You can then type in English language and receive responses from the LLM as demonstrated above

Installation

First, you should also create an environment variable named "IPY_LLM_KERNEL_MODEL" and enter a model name depending on which service provider you want to use. Examples:

  • llama3:8b
  • blablador:alias:large
  • claude-3-5-sonnet-20240620
  • gpt-4o-2024-08-06

Then, start a new terminal to install ipy-llm-kernel using pip. It is recommended to install it into via conda/mamba environment. If you have never used conda before, please read this guide first.

pip install ipy-llm-kernel

Afterwards, run additionally this command:

python -m ipy_llm_kernel install

You can check if it's installed by printing out the list of installed kernels:

jupyter kernelspec list

And you can uninstall them using this command:

jupyter kernelspec uninstall llm-kernel

Development

If you want to contribute to ipy-llm-kernel, you can install it in development mode like this:

git clone https://github.com/haesleinhuepf/ipy-llm-kernel.git
cd ipy-llm-kernel
pip install -e .

Similar projects

There are similar projects:

Issues

If you encounter any problems or want to provide feedback or suggestions, please create an issue along with a detailed description and tag @haesleinhuepf .

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

ipy_llm_kernel-0.1.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

ipy_llm_kernel-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file ipy_llm_kernel-0.1.0.tar.gz.

File metadata

  • Download URL: ipy_llm_kernel-0.1.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for ipy_llm_kernel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 09ab9ef127f43d2ab29eae3754956498bcc092a0b0f846eb81dfefd854a48f0c
MD5 79ab31b04762ce215c130bbcc6c2da80
BLAKE2b-256 2e7eddc78c5b787d3600345f188c57d59d6267159564400b08d4c0f7b286be7f

See more details on using hashes here.

File details

Details for the file ipy_llm_kernel-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ipy_llm_kernel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee5d2255ce40070bc8aa974e89c165c9a702144b8bef136fabee0824e459d222
MD5 083ecb45465a06e1f75919894e82cc9e
BLAKE2b-256 aebd49beee3cf41a10b8ba53dcba5161a072785c27e8175a9939baa3e50b172e

See more details on using hashes here.

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