caitlyn 0.8.1__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.
- caitlyn/__init__.py +223 -0
- caitlyn/_client.py +2246 -0
- caitlyn/_operations.py +482 -0
- caitlyn/_version.py +59 -0
- caitlyn/auth.py +24 -0
- caitlyn/errors.py +123 -0
- caitlyn/events.py +354 -0
- caitlyn/models.py +1030 -0
- caitlyn/py.typed +0 -0
- caitlyn-0.8.1.dist-info/METADATA +40 -0
- caitlyn-0.8.1.dist-info/RECORD +12 -0
- caitlyn-0.8.1.dist-info/WHEEL +4 -0
caitlyn/__init__.py
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Code generated by caitlyn-python-codegen from the Caitlyn Smithy model. DO NOT EDIT.
|
|
2
|
+
"""The Caitlyn API Python SDK.
|
|
3
|
+
|
|
4
|
+
```python
|
|
5
|
+
from caitlyn import Caitlyn
|
|
6
|
+
from caitlyn.auth import Token
|
|
7
|
+
|
|
8
|
+
caitlyn = Caitlyn(workspace="your-company.getcaitlyn.ai", auth=Token(os.environ["CAITLYN_TOKEN"]))
|
|
9
|
+
```
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
from caitlyn_core import (
|
|
15
|
+
AsyncEventStream,
|
|
16
|
+
AsyncPaginator,
|
|
17
|
+
CaitlynAuthError,
|
|
18
|
+
CaitlynConnectionError,
|
|
19
|
+
CaitlynError,
|
|
20
|
+
CallContext,
|
|
21
|
+
EventStream,
|
|
22
|
+
Interceptor,
|
|
23
|
+
NotSupportedByServer,
|
|
24
|
+
Paginator,
|
|
25
|
+
ResponseMetadata,
|
|
26
|
+
RetryPolicy,
|
|
27
|
+
StreamLostError,
|
|
28
|
+
WaiterError,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
from caitlyn._client import AsyncCaitlyn, Caitlyn
|
|
32
|
+
from caitlyn._version import SDK_MODEL, __version__
|
|
33
|
+
from caitlyn.errors import (
|
|
34
|
+
ConflictError,
|
|
35
|
+
InternalError,
|
|
36
|
+
NotFoundError,
|
|
37
|
+
PayloadTooLargeError,
|
|
38
|
+
PermissionDeniedError,
|
|
39
|
+
PreconditionFailedError,
|
|
40
|
+
PreconditionRequiredError,
|
|
41
|
+
ServiceUnavailableError,
|
|
42
|
+
TooManyRequestsError,
|
|
43
|
+
UnauthenticatedError,
|
|
44
|
+
UnprocessableContentError,
|
|
45
|
+
ValidationError,
|
|
46
|
+
)
|
|
47
|
+
from caitlyn.events import (
|
|
48
|
+
CitationAddedEvent,
|
|
49
|
+
ConversationEvent,
|
|
50
|
+
InputRequestedEvent,
|
|
51
|
+
MessageCompletedEvent,
|
|
52
|
+
MessageFailedEvent,
|
|
53
|
+
MessageStartedEvent,
|
|
54
|
+
PhaseChangedEvent,
|
|
55
|
+
ProgressUpdatedEvent,
|
|
56
|
+
StreamResetEvent,
|
|
57
|
+
TextDeltaEvent,
|
|
58
|
+
ToolFinishedEvent,
|
|
59
|
+
ToolStartedEvent,
|
|
60
|
+
WorkspaceConversationCreatedEvent,
|
|
61
|
+
WorkspaceEvent,
|
|
62
|
+
WorkspaceInputRequestedEvent,
|
|
63
|
+
WorkspaceMessageCompletedEvent,
|
|
64
|
+
WorkspaceMessageFailedEvent,
|
|
65
|
+
WorkspaceToolFinishedEvent,
|
|
66
|
+
)
|
|
67
|
+
from caitlyn.models import (
|
|
68
|
+
Actor,
|
|
69
|
+
ActorType,
|
|
70
|
+
AgentConfiguration,
|
|
71
|
+
AgentVersion,
|
|
72
|
+
AgentVersionSummary,
|
|
73
|
+
AttachmentSettings,
|
|
74
|
+
BatchDeleteDocumentsResult,
|
|
75
|
+
Caller,
|
|
76
|
+
Citation,
|
|
77
|
+
ClearableDraftField,
|
|
78
|
+
ContentSafety,
|
|
79
|
+
ContextItem,
|
|
80
|
+
Conversation,
|
|
81
|
+
ConversationCreated,
|
|
82
|
+
CreateDocumentResult,
|
|
83
|
+
CredentialKind,
|
|
84
|
+
DeleteAgentVersionResult,
|
|
85
|
+
DeleteDocumentResult,
|
|
86
|
+
Document,
|
|
87
|
+
DocumentDeleteResult,
|
|
88
|
+
DocumentDeleteStatus,
|
|
89
|
+
DocumentFailure,
|
|
90
|
+
DocumentFailureCode,
|
|
91
|
+
DocumentStatus,
|
|
92
|
+
EventActor,
|
|
93
|
+
EventSubject,
|
|
94
|
+
FieldError,
|
|
95
|
+
GetDocumentResult,
|
|
96
|
+
GetUploadResult,
|
|
97
|
+
InputRequested,
|
|
98
|
+
KnowledgeBaseBinding,
|
|
99
|
+
ListAgentVersionsPage,
|
|
100
|
+
ListDocumentsPage,
|
|
101
|
+
ListProductionHistoryEntriesPage,
|
|
102
|
+
Message,
|
|
103
|
+
MessageCompleted,
|
|
104
|
+
MessageFailed,
|
|
105
|
+
MessageRole,
|
|
106
|
+
Operation,
|
|
107
|
+
OperationKind,
|
|
108
|
+
OperationStatus,
|
|
109
|
+
OrganisationSummary,
|
|
110
|
+
PartialFailure,
|
|
111
|
+
PinDraftVersionResult,
|
|
112
|
+
ProductionHistoryEntry,
|
|
113
|
+
ProductionHistorySummary,
|
|
114
|
+
ProgressStatus,
|
|
115
|
+
ToolFinished,
|
|
116
|
+
ToolStatus,
|
|
117
|
+
Upload,
|
|
118
|
+
UploadStatus,
|
|
119
|
+
VersionSource,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
__all__ = [
|
|
123
|
+
"Actor",
|
|
124
|
+
"ActorType",
|
|
125
|
+
"AgentConfiguration",
|
|
126
|
+
"AgentVersion",
|
|
127
|
+
"AgentVersionSummary",
|
|
128
|
+
"AsyncCaitlyn",
|
|
129
|
+
"AsyncEventStream",
|
|
130
|
+
"AsyncPaginator",
|
|
131
|
+
"AttachmentSettings",
|
|
132
|
+
"BatchDeleteDocumentsResult",
|
|
133
|
+
"Caitlyn",
|
|
134
|
+
"CaitlynAuthError",
|
|
135
|
+
"CaitlynConnectionError",
|
|
136
|
+
"CaitlynError",
|
|
137
|
+
"CallContext",
|
|
138
|
+
"Caller",
|
|
139
|
+
"Citation",
|
|
140
|
+
"CitationAddedEvent",
|
|
141
|
+
"ClearableDraftField",
|
|
142
|
+
"ConflictError",
|
|
143
|
+
"ContentSafety",
|
|
144
|
+
"ContextItem",
|
|
145
|
+
"Conversation",
|
|
146
|
+
"ConversationCreated",
|
|
147
|
+
"ConversationEvent",
|
|
148
|
+
"CreateDocumentResult",
|
|
149
|
+
"CredentialKind",
|
|
150
|
+
"DeleteAgentVersionResult",
|
|
151
|
+
"DeleteDocumentResult",
|
|
152
|
+
"Document",
|
|
153
|
+
"DocumentDeleteResult",
|
|
154
|
+
"DocumentDeleteStatus",
|
|
155
|
+
"DocumentFailure",
|
|
156
|
+
"DocumentFailureCode",
|
|
157
|
+
"DocumentStatus",
|
|
158
|
+
"EventActor",
|
|
159
|
+
"EventStream",
|
|
160
|
+
"EventSubject",
|
|
161
|
+
"FieldError",
|
|
162
|
+
"GetDocumentResult",
|
|
163
|
+
"GetUploadResult",
|
|
164
|
+
"InputRequested",
|
|
165
|
+
"InputRequestedEvent",
|
|
166
|
+
"Interceptor",
|
|
167
|
+
"InternalError",
|
|
168
|
+
"KnowledgeBaseBinding",
|
|
169
|
+
"ListAgentVersionsPage",
|
|
170
|
+
"ListDocumentsPage",
|
|
171
|
+
"ListProductionHistoryEntriesPage",
|
|
172
|
+
"Message",
|
|
173
|
+
"MessageCompleted",
|
|
174
|
+
"MessageCompletedEvent",
|
|
175
|
+
"MessageFailed",
|
|
176
|
+
"MessageFailedEvent",
|
|
177
|
+
"MessageRole",
|
|
178
|
+
"MessageStartedEvent",
|
|
179
|
+
"NotFoundError",
|
|
180
|
+
"NotSupportedByServer",
|
|
181
|
+
"Operation",
|
|
182
|
+
"OperationKind",
|
|
183
|
+
"OperationStatus",
|
|
184
|
+
"OrganisationSummary",
|
|
185
|
+
"Paginator",
|
|
186
|
+
"PartialFailure",
|
|
187
|
+
"PayloadTooLargeError",
|
|
188
|
+
"PermissionDeniedError",
|
|
189
|
+
"PhaseChangedEvent",
|
|
190
|
+
"PinDraftVersionResult",
|
|
191
|
+
"PreconditionFailedError",
|
|
192
|
+
"PreconditionRequiredError",
|
|
193
|
+
"ProductionHistoryEntry",
|
|
194
|
+
"ProductionHistorySummary",
|
|
195
|
+
"ProgressStatus",
|
|
196
|
+
"ProgressUpdatedEvent",
|
|
197
|
+
"ResponseMetadata",
|
|
198
|
+
"RetryPolicy",
|
|
199
|
+
"SDK_MODEL",
|
|
200
|
+
"ServiceUnavailableError",
|
|
201
|
+
"StreamLostError",
|
|
202
|
+
"StreamResetEvent",
|
|
203
|
+
"TextDeltaEvent",
|
|
204
|
+
"TooManyRequestsError",
|
|
205
|
+
"ToolFinished",
|
|
206
|
+
"ToolFinishedEvent",
|
|
207
|
+
"ToolStartedEvent",
|
|
208
|
+
"ToolStatus",
|
|
209
|
+
"UnauthenticatedError",
|
|
210
|
+
"UnprocessableContentError",
|
|
211
|
+
"Upload",
|
|
212
|
+
"UploadStatus",
|
|
213
|
+
"ValidationError",
|
|
214
|
+
"VersionSource",
|
|
215
|
+
"WaiterError",
|
|
216
|
+
"WorkspaceConversationCreatedEvent",
|
|
217
|
+
"WorkspaceEvent",
|
|
218
|
+
"WorkspaceInputRequestedEvent",
|
|
219
|
+
"WorkspaceMessageCompletedEvent",
|
|
220
|
+
"WorkspaceMessageFailedEvent",
|
|
221
|
+
"WorkspaceToolFinishedEvent",
|
|
222
|
+
"__version__",
|
|
223
|
+
]
|