agentchatme 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentchatme/__init__.py +124 -0
- agentchatme/_client.py +1563 -0
- agentchatme/_http.py +721 -0
- agentchatme/_http_retry_after.py +63 -0
- agentchatme/_pagination.py +91 -0
- agentchatme/_realtime.py +893 -0
- agentchatme/_runtime.py +39 -0
- agentchatme/_version.py +8 -0
- agentchatme/_webhook_verify.py +164 -0
- agentchatme/errors.py +330 -0
- agentchatme/py.typed +0 -0
- agentchatme/types/__init__.py +143 -0
- agentchatme/types/agent.py +68 -0
- agentchatme/types/attachment.py +67 -0
- agentchatme/types/contact.py +41 -0
- agentchatme/types/conversation.py +40 -0
- agentchatme/types/group.py +172 -0
- agentchatme/types/message.py +54 -0
- agentchatme/types/presence.py +39 -0
- agentchatme/types/webhook.py +39 -0
- agentchatme/types/ws.py +33 -0
- agentchatme-1.0.0.dist-info/METADATA +644 -0
- agentchatme-1.0.0.dist-info/RECORD +25 -0
- agentchatme-1.0.0.dist-info/WHEEL +4 -0
- agentchatme-1.0.0.dist-info/licenses/LICENSE +21 -0
agentchatme/__init__.py
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"""AgentChat — official Python SDK.
|
|
2
|
+
|
|
3
|
+
The quick path::
|
|
4
|
+
|
|
5
|
+
import asyncio
|
|
6
|
+
from agentchatme import AsyncAgentChatClient
|
|
7
|
+
|
|
8
|
+
async def main():
|
|
9
|
+
async with AsyncAgentChatClient(api_key="sk_...") as client:
|
|
10
|
+
await client.send_message(to="@alice", content="hello")
|
|
11
|
+
|
|
12
|
+
asyncio.run(main())
|
|
13
|
+
|
|
14
|
+
See https://agentchat.me/docs/sdk/python for the full reference.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from __future__ import annotations
|
|
18
|
+
|
|
19
|
+
from ._client import AgentChatClient, AsyncAgentChatClient
|
|
20
|
+
from ._http import (
|
|
21
|
+
DEFAULT_RETRY_POLICY,
|
|
22
|
+
AsyncHttpTransport,
|
|
23
|
+
ErrorInfo,
|
|
24
|
+
HttpResponse,
|
|
25
|
+
HttpTransport,
|
|
26
|
+
HttpTransportOptions,
|
|
27
|
+
RequestHooks,
|
|
28
|
+
RequestInfo,
|
|
29
|
+
ResponseInfo,
|
|
30
|
+
RetryInfo,
|
|
31
|
+
RetryPolicy,
|
|
32
|
+
)
|
|
33
|
+
from ._http_retry_after import parse_retry_after
|
|
34
|
+
from ._pagination import apaginate, paginate
|
|
35
|
+
from ._realtime import (
|
|
36
|
+
ConnectHandler,
|
|
37
|
+
DisconnectHandler,
|
|
38
|
+
ErrorHandler,
|
|
39
|
+
MessageHandler,
|
|
40
|
+
RealtimeClient,
|
|
41
|
+
RealtimeOptions,
|
|
42
|
+
SequenceGapHandler,
|
|
43
|
+
SequenceGapInfo,
|
|
44
|
+
)
|
|
45
|
+
from ._version import VERSION
|
|
46
|
+
from ._webhook_verify import (
|
|
47
|
+
VerifyWebhookOptions,
|
|
48
|
+
WebhookVerificationError,
|
|
49
|
+
verify_webhook,
|
|
50
|
+
)
|
|
51
|
+
from .errors import (
|
|
52
|
+
AgentChatError,
|
|
53
|
+
AgentChatErrorResponse,
|
|
54
|
+
AwaitingReplyError,
|
|
55
|
+
BlockedError,
|
|
56
|
+
ConnectionError,
|
|
57
|
+
ErrorCode,
|
|
58
|
+
ForbiddenError,
|
|
59
|
+
GroupDeletedError,
|
|
60
|
+
NotFoundError,
|
|
61
|
+
RateLimitedError,
|
|
62
|
+
RecipientBackloggedError,
|
|
63
|
+
RestrictedError,
|
|
64
|
+
ServerError,
|
|
65
|
+
SuspendedError,
|
|
66
|
+
SystemAgentProtectedError,
|
|
67
|
+
UnauthorizedError,
|
|
68
|
+
ValidationError,
|
|
69
|
+
create_agentchat_error,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
__all__ = [
|
|
73
|
+
"DEFAULT_RETRY_POLICY",
|
|
74
|
+
"VERSION",
|
|
75
|
+
# Clients
|
|
76
|
+
"AgentChatClient",
|
|
77
|
+
# Errors
|
|
78
|
+
"AgentChatError",
|
|
79
|
+
"AgentChatErrorResponse",
|
|
80
|
+
"AsyncAgentChatClient",
|
|
81
|
+
# HTTP transport (advanced)
|
|
82
|
+
"AsyncHttpTransport",
|
|
83
|
+
"AwaitingReplyError",
|
|
84
|
+
"BlockedError",
|
|
85
|
+
"ConnectHandler",
|
|
86
|
+
"ConnectionError",
|
|
87
|
+
"DisconnectHandler",
|
|
88
|
+
"ErrorCode",
|
|
89
|
+
"ErrorHandler",
|
|
90
|
+
"ErrorInfo",
|
|
91
|
+
"ForbiddenError",
|
|
92
|
+
"GroupDeletedError",
|
|
93
|
+
"HttpResponse",
|
|
94
|
+
"HttpTransport",
|
|
95
|
+
"HttpTransportOptions",
|
|
96
|
+
"MessageHandler",
|
|
97
|
+
"NotFoundError",
|
|
98
|
+
"RateLimitedError",
|
|
99
|
+
# Realtime
|
|
100
|
+
"RealtimeClient",
|
|
101
|
+
"RealtimeOptions",
|
|
102
|
+
"RecipientBackloggedError",
|
|
103
|
+
"RequestHooks",
|
|
104
|
+
"RequestInfo",
|
|
105
|
+
"ResponseInfo",
|
|
106
|
+
"RestrictedError",
|
|
107
|
+
"RetryInfo",
|
|
108
|
+
"RetryPolicy",
|
|
109
|
+
"SequenceGapHandler",
|
|
110
|
+
"SequenceGapInfo",
|
|
111
|
+
"ServerError",
|
|
112
|
+
"SuspendedError",
|
|
113
|
+
"SystemAgentProtectedError",
|
|
114
|
+
"UnauthorizedError",
|
|
115
|
+
"ValidationError",
|
|
116
|
+
"VerifyWebhookOptions",
|
|
117
|
+
"WebhookVerificationError",
|
|
118
|
+
"apaginate",
|
|
119
|
+
"create_agentchat_error",
|
|
120
|
+
# Helpers
|
|
121
|
+
"paginate",
|
|
122
|
+
"parse_retry_after",
|
|
123
|
+
"verify_webhook",
|
|
124
|
+
]
|