Commit Graph

4 Commits

Author SHA1 Message Date
Paul Harrison f93a257300 Store conversation history on session end
At the end of each sesssion the conversation is stored to a directory
(defaulting to `.history` in the currrent working directory) as a JSON
object. Note, the session must be ended by sending the quit message (/q)
for the conversation to be saved. Ctrl+C will not work.
2023-08-24 18:19:38 +01:00
Paul Harrison 1670383fee Display running cost in USD after each response 2023-08-24 15:23:32 +01:00
Paul Harrison 2cd623e960 Optionally provide context files to chat session
This commit enables the user to provide one or more text files as
context for their chat session. These will be provided as system
messages to OpenAI's API, one message per file.
2023-08-23 09:35:33 +01:00
Paul Harrison 7cbde55aac Implement basic command line interface
Implements a basic CLI using Typer, Rich, and Prompt Toolkit. I couldn't
work out how to propoerly mock/fake the Rich console or the prompt
session from Prompt Toolkit, so I created dummy functions to work around
them and just test the basic application flow rather than user inputs
and outputs to the terminal.
2023-08-22 10:02:02 +01:00