Models
Response model classes (mirror OpenAI SDK objects).
Message
Choice
One completion choice.
Source code in superme_sdk/models.py
Usage
Token usage statistics.
Source code in superme_sdk/models.py
ChatCompletion
OpenAI-compatible chat completion response.
SuperMe-specific fields (metadata) are preserved as attributes.
Source code in superme_sdk/models.py
StreamEvent
dataclass
A single event yielded by streaming methods.
Example::
for event in client.ask_my_agent_stream("Summarise my last 3 posts"):
if event.done:
print("conversation_id:", event.conversation_id)
else:
print(event.text, end="", flush=True)
Attributes:
| Name | Type | Description |
|---|---|---|
text |
str
|
Text chunk (empty string on the done event). |
done |
bool
|
True on the final event — no more events will follow. |
conversation_id |
Optional[str]
|
Populated on the done event so callers can capture the ID without making a second API call. |