caitlyn 0.8.1__tar.gz
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-0.8.1/.gitignore +30 -0
- caitlyn-0.8.1/PKG-INFO +40 -0
- caitlyn-0.8.1/README.md +24 -0
- caitlyn-0.8.1/caitlyn/__init__.py +223 -0
- caitlyn-0.8.1/caitlyn/_client.py +2246 -0
- caitlyn-0.8.1/caitlyn/_operations.py +482 -0
- caitlyn-0.8.1/caitlyn/_version.py +59 -0
- caitlyn-0.8.1/caitlyn/auth.py +24 -0
- caitlyn-0.8.1/caitlyn/errors.py +123 -0
- caitlyn-0.8.1/caitlyn/events.py +354 -0
- caitlyn-0.8.1/caitlyn/models.py +1030 -0
- caitlyn-0.8.1/caitlyn/py.typed +0 -0
- caitlyn-0.8.1/pyproject.toml +30 -0
caitlyn-0.8.1/.gitignore
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Build output: the prepared model, generator builds, conformance reports, bundles.
|
|
2
|
+
/build/
|
|
3
|
+
/codegen/build/
|
|
4
|
+
/codegen/*/build/
|
|
5
|
+
/codegen/.gradle/
|
|
6
|
+
node_modules/
|
|
7
|
+
/typescript/dist/
|
|
8
|
+
/python/.venv/
|
|
9
|
+
/rust/target/
|
|
10
|
+
/conformance/rust/target/
|
|
11
|
+
__pycache__/
|
|
12
|
+
*.pyc
|
|
13
|
+
.DS_Store
|
|
14
|
+
/codegen/smithy-build.local.json
|
|
15
|
+
/typescript/packages/*/dist-*/
|
|
16
|
+
/typescript/packages/*/README.md
|
|
17
|
+
/typescript/packages/*/*.tgz
|
|
18
|
+
/typescript/packages/*/LICENSE
|
|
19
|
+
/typescript/packages/*/NOTICE
|
|
20
|
+
# The API reference's programs, written from the model's @examples by scripts/docs-snippets.mjs for the
|
|
21
|
+
# language jobs to compile; the developer site and its build output.
|
|
22
|
+
/examples/typescript/reference/
|
|
23
|
+
/examples/python/reference/
|
|
24
|
+
/examples/go/reference/
|
|
25
|
+
/examples/rust/examples/
|
|
26
|
+
/examples/rust/target/
|
|
27
|
+
/docs/site/src/content/docs/
|
|
28
|
+
/docs/site/src/generated/
|
|
29
|
+
/docs/site/.astro/
|
|
30
|
+
/docs/site/public/api/
|
caitlyn-0.8.1/PKG-INFO
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: caitlyn
|
|
3
|
+
Version: 0.8.1
|
|
4
|
+
Summary: Python SDK for the Caitlyn API (v3).
|
|
5
|
+
Project-URL: Homepage, https://build.caitlyn.ai/
|
|
6
|
+
Project-URL: Documentation, https://build.caitlyn.ai/
|
|
7
|
+
Project-URL: Repository, https://github.com/caitlyn-ai/sdk
|
|
8
|
+
Author: Custom D Ltd
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
Requires-Python: >=3.12
|
|
11
|
+
Requires-Dist: caitlyn-core==0.8.1
|
|
12
|
+
Requires-Dist: httpx<0.29,>=0.28
|
|
13
|
+
Requires-Dist: opentelemetry-api<2,>=1.38
|
|
14
|
+
Requires-Dist: pydantic<3,>=2.11
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# caitlyn
|
|
18
|
+
|
|
19
|
+
The Python SDK for the Caitlyn API (v3): typed clients, synchronous (`Caitlyn`) and asynchronous
|
|
20
|
+
(`AsyncCaitlyn`), with sign-in, retries, streamed answers and OpenTelemetry tracing.
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
pip install caitlyn
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
import os
|
|
28
|
+
|
|
29
|
+
from caitlyn import Caitlyn
|
|
30
|
+
from caitlyn.auth import Token
|
|
31
|
+
|
|
32
|
+
caitlyn = Caitlyn(workspace="your-company.getcaitlyn.ai", auth=Token(os.environ["CAITLYN_TOKEN"]))
|
|
33
|
+
|
|
34
|
+
# Read the draft of an agent: its configuration and its ETag
|
|
35
|
+
draft = caitlyn.agents.versions.get(agent_id="GHT7YRWXPL", version="draft")
|
|
36
|
+
print(draft.configuration.instructions)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Python 3.12 and later. The documentation, with getting started and every operation, is at
|
|
40
|
+
https://build.caitlyn.ai/. The source is at https://github.com/caitlyn-ai/sdk. Apache-2.0.
|
caitlyn-0.8.1/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# caitlyn
|
|
2
|
+
|
|
3
|
+
The Python SDK for the Caitlyn API (v3): typed clients, synchronous (`Caitlyn`) and asynchronous
|
|
4
|
+
(`AsyncCaitlyn`), with sign-in, retries, streamed answers and OpenTelemetry tracing.
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
pip install caitlyn
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
```python
|
|
11
|
+
import os
|
|
12
|
+
|
|
13
|
+
from caitlyn import Caitlyn
|
|
14
|
+
from caitlyn.auth import Token
|
|
15
|
+
|
|
16
|
+
caitlyn = Caitlyn(workspace="your-company.getcaitlyn.ai", auth=Token(os.environ["CAITLYN_TOKEN"]))
|
|
17
|
+
|
|
18
|
+
# Read the draft of an agent: its configuration and its ETag
|
|
19
|
+
draft = caitlyn.agents.versions.get(agent_id="GHT7YRWXPL", version="draft")
|
|
20
|
+
print(draft.configuration.instructions)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Python 3.12 and later. The documentation, with getting started and every operation, is at
|
|
24
|
+
https://build.caitlyn.ai/. The source is at https://github.com/caitlyn-ai/sdk. Apache-2.0.
|
|
@@ -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
|
+
]
|