Edgar Ruiz
Author
This package is meant to make it easy to chat with LLM’s inside your IDE. You select an LLM to use for your Python session, and you can simply ask questions directly it, or use an included Shiny app. The Shiny app recognizes code, and adds a “copy” button, which allows you to easily bring it into your code. chapy
also includes a default System Message, that tells the LLM that you want code in Python, so your chat will already have that context.
The currently supported back ends are:
To install from Github:
This application has been developed and tested in the Positron IDE.
To use in the console, use the chat()
function:
If you have not specify the model you wish to use, chapy
will prompt you to select one. The options will be based on your environment. If it finds Ollama, it will list your currently installed models. If it detects your OpenAI Token loaded in the OPENAI_API_KEY environment variable, it will display the current OpenAI models. Here is an example:
As with it’s sister R package, chapy
comes with a Shiny for Python app that provides chat-like interface with the LLM. To use, make sure to have the VSCode Shiny extension installed.
To run the app use:
chapy - 0.0.5 | Developed by Edgar Ruiz