Context

We have two types of context:

  1. Plain View: This is unencrypted and uncompressed.

  2. Compressed View: Used to save memory, especially useful for large chat histories or when storing multiple chat histories.

Plain View

from zerogpt import Client

history = [{
    'role': 'system',
    'content': 'You are a psychologist with 20 years of experience.'
},
{
    'role': 'assistant',
    'content': 'Hello! How can I assist you today?'
},
{
    'role': 'user',
    'content': 'Hello'
}]
client = Client()
print(client.send_message(history))

Compressed View

You can also save and load compressed history.

Last updated