Bringing the power of ChatGPT into Livebook! KinoCopilot is a series of Kino SmartCells which allow you to have an AI Copilot help you write code.
To bring KinoCopilot to Livebook all you need to do is Mix.install/2:
Mix.install([
{:kino_copilot, "~> 0.1.2"}
])
By default we'll use the LB_OPENAI_API_KEY
for the API key.
Optionally, however, you can explicitly pass in your API key and specify which model to use.
Mix.install(
[
{:kino_copilot, "~> 0.1.2"}
],
config: [
kino_copilot: [
api_key: System.fetch_env!("LB_OPENAI_API_KEY"),
model: "gpt-3.5-turbo"
]
]
)
KinoCopilot is still an active development. If you want to contribute, here are some instructions that will help get you up and running.
First, you're going to want to install the package from source.
Mix.install([
{:kino_copilot, path: "/Users/thomas/code/kino_copilot"},
])
Then, if you're modifying any of the front-end bits, you'll want to make sure you have tailwind running in the background, recompiling the CSS.
$ npx tailwindcss -o lib/assets/code_writer_cell/main.css --content lib/assets/code_writer_cell/main.js --watch
In the future when we have specialized code writer cells for various languages you'll want to run this command for the specific smart cell you are working on.