You can use simpler types. Instead of :
messages=[
GPTMessage(
role=GPTMessageRole.SYSTEM,
content=SYSTEM_PROMPT,
),
GPTMessage(
role=GPTMessageRole.USER,
content="Text: I love this product. It's the best thing ever!",
)
]
Try: messages=(
("system", SYSTEM_PROMPT),
("user", "Text: I love this product. It's the best thing ever!")
)
Or: messages=(
SystemMsg(SYSTEM_PROMPT),
UserMsg("Text: I love this product. It's the best thing ever!")
)
This is still Python, not Java.