Conversations (async)
Async variants of :class:~superme_sdk.services._conversations.ConversationsMixin.
Non-streaming calls are awaitable (await client.ask(...)); streaming
calls return an async generator (async for chunk in client.ask(..., stream=True)).
A streaming generator holds an open SSE connection until a terminal event —
if you stop early (break), call aclose() on it (or fully drain it)
so the connection is released promptly rather than at GC time.
Note: unlike the sync client, async non-streaming ask is served by the
partner endpoint and does not support incognito / max_tokens.
Source code in superme_sdk/services/aio/_conversations.py
ask
ask(
question: str,
username: str = "ludo",
*,
conversation_id: Optional[str] = None,
stream: bool = False,
) -> Awaitable[str] | AsyncIterator[PartnerStreamChunk]
Ask a single question to a user's SuperMe agent (async).
Example
Returns:
| Type | Description |
|---|---|
Awaitable[str] | AsyncIterator[PartnerStreamChunk]
|
An awaitable resolving to the answer string, or — when
|