Commit Graph

5 Commits

Author SHA1 Message Date
Paul Harrison 2d10e3ff40 Update openai to v1.9
The update from openai 0.x to 1.x introduced many breaking changes. This
commit makes the required refactoring to address these changes.

Closes #9
2024-01-23 23:41:35 +01:00
Paul Harrison 68fc11c450 Name conversation
Closes #4
2023-09-14 18:02:45 +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
Paul Harrison 0015ae4bff Add linting checks and code formatting
Linting checks are performed using Ruff, Mypy, and Pydocstyle. Code
formatting is performed using Black and Isort. A Makefile is also added
with linting and formatting commands for convenience.
2023-08-16 10:10:06 +01:00
Paul Harrison c9f01c7dc2 Basic interface to OpenAI's chat completion API
This commit implements a basic interface to hold a conversation with
OpenAI's GPT models via their API, using OpenAI's Python SDK. In
addition to this interface, the commit incorporates Pydantic for
managing settings via environment variables.
2023-08-14 12:49:38 +01:00