Elia
A terminal ChatGPT client built with Textual
Note Elia is still a work in progress. How far will I go with this? I have no idea...
Quickstart
Install Elia with pipx, set your OpenAI API key environment variable, and start the app:
pipx install git+https://github.com/darrenburns/elia
export OPENAI_API_KEY="xxxxxxxxxxxxxx"
elia
Wiping the Chat History
Chat history is stored in a SQLite database alongside the Elia application. To wipe the chat history, simply run the db reset command:
elia reset
Changing the Chat Directive
By default, Elia's conversations with ChatGPT are primed with a directive for the GPT model:
You are a helpful assistant.
This can be changed by setting the ELIA_DIRECTIVE
environment variable before
starting a new conversation. A directive is set for the lifetime of a conversation.
export ELIA_DIRECTIVE="You are a helpful assistant who talks like a pirate."
elia
Launching Directly into a Conversation
elia chat write python code to detect a palindrome
Progress updates
June 2023
Messages are now tokenized and you can see how messages are split into tokens using the "Message Details" modal.
![image](https://private-user-images.githubusercontent.com/5740731/256915830-395fd2b5-ca83-49cc-b86b-163a44fe7750.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDMwNzM5MjAsIm5iZiI6MTcwMzA3MzYyMCwicGF0aCI6Ii81NzQwNzMxLzI1NjkxNTgzMC0zOTVmZDJiNS1jYTgzLTQ5Y2MtYjg2Yi0xNjNhNDRmZTc3NTAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQUlXTkpZQVg0Q1NWRUg1M0ElMkYyMDIzMTIyMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyMzEyMjBUMTIwMDIwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDBhODg0Mzk5MmIwYjY1ODU5YmM3N2NmNWRlY2QyZDU5NzNjMDVhMTA3YzE5MjVlMDEwNTk0NWViMzRlNmZhZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.hwfODkynd-joOMmz98_1Fub6KG6tmVjUCVm3-aMkrhU)
May 29th 2023
SQLite/SQLModel chosen for persistence. Conversations can be imported from ChatGPT and they'll be displayed in the sidebar. Selecting a conversation in the sidebar will load it into the main window. Raw markdown can be displayed.
elia-demo-importchatgpt-29may23.mov
May 24th 2023
Much of the core UI is in place, with some placeholders. No persistence yet, but I've begun to explore it.
elia-demo-2.mov
May 4th 2023
Initial proof of concept.