Chat
Chat proxy classes (client.chat.completions.create).
Completions
Proxy for client.chat.completions.
Source code in superme_sdk/_chat_proxy.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
create
create(
messages: list,
model: str = "gpt-4",
*,
username: str = "ludo",
conversation_id: Optional[str] = None,
max_tokens: int = 1000,
incognito: bool = False,
response_format: Optional[dict] = None,
**kwargs: Any,
) -> ChatCompletion
Create a chat completion via the MCP ask tool.
Example
Note
OpenAI compat quirks — this wraps the SuperMe MCP ask tool,
not a real OpenAI endpoint:
model— ignored. The SuperMe AI determines the model.messages— only the lastrole: usermessage is sent. Prior messages in the list are not forwarded; passconversation_idto continue a thread.max_tokens— ignored by the MCP backend.response_format— not supported, ignored.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
messages
|
list
|
List of |
required |
model
|
str
|
Ignored — kept for OpenAI interface compatibility. |
'gpt-4'
|
username
|
str
|
Target SuperMe username. |
'ludo'
|
conversation_id
|
Optional[str]
|
Continue an existing conversation. |
None
|
max_tokens
|
int
|
Ignored — kept for OpenAI interface compatibility. |
1000
|
incognito
|
bool
|
Ask anonymously. |
False
|
response_format
|
Optional[dict]
|
Not supported, ignored. |
None
|
Returns:
| Type | Description |
|---|---|
ChatCompletion
|
class: |
ChatCompletion
|
and |
Source code in superme_sdk/_chat_proxy.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |