A minimalist client for OpenAI APIs.
Project description
oaix
A minimalist OpenAI API client.
Installation
pip install oaix
Usage
import oaix
oaix.Api().post('chat/completions', json={
'model': 'gpt-3.5-turbo',
'messages': [
{
'role': 'system',
'content': "You will introduce yourself as Batman. Then I will ask you a question which you will answer as Batman."
},
{
'role': 'assistant',
'content': "Hello, I'm Batman."
},
{
'role': 'user',
'content': 'Tell me exactly who you are and what you do using only four words.'
}
]
})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
oaix-0.1.0.tar.gz
(2.1 kB
view hashes)