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...
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
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
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
elia chat write python code to detect a palindrome
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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU3NTM5NjIsIm5iZiI6MTcyNTc1MzY2MiwicGF0aCI6Ii81NzQwNzMxLzI1NjkxNTgzMC0zOTVmZDJiNS1jYTgzLTQ5Y2MtYjg2Yi0xNjNhNDRmZTc3NTAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDhUMDAwMTAyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzBkODE1ODBkNDkzZDNhNmE0ZGU3NGQxMzRjY2E3ZTdiMWQzNmMzODEzMzU0OTBkZjA4OTAxMzI3NDY1ZjFhZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.ng3QEFBWpVVHdl4vRxCa77wnWXt-t3Rg8QcoOsckkXc)
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
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
Initial proof of concept.