knowledge2 0.4.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.
- knowledge2-0.4.0.dist-info/METADATA +556 -0
- knowledge2-0.4.0.dist-info/RECORD +139 -0
- knowledge2-0.4.0.dist-info/WHEEL +5 -0
- knowledge2-0.4.0.dist-info/top_level.txt +1 -0
- sdk/__init__.py +70 -0
- sdk/_async_base.py +525 -0
- sdk/_async_paging.py +57 -0
- sdk/_base.py +541 -0
- sdk/_logging.py +41 -0
- sdk/_paging.py +73 -0
- sdk/_preview.py +70 -0
- sdk/_raw_response.py +25 -0
- sdk/_request_options.py +51 -0
- sdk/_transport.py +144 -0
- sdk/_validation.py +25 -0
- sdk/_validation_response.py +36 -0
- sdk/_version.py +3 -0
- sdk/async_client.py +320 -0
- sdk/async_resources/__init__.py +45 -0
- sdk/async_resources/_mixin_base.py +42 -0
- sdk/async_resources/a2a.py +230 -0
- sdk/async_resources/agents.py +489 -0
- sdk/async_resources/audit.py +145 -0
- sdk/async_resources/auth.py +133 -0
- sdk/async_resources/console.py +409 -0
- sdk/async_resources/corpora.py +276 -0
- sdk/async_resources/deployments.py +106 -0
- sdk/async_resources/documents.py +592 -0
- sdk/async_resources/feeds.py +248 -0
- sdk/async_resources/indexes.py +208 -0
- sdk/async_resources/jobs.py +165 -0
- sdk/async_resources/metadata.py +48 -0
- sdk/async_resources/models.py +102 -0
- sdk/async_resources/onboarding.py +538 -0
- sdk/async_resources/orgs.py +37 -0
- sdk/async_resources/pipelines.py +523 -0
- sdk/async_resources/projects.py +90 -0
- sdk/async_resources/search.py +262 -0
- sdk/async_resources/training.py +357 -0
- sdk/async_resources/usage.py +91 -0
- sdk/client.py +417 -0
- sdk/config.py +182 -0
- sdk/errors.py +178 -0
- sdk/examples/auth_factory.py +34 -0
- sdk/examples/batch_operations.py +57 -0
- sdk/examples/document_upload.py +56 -0
- sdk/examples/e2e_lifecycle.py +213 -0
- sdk/examples/error_handling.py +61 -0
- sdk/examples/pagination.py +64 -0
- sdk/examples/quickstart.py +36 -0
- sdk/examples/request_options.py +44 -0
- sdk/examples/search.py +64 -0
- sdk/integrations/__init__.py +57 -0
- sdk/integrations/_client.py +101 -0
- sdk/integrations/langchain/__init__.py +6 -0
- sdk/integrations/langchain/retriever.py +166 -0
- sdk/integrations/langchain/tools.py +108 -0
- sdk/integrations/llamaindex/__init__.py +11 -0
- sdk/integrations/llamaindex/filters.py +78 -0
- sdk/integrations/llamaindex/retriever.py +162 -0
- sdk/integrations/llamaindex/tools.py +109 -0
- sdk/integrations/llamaindex/vector_store.py +320 -0
- sdk/models/__init__.py +18 -0
- sdk/models/_base.py +24 -0
- sdk/models/_registry.py +457 -0
- sdk/models/a2a.py +92 -0
- sdk/models/agents.py +109 -0
- sdk/models/audit.py +28 -0
- sdk/models/auth.py +49 -0
- sdk/models/chunks.py +20 -0
- sdk/models/common.py +14 -0
- sdk/models/console.py +103 -0
- sdk/models/corpora.py +48 -0
- sdk/models/deployments.py +13 -0
- sdk/models/documents.py +126 -0
- sdk/models/embeddings.py +24 -0
- sdk/models/evaluation.py +17 -0
- sdk/models/feedback.py +9 -0
- sdk/models/feeds.py +57 -0
- sdk/models/indexes.py +36 -0
- sdk/models/jobs.py +52 -0
- sdk/models/models.py +26 -0
- sdk/models/onboarding.py +323 -0
- sdk/models/orgs.py +11 -0
- sdk/models/pipelines.py +147 -0
- sdk/models/projects.py +19 -0
- sdk/models/search.py +149 -0
- sdk/models/training.py +57 -0
- sdk/models/usage.py +39 -0
- sdk/namespaces.py +386 -0
- sdk/py.typed +0 -0
- sdk/resources/__init__.py +45 -0
- sdk/resources/_mixin_base.py +40 -0
- sdk/resources/a2a.py +230 -0
- sdk/resources/agents.py +487 -0
- sdk/resources/audit.py +144 -0
- sdk/resources/auth.py +138 -0
- sdk/resources/console.py +411 -0
- sdk/resources/corpora.py +269 -0
- sdk/resources/deployments.py +105 -0
- sdk/resources/documents.py +597 -0
- sdk/resources/feeds.py +246 -0
- sdk/resources/indexes.py +210 -0
- sdk/resources/jobs.py +164 -0
- sdk/resources/metadata.py +53 -0
- sdk/resources/models.py +99 -0
- sdk/resources/onboarding.py +542 -0
- sdk/resources/orgs.py +35 -0
- sdk/resources/pipeline_builder.py +257 -0
- sdk/resources/pipelines.py +520 -0
- sdk/resources/projects.py +87 -0
- sdk/resources/search.py +277 -0
- sdk/resources/training.py +358 -0
- sdk/resources/usage.py +92 -0
- sdk/types/__init__.py +366 -0
- sdk/types/a2a.py +88 -0
- sdk/types/agents.py +133 -0
- sdk/types/audit.py +26 -0
- sdk/types/auth.py +45 -0
- sdk/types/chunks.py +18 -0
- sdk/types/common.py +10 -0
- sdk/types/console.py +99 -0
- sdk/types/corpora.py +42 -0
- sdk/types/deployments.py +11 -0
- sdk/types/documents.py +104 -0
- sdk/types/embeddings.py +22 -0
- sdk/types/evaluation.py +15 -0
- sdk/types/feedback.py +7 -0
- sdk/types/feeds.py +61 -0
- sdk/types/indexes.py +30 -0
- sdk/types/jobs.py +50 -0
- sdk/types/models.py +22 -0
- sdk/types/onboarding.py +395 -0
- sdk/types/orgs.py +9 -0
- sdk/types/pipelines.py +177 -0
- sdk/types/projects.py +14 -0
- sdk/types/search.py +116 -0
- sdk/types/training.py +55 -0
- sdk/types/usage.py +37 -0
|
@@ -0,0 +1,556 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: knowledge2
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Python SDK for the Knowledge2 retrieval platform
|
|
5
|
+
Author-email: Knowledge2 <contact@knowledge2.ai>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://knowledge2.ai
|
|
8
|
+
Project-URL: Documentation, https://knowledge2.ai/docs
|
|
9
|
+
Project-URL: Repository, https://github.com/knowledge2-ai/knowledge2-python-sdk
|
|
10
|
+
Project-URL: Changelog, https://github.com/knowledge2-ai/knowledge2-python-sdk/blob/main/CHANGELOG.md
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
Requires-Dist: httpx>=0.27
|
|
22
|
+
Provides-Extra: config
|
|
23
|
+
Requires-Dist: pydantic-settings>=2.0; extra == "config"
|
|
24
|
+
Provides-Extra: pydantic
|
|
25
|
+
Requires-Dist: pydantic>=2.0; extra == "pydantic"
|
|
26
|
+
Provides-Extra: yaml
|
|
27
|
+
Requires-Dist: pyyaml>=6.0; extra == "yaml"
|
|
28
|
+
|
|
29
|
+
# Knowledge2 Python SDK
|
|
30
|
+
|
|
31
|
+
[](https://pypi.org/project/knowledge2/)
|
|
32
|
+
[](https://www.python.org/downloads/)
|
|
33
|
+
[](https://opensource.org/licenses/MIT)
|
|
34
|
+
|
|
35
|
+
Official Python client for the Knowledge2 retrieval platform. Build, search, and tune hybrid retrieval corpora with a simple API.
|
|
36
|
+
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install knowledge2
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
From source:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install -e .
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Framework extras:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pip install -e ".[langchain]"
|
|
53
|
+
pip install -e ".[llamaindex]"
|
|
54
|
+
pip install -e ".[integrations]" # both
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Quick Start
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
from sdk import Knowledge2
|
|
61
|
+
|
|
62
|
+
client = Knowledge2(api_key="k2_...")
|
|
63
|
+
|
|
64
|
+
# Create project and corpus
|
|
65
|
+
project = client.create_project("My Project")
|
|
66
|
+
corpus = client.create_corpus(project["id"], "My Corpus")
|
|
67
|
+
|
|
68
|
+
# Upload a document
|
|
69
|
+
client.upload_document(
|
|
70
|
+
corpus["id"],
|
|
71
|
+
raw_text="Knowledge2 is a retrieval platform for building hybrid search systems.",
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Build indexes and search
|
|
75
|
+
client.build_indexes(corpus["id"])
|
|
76
|
+
results = client.search(corpus["id"], "retrieval platform", top_k=5)
|
|
77
|
+
|
|
78
|
+
for chunk in results["results"]:
|
|
79
|
+
print(chunk["score"], chunk.get("text", "")[:80])
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Framework integrations
|
|
83
|
+
|
|
84
|
+
### LangChain
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
from sdk.integrations.langchain import K2LangChainRetriever
|
|
88
|
+
|
|
89
|
+
retriever = K2LangChainRetriever(
|
|
90
|
+
api_key="YOUR_API_KEY",
|
|
91
|
+
api_host="https://api.knowledge2.ai",
|
|
92
|
+
corpus_id="YOUR_CORPUS_ID",
|
|
93
|
+
top_k=5,
|
|
94
|
+
filters={"topic": "search"},
|
|
95
|
+
hybrid={"enabled": True, "fusion_mode": "rrf", "dense_weight": 0.7, "sparse_weight": 0.3},
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
docs = retriever.invoke("How does hybrid retrieval work?")
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### LlamaIndex
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
from sdk.integrations.llamaindex import K2LlamaIndexRetriever
|
|
105
|
+
|
|
106
|
+
retriever = K2LlamaIndexRetriever(
|
|
107
|
+
api_key="YOUR_API_KEY",
|
|
108
|
+
api_host="https://api.knowledge2.ai",
|
|
109
|
+
corpus_id="YOUR_CORPUS_ID",
|
|
110
|
+
top_k=5,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
nodes = retriever.retrieve("How does hybrid retrieval work?")
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Authentication
|
|
117
|
+
|
|
118
|
+
Use one of the following credentials. API key is the primary method for programmatic access.
|
|
119
|
+
|
|
120
|
+
| Method | Header | Typical use |
|
|
121
|
+
|--------|--------|-------------|
|
|
122
|
+
| **API key** | `X-API-Key` | Primary — programmatic access from apps and scripts |
|
|
123
|
+
| **Bearer token** | `Authorization: Bearer <token>` | Console / Auth0 session |
|
|
124
|
+
| **Admin token** | `X-Admin-Token` | Internal admin operations |
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
# API key (recommended)
|
|
128
|
+
client = Knowledge2(api_key="k2_...")
|
|
129
|
+
|
|
130
|
+
# From environment
|
|
131
|
+
import os
|
|
132
|
+
client = Knowledge2(api_key=os.environ["K2_API_KEY"])
|
|
133
|
+
|
|
134
|
+
# Bearer token (console)
|
|
135
|
+
client = Knowledge2(bearer_token=os.environ["K2_BEARER_TOKEN"])
|
|
136
|
+
|
|
137
|
+
# Admin operations
|
|
138
|
+
client = Knowledge2(admin_token=os.environ["K2_ADMIN_TOKEN"])
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
```python
|
|
142
|
+
# Dynamic auth with token factory (OAuth/OIDC)
|
|
143
|
+
client = Knowledge2(
|
|
144
|
+
bearer_token_factory=lambda: fetch_oauth_token(),
|
|
145
|
+
token_cache_ttl=300, # cache for 5 minutes (default)
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
# Check if authenticated
|
|
149
|
+
if client.is_authenticated():
|
|
150
|
+
print("Credentials are configured")
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Configuration
|
|
154
|
+
|
|
155
|
+
| Parameter | Default | Description |
|
|
156
|
+
|-----------|---------|-------------|
|
|
157
|
+
| `api_host` | `https://api.knowledge2.ai` | Base URL of the API |
|
|
158
|
+
| `api_key` | `None` | API key for `X-API-Key` auth |
|
|
159
|
+
| `org_id` | Auto-detected from API key | Organisation ID |
|
|
160
|
+
| `bearer_token` | `None` | Bearer token for console auth |
|
|
161
|
+
| `admin_token` | `None` | Admin token for `X-Admin-Token` |
|
|
162
|
+
| `timeout` | `None` (httpx default) | Request timeout in seconds or `httpx.Timeout` |
|
|
163
|
+
| `max_retries` | `2` | Max retries for transient errors (0 to disable) |
|
|
164
|
+
| `limits` | `None` | `ClientLimits` for connection pool tuning |
|
|
165
|
+
| `bearer_token_factory` | `None` | Callable returning a bearer token string |
|
|
166
|
+
| `token_cache_ttl` | `300.0` | Seconds to cache factory-produced token |
|
|
167
|
+
| `validate_responses` | `False` | Enable Pydantic response validation |
|
|
168
|
+
| `http_client` | `None` | Pre-configured `httpx.Client` for custom transport |
|
|
169
|
+
|
|
170
|
+
```python
|
|
171
|
+
from sdk import Knowledge2, ClientLimits
|
|
172
|
+
|
|
173
|
+
# Custom host and timeout
|
|
174
|
+
client = Knowledge2(
|
|
175
|
+
api_host="https://api.example.com",
|
|
176
|
+
api_key="k2_...",
|
|
177
|
+
timeout=30.0,
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
# Connection pool limits
|
|
181
|
+
limits = ClientLimits(
|
|
182
|
+
max_connections=50,
|
|
183
|
+
max_keepalive_connections=20,
|
|
184
|
+
keepalive_expiry=60.0,
|
|
185
|
+
)
|
|
186
|
+
client = Knowledge2(api_key="k2_...", limits=limits)
|
|
187
|
+
|
|
188
|
+
# Disable retries
|
|
189
|
+
client = Knowledge2(api_key="k2_...", max_retries=0)
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
```python
|
|
193
|
+
from sdk import Knowledge2, ClientTimeouts
|
|
194
|
+
|
|
195
|
+
# Per-phase timeouts
|
|
196
|
+
client = Knowledge2(
|
|
197
|
+
api_key="k2_...",
|
|
198
|
+
timeout=ClientTimeouts(connect=5, read=120, write=30, pool=10),
|
|
199
|
+
)
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Config Object
|
|
203
|
+
|
|
204
|
+
Use `K2Config` for environment-based or file-based configuration:
|
|
205
|
+
|
|
206
|
+
```python
|
|
207
|
+
from sdk import Knowledge2
|
|
208
|
+
|
|
209
|
+
# From K2_* environment variables
|
|
210
|
+
client = Knowledge2.from_env()
|
|
211
|
+
|
|
212
|
+
# From a config file
|
|
213
|
+
client = Knowledge2.from_file("~/.k2/config.yaml")
|
|
214
|
+
|
|
215
|
+
# From a named profile
|
|
216
|
+
client = Knowledge2.from_profile("staging")
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Constructor Behavior
|
|
220
|
+
|
|
221
|
+
When `org_id` is omitted and `api_key` is provided, the sync client (`Knowledge2(...)`)
|
|
222
|
+
calls `GET /v1/auth/whoami` during `__init__` to auto-detect the organization ID.
|
|
223
|
+
For the async client, this happens in `AsyncKnowledge2.create(...)`.
|
|
224
|
+
|
|
225
|
+
To skip this network call, pass `org_id` explicitly:
|
|
226
|
+
|
|
227
|
+
```python
|
|
228
|
+
client = Knowledge2(api_key="k2_...", org_id="org_xxx")
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
To skip this network call entirely, pass `lazy=True`:
|
|
232
|
+
|
|
233
|
+
```python
|
|
234
|
+
client = Knowledge2(api_key="k2_...", lazy=True)
|
|
235
|
+
# org_id will be None — pass it explicitly or call get_whoami() later
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Auth Requirements by Endpoint
|
|
239
|
+
|
|
240
|
+
Most endpoints work with an API key. Some require bearer token or admin auth:
|
|
241
|
+
|
|
242
|
+
| Endpoint | Required Auth |
|
|
243
|
+
|----------|--------------|
|
|
244
|
+
| Most resources | API key (`X-API-Key`) |
|
|
245
|
+
| `usage_summary`, `usage_by_corpus`, `usage_by_key` | Bearer token |
|
|
246
|
+
| `list_api_keys` | Admin token |
|
|
247
|
+
|
|
248
|
+
## Error Handling
|
|
249
|
+
|
|
250
|
+
All SDK exceptions inherit from `Knowledge2Error`. Use `except Knowledge2Error` as a catch-all.
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
Knowledge2Error (base)
|
|
254
|
+
├── APIError (HTTP 4xx/5xx)
|
|
255
|
+
│ ├── BadRequestError (400)
|
|
256
|
+
│ ├── AuthenticationError (401)
|
|
257
|
+
│ ├── PermissionDeniedError (403)
|
|
258
|
+
│ ├── NotFoundError (404)
|
|
259
|
+
│ ├── ConflictError (409)
|
|
260
|
+
│ ├── ValidationError (422)
|
|
261
|
+
│ ├── RateLimitError (429)
|
|
262
|
+
│ └── ServerError (500, 502, 503, 504)
|
|
263
|
+
├── APIConnectionError (network failures)
|
|
264
|
+
├── APITimeoutError (request timeout)
|
|
265
|
+
└── ConfirmationRequiredError (client-side deletion guard)
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
```python
|
|
269
|
+
from sdk import Knowledge2
|
|
270
|
+
from sdk.errors import (
|
|
271
|
+
Knowledge2Error,
|
|
272
|
+
NotFoundError,
|
|
273
|
+
ValidationError,
|
|
274
|
+
RateLimitError,
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
client = Knowledge2(api_key="k2_...")
|
|
278
|
+
|
|
279
|
+
try:
|
|
280
|
+
corpus = client.get_corpus("nonexistent")
|
|
281
|
+
except NotFoundError as e:
|
|
282
|
+
print(f"Corpus not found: {e.message}")
|
|
283
|
+
except ValidationError as e:
|
|
284
|
+
print(f"Validation failed: {e.details}")
|
|
285
|
+
except RateLimitError as e:
|
|
286
|
+
if e.retryable:
|
|
287
|
+
print(f"Rate limited; retry after {e.retry_after}s")
|
|
288
|
+
except Knowledge2Error as e:
|
|
289
|
+
print(f"API error: {e.message}")
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**`retryable` property**: Indicates whether the operation can be retried. `True` for `RateLimitError`, `ServerError`, `APIConnectionError`, and `APITimeoutError`; `False` for auth, validation, and not-found errors.
|
|
293
|
+
|
|
294
|
+
## Automatic Retries
|
|
295
|
+
|
|
296
|
+
The SDK retries transient failures automatically:
|
|
297
|
+
|
|
298
|
+
- **Retried**: 5xx, 429, connection errors, timeouts
|
|
299
|
+
- **Not retried**: 4xx (except 429)
|
|
300
|
+
|
|
301
|
+
Configure via `max_retries` (default `2`). Backoff is exponential with jitter; for `RateLimitError`, the `Retry-After` header is respected when present.
|
|
302
|
+
|
|
303
|
+
```python
|
|
304
|
+
# Default: 2 retries
|
|
305
|
+
client = Knowledge2(api_key="k2_...")
|
|
306
|
+
|
|
307
|
+
# Aggressive retries
|
|
308
|
+
client = Knowledge2(api_key="k2_...", max_retries=5)
|
|
309
|
+
|
|
310
|
+
# No retries
|
|
311
|
+
client = Knowledge2(api_key="k2_...", max_retries=0)
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
## Per-Call Overrides
|
|
315
|
+
|
|
316
|
+
Use `RequestOptions` to override timeout and retry settings for a single call:
|
|
317
|
+
|
|
318
|
+
```python
|
|
319
|
+
from sdk import Knowledge2, RequestOptions, ClientTimeouts
|
|
320
|
+
|
|
321
|
+
client = Knowledge2(api_key="k2_...")
|
|
322
|
+
|
|
323
|
+
# Longer timeout for a known-slow operation
|
|
324
|
+
opts = RequestOptions(timeout=ClientTimeouts(read=300))
|
|
325
|
+
results = client.search(corpus_id, "complex query", request_options=opts)
|
|
326
|
+
|
|
327
|
+
# Zero retries for a health check
|
|
328
|
+
opts = RequestOptions(max_retries=0)
|
|
329
|
+
client.get_corpus(corpus_id, request_options=opts)
|
|
330
|
+
|
|
331
|
+
# Passthrough tracing headers
|
|
332
|
+
opts = RequestOptions(passthrough_headers={"X-Request-ID": "abc-123"})
|
|
333
|
+
client.search(corpus_id, "query", request_options=opts)
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
## Raw Response Access
|
|
337
|
+
|
|
338
|
+
Use `with_raw_response` to inspect HTTP status and headers alongside the parsed body.
|
|
339
|
+
HTTP errors are wrapped into `RawResponse` instead of raised, so you can inspect
|
|
340
|
+
error responses without `try`/`except`:
|
|
341
|
+
|
|
342
|
+
```python
|
|
343
|
+
raw = client.with_raw_response.list_corpora()
|
|
344
|
+
raw.status_code # 200
|
|
345
|
+
raw.headers # {"content-type": "application/json", ...}
|
|
346
|
+
raw.parsed # Page[dict] — same as client.list_corpora()
|
|
347
|
+
|
|
348
|
+
# Error responses are also wrapped (not raised)
|
|
349
|
+
raw = client.with_raw_response.get_corpus("nonexistent-id")
|
|
350
|
+
if raw.status_code >= 400:
|
|
351
|
+
print(f"Error {raw.status_code}: {raw.parsed}")
|
|
352
|
+
|
|
353
|
+
# Async
|
|
354
|
+
raw = await async_client.with_raw_response.search(corpus_id, "query")
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
> **Note:** Non-HTTP errors (`APIConnectionError`, `APITimeoutError`) are still raised
|
|
358
|
+
> since there is no HTTP response to wrap.
|
|
359
|
+
|
|
360
|
+
## Custom HTTP Client
|
|
361
|
+
|
|
362
|
+
Inject a pre-configured `httpx.Client` for custom TLS, proxies, or instrumentation:
|
|
363
|
+
|
|
364
|
+
```python
|
|
365
|
+
import httpx
|
|
366
|
+
from sdk import Knowledge2
|
|
367
|
+
|
|
368
|
+
# Custom TLS / proxy
|
|
369
|
+
http_client = httpx.Client(
|
|
370
|
+
verify="/path/to/custom-ca.pem",
|
|
371
|
+
proxy="http://corporate-proxy:8080",
|
|
372
|
+
)
|
|
373
|
+
client = Knowledge2(api_key="k2_...", http_client=http_client)
|
|
374
|
+
|
|
375
|
+
# Async variant
|
|
376
|
+
async_http = httpx.AsyncClient(verify="/path/to/custom-ca.pem")
|
|
377
|
+
async_client = AsyncKnowledge2(api_key="k2_...", http_client=async_http)
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
> **Ownership**: When you supply `http_client`, the SDK does not close it. You are responsible for closing it when done. `timeout` and `limits` are ignored — configure them on your client directly.
|
|
381
|
+
|
|
382
|
+
## Async Client
|
|
383
|
+
|
|
384
|
+
`AsyncKnowledge2` provides native async support using `httpx.AsyncClient`:
|
|
385
|
+
|
|
386
|
+
```python
|
|
387
|
+
from sdk import AsyncKnowledge2
|
|
388
|
+
|
|
389
|
+
# Use as async context manager
|
|
390
|
+
async with AsyncKnowledge2(api_key="k2_...") as client:
|
|
391
|
+
results = await client.search(corpus_id, "query")
|
|
392
|
+
|
|
393
|
+
# With auto-detected org_id
|
|
394
|
+
client = await AsyncKnowledge2.create(api_key="k2_...")
|
|
395
|
+
|
|
396
|
+
# From environment
|
|
397
|
+
client = await AsyncKnowledge2.from_env()
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### When to use sync vs async
|
|
401
|
+
|
|
402
|
+
| Use case | Recommendation |
|
|
403
|
+
|----------|---------------|
|
|
404
|
+
| Scripts, CLIs, Jupyter notebooks | `Knowledge2` (sync) |
|
|
405
|
+
| FastAPI, aiohttp, async frameworks | `AsyncKnowledge2` (async) |
|
|
406
|
+
| Agentic workloads (LangChain, LlamaIndex) | `AsyncKnowledge2` for concurrency |
|
|
407
|
+
| Thread-based parallelism | `Knowledge2` (sync) with threads |
|
|
408
|
+
|
|
409
|
+
## Pagination
|
|
410
|
+
|
|
411
|
+
**Iterator methods** (`iter_*`) yield items lazily across pages:
|
|
412
|
+
|
|
413
|
+
```python
|
|
414
|
+
for corpus in client.iter_corpora(limit=50):
|
|
415
|
+
print(corpus["name"])
|
|
416
|
+
|
|
417
|
+
for doc in client.iter_documents(corpus_id, limit=100):
|
|
418
|
+
process(doc)
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**Manual pagination** with `list_*` returns `Page[T]`:
|
|
422
|
+
|
|
423
|
+
```python
|
|
424
|
+
page = client.list_corpora(limit=50)
|
|
425
|
+
print(f"Total: {page.total}, got {len(page)} items")
|
|
426
|
+
for corpus in page:
|
|
427
|
+
print(corpus["name"])
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
## Sub-Client Namespaces
|
|
431
|
+
|
|
432
|
+
Access methods through typed namespaces for better IDE autocomplete:
|
|
433
|
+
|
|
434
|
+
```python
|
|
435
|
+
# Equivalent calls:
|
|
436
|
+
client.upload_document(corpus_id, raw_text="...")
|
|
437
|
+
client.documents.upload(corpus_id, raw_text="...")
|
|
438
|
+
|
|
439
|
+
# Available namespaces:
|
|
440
|
+
client.documents.* # Document operations
|
|
441
|
+
client.corpora.* # Corpus operations
|
|
442
|
+
client.search_ns.* # Search operations
|
|
443
|
+
client.models_ns.* # Model operations
|
|
444
|
+
client.jobs.* # Job operations
|
|
445
|
+
client.training_ns.* # Training operations
|
|
446
|
+
client.deployments.* # Deployment operations
|
|
447
|
+
client.agents.* # Agent operations
|
|
448
|
+
client.feeds.* # Feed operations
|
|
449
|
+
client.pipelines.* # Pipeline operations
|
|
450
|
+
client.auth.* # Auth operations
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
## Resource Overview
|
|
454
|
+
|
|
455
|
+
| Resource | Methods |
|
|
456
|
+
|----------|---------|
|
|
457
|
+
| **Organisations** | `create_org` |
|
|
458
|
+
| **Projects** | `create_project`, `list_projects`, `iter_projects` |
|
|
459
|
+
| **Corpora** | `create_corpus`, `list_corpora`, `iter_corpora`, `get_corpus`, `get_corpus_status`, `update_corpus`, `delete_corpus`, `list_corpus_models`, `iter_corpus_models` |
|
|
460
|
+
| **Documents** | `upload_document`, `upload_documents_batch`, `upload_files_batch`, `ingest_urls`, `ingest_manifest`, `list_documents`, `iter_documents`, `get_document`, `delete_document`, `list_chunks`, `iter_chunks` |
|
|
461
|
+
| **Indexes** | `build_indexes` |
|
|
462
|
+
| **Search** | `search`, `search_batch`, `search_generate`, `embeddings`, `create_feedback` |
|
|
463
|
+
| **Training** | `build_training_data`, `list_training_data`, `iter_training_data`, `list_tuning_runs`, `iter_tuning_runs`, `create_tuning_run`, `build_and_start_tuning_run`, `get_tuning_run`, `get_tuning_run_logs`, `get_eval_run`, `promote_tuning_run` |
|
|
464
|
+
| **Deployments** | `create_deployment`, `list_deployments`, `iter_deployments` |
|
|
465
|
+
| **Jobs** | `get_job`, `list_jobs`, `iter_jobs` |
|
|
466
|
+
| **Models** | `list_models`, `iter_models`, `delete_model` |
|
|
467
|
+
| **Auth** | `create_api_key`, `list_api_keys`, `get_whoami` |
|
|
468
|
+
| **Agents** | `create_agent`, `get_agent`, `list_agents`, `update_agent`, `delete_agent`, `activate_agent`, `archive_agent`, `chat_with_agent`, `run_agent`, `list_agent_runs`, `list_agent_models`, `list_task_types`, `create_subscription`, `list_subscriptions`, `delete_subscription` |
|
|
469
|
+
| **Feeds** | `create_feed`, `list_feeds`, `get_feed`, `update_feed`, `delete_feed`, `run_feed` |
|
|
470
|
+
| **Pipelines** | `create_pipeline_spec`, `get_pipeline_spec`, `list_pipeline_specs`, `iter_pipeline_specs`, `update_pipeline_spec`, `delete_pipeline_spec`, `get_pipeline_spec_schema`, `dry_run_pipeline_spec`, `apply_pipeline_spec`, `archive_pipeline_spec`, `unarchive_pipeline_spec`, `create_pipeline_spec_draft`, `get_pipeline_spec_draft`, `activate_pipeline_spec_draft`, `discard_pipeline_spec_draft`, `get_pipeline_spec_graph`, `diff_pipeline_spec`, `refresh_pipeline_spec` |
|
|
471
|
+
| **Audit** | `list_audit_logs`, `iter_audit_logs` |
|
|
472
|
+
| **Usage** | `usage_summary`, `usage_by_corpus`, `usage_by_key` |
|
|
473
|
+
| **Console** | `console_me`, `console_bootstrap`, `console_summary`, `console_projects`, `console_get_project`, `console_update_project`, `console_get_org`, `console_update_org`, `console_list_team`, `console_list_invites`, `console_create_invite`, `console_accept_invite`, `console_update_member_role`, `console_remove_member`, `console_list_api_keys`, `console_create_api_key`, `console_revoke_api_key` |
|
|
474
|
+
| **Onboarding** | `get_onboarding_status`, `get_analysis`, `upload_gold_labels`, `upload_gold_labels_file`, `list_gold_labels`, `iter_gold_labels`, `list_synthetic_batches`, `get_synthetic_batch`, `list_evaluations`, `get_evaluation`, `get_evaluation_report`, `get_summarization_status`, `get_document_summary` |
|
|
475
|
+
|
|
476
|
+
### Search Response Shapes
|
|
477
|
+
|
|
478
|
+
`search()` and `search_batch()` return different response structures:
|
|
479
|
+
|
|
480
|
+
```python
|
|
481
|
+
# Single search — results are top-level
|
|
482
|
+
resp = client.search(corpus_id, "query")
|
|
483
|
+
resp["results"] # list[SearchResult]
|
|
484
|
+
resp["meta"] # SearchMeta (cold_start, warnings)
|
|
485
|
+
|
|
486
|
+
# Batch search — each query gets its own SearchResponse
|
|
487
|
+
resp = client.search_batch(corpus_id, queries=["q1", "q2"])
|
|
488
|
+
resp["responses"] # list[SearchResponse]
|
|
489
|
+
resp["responses"][0]["results"] # list[SearchResult] for q1
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
`responses` contains a list of `SearchResponse` objects (one per query), each of
|
|
493
|
+
which has its own `results` and `meta`. This nesting is intentional — it mirrors
|
|
494
|
+
the one-query-to-one-response mapping.
|
|
495
|
+
|
|
496
|
+
### Preview Resources
|
|
497
|
+
|
|
498
|
+
The following resources require feature flags to be enabled on the server.
|
|
499
|
+
Calling these methods against an environment where the flag is off will
|
|
500
|
+
return a `NotFoundError` (404). A `RuntimeWarning` is emitted on first use.
|
|
501
|
+
|
|
502
|
+
| Resource | Feature Flag |
|
|
503
|
+
|----------|-------------|
|
|
504
|
+
| Agents | `knowledge_agents_enabled` |
|
|
505
|
+
| Feeds | `knowledge_agents_enabled` |
|
|
506
|
+
| Pipelines | `pipelines_enabled` |
|
|
507
|
+
| A2A | `a2a_enabled` |
|
|
508
|
+
|
|
509
|
+
To suppress the warning:
|
|
510
|
+
|
|
511
|
+
```python
|
|
512
|
+
import warnings
|
|
513
|
+
warnings.filterwarnings("ignore", message=".*preview feature.*", category=RuntimeWarning)
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
## Debug Logging
|
|
517
|
+
|
|
518
|
+
```python
|
|
519
|
+
from sdk import Knowledge2
|
|
520
|
+
|
|
521
|
+
Knowledge2.set_debug(True) # Log requests, responses, retries to stderr
|
|
522
|
+
client = Knowledge2(api_key="k2_...")
|
|
523
|
+
# ... use client ...
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
Alternative: configure the `knowledge2` logger directly:
|
|
527
|
+
|
|
528
|
+
```python
|
|
529
|
+
import logging
|
|
530
|
+
logging.getLogger("knowledge2").setLevel(logging.DEBUG)
|
|
531
|
+
logging.getLogger("knowledge2").addHandler(logging.StreamHandler())
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
Auth headers are redacted in logs.
|
|
535
|
+
|
|
536
|
+
## Examples
|
|
537
|
+
|
|
538
|
+
Runnable examples are in the `examples/` directory:
|
|
539
|
+
|
|
540
|
+
```bash
|
|
541
|
+
# End-to-end lifecycle (ingest, index, tune, search)
|
|
542
|
+
python -m sdk.examples.e2e_lifecycle
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
## Version
|
|
546
|
+
|
|
547
|
+
```python
|
|
548
|
+
from sdk import __version__
|
|
549
|
+
print(__version__) # e.g. "0.3.0"
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
## Links
|
|
553
|
+
|
|
554
|
+
- **Website**: https://knowledge2.ai
|
|
555
|
+
- **Documentation**: https://knowledge2.ai/docs
|
|
556
|
+
- **Support**: contact@knowledge2.ai
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
sdk/__init__.py,sha256=0f5zA3koqaFjFLGM9xvAEE7kauiz1Um-LdFTXA4PriU,1681
|
|
2
|
+
sdk/_async_base.py,sha256=kHIU1l2SeW2boiceX8SVFDpJKOp0x3DzvTlBRVG1hw0,20574
|
|
3
|
+
sdk/_async_paging.py,sha256=T2Pw05dlfMSQo0O6MBrAxN-tkmYP4reSQEd4A-OzHjo,1770
|
|
4
|
+
sdk/_base.py,sha256=yyQVpyGTLnWZTwDUlJVFEhDq46g9w-EDtVU1h1SqMOk,20522
|
|
5
|
+
sdk/_logging.py,sha256=AOjMHTdnYSwZmYew-Drx9RJph1YO02qUA1PEWEp6Puw,1420
|
|
6
|
+
sdk/_paging.py,sha256=eO4Ss0OfKcagOg37pRgFUVBANL2OLFyVVB-CP0420kE,2001
|
|
7
|
+
sdk/_preview.py,sha256=ebU3bPBl-tdL53sAXp8p82WHcbbtAnocNo1wNYcKpR0,2345
|
|
8
|
+
sdk/_raw_response.py,sha256=mZRz9oBEtEaN0q2igWjetMoOLhLYYPhSyMAX0vM1yGc,640
|
|
9
|
+
sdk/_request_options.py,sha256=6VSFQbLKncI5-4ZVdj_1hNAb8_ra_-muf3899NHU6TU,1622
|
|
10
|
+
sdk/_transport.py,sha256=v1j46U2uff6FffZfm9WSi0qGoj4U0OM1rmzN1C19Seg,4386
|
|
11
|
+
sdk/_validation.py,sha256=-Beqkbpkin72T0ZnxrdesOBZ22-NrUAj_FiJfjvxHjg,806
|
|
12
|
+
sdk/_validation_response.py,sha256=eaC8QMsCEcvmvYhwEDdH-eFx_CrohR8vFJfCBEaF6Ss,1273
|
|
13
|
+
sdk/_version.py,sha256=8AMOXFrETDPEs7vvdeOsXHG_V_VvP9UzEr5Q_4VpMq8,80
|
|
14
|
+
sdk/async_client.py,sha256=cp2T19BJYW9nIKYRRn8f7gchuEej-edg9X-SVuDIw0A,11644
|
|
15
|
+
sdk/client.py,sha256=CbrjobSVhrBekVu6nv5TKlmwK9TL_iWDG724pr7mF30,14454
|
|
16
|
+
sdk/config.py,sha256=ZZT0x9xC3A4cpKFZTenkWOGQng6WL3NrFGcZXZ-9SpQ,6250
|
|
17
|
+
sdk/errors.py,sha256=robV0hi7ogwoEGMTT0UXHm8NC-D0jITMzAoJ49WBdl4,4682
|
|
18
|
+
sdk/namespaces.py,sha256=8g5FOPXUYqB9uapL4Ifm8rG62eho3WC6W7rwhuuUjFo,13524
|
|
19
|
+
sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
+
sdk/async_resources/__init__.py,sha256=RxZ3q_RBdFSwUVBYjczYFwu1PtT4NDFVbK4g47XAR2g,1307
|
|
21
|
+
sdk/async_resources/_mixin_base.py,sha256=uSblxOEfFEDi_BxPs0WzJuBWKuKnafpcJkTa-aUXCeI,1113
|
|
22
|
+
sdk/async_resources/a2a.py,sha256=g9CpqIr0ntn4aPX-JdI4w4Vad0Fhba6zbGmk99iljls,8293
|
|
23
|
+
sdk/async_resources/agents.py,sha256=ZM7WWYRgOi_eVThORi4ClBzorASeCGCRBPX6kfzrrJI,17150
|
|
24
|
+
sdk/async_resources/audit.py,sha256=SPPJMIcGY0ORpKZ26DiqkjpWvzto4FknvsZHiRjaZYU,4909
|
|
25
|
+
sdk/async_resources/auth.py,sha256=5MhUNAqi9zss5mskm_E9Nsz9szXLkAZ1dIzq7ZG22SQ,4491
|
|
26
|
+
sdk/async_resources/console.py,sha256=uNWbS7AGU8zAS780VJqhs_TzGDAmVtGGdCdIyKs3gag,13824
|
|
27
|
+
sdk/async_resources/corpora.py,sha256=23f_XDniHvJvOLEEO9jrldTRYpkAhNaRXIDx7K64dWU,9029
|
|
28
|
+
sdk/async_resources/deployments.py,sha256=yIqE7qfx75LaWbQxLqCK9qBRL_VqshCSyVtpAAMbY4g,3408
|
|
29
|
+
sdk/async_resources/documents.py,sha256=eFZNMaG0GoxV-rti6JoJb1-9TFm_99tCCzYftZzoRXQ,22658
|
|
30
|
+
sdk/async_resources/feeds.py,sha256=sTY0N9x5V7IffFA4m04VWimaEkNfIhlfrXCRZ0mKS5A,8913
|
|
31
|
+
sdk/async_resources/indexes.py,sha256=HRLhfbmEirqNxURapyNoIPJ_eYAILtDjuCy-CuQOt3I,8023
|
|
32
|
+
sdk/async_resources/jobs.py,sha256=y__MdSL7qB7HXpS-VJwdhtxeIokAuK_CXckL_tr1Aow,5267
|
|
33
|
+
sdk/async_resources/metadata.py,sha256=qUJ2Oif0gMFAYNDGYQSh_viIepMUcWjHMyU40V4Eafg,1471
|
|
34
|
+
sdk/async_resources/models.py,sha256=3BeHjPNHhoCNg6gGOkvl4-pvDgsKzWO7O0e4C9y_-DA,3250
|
|
35
|
+
sdk/async_resources/onboarding.py,sha256=a7OCfxeLV_owJDKEakiAcm8JTmKwVo3vuBh42dA3I-Q,18148
|
|
36
|
+
sdk/async_resources/orgs.py,sha256=ectZ4FtGkleW079KZUoUh7hpIcuGnC0tTlcw2TgcDl8,1145
|
|
37
|
+
sdk/async_resources/pipelines.py,sha256=7k65Y3Ev1JJe52uKAb58CpWc_OEQ5eDcxxhb8PhUjtg,17446
|
|
38
|
+
sdk/async_resources/projects.py,sha256=Azbf9MvGJEfj8XZo1p4l-WVKKrqsAVCBRdFi0y7mddY,2857
|
|
39
|
+
sdk/async_resources/search.py,sha256=vObo60RmgJwAkCLbpcENkXWzvymGjxPtJFT_hIy8Il4,9752
|
|
40
|
+
sdk/async_resources/training.py,sha256=g0t8gOZtMXqGKMkjz8XB5ZlhHEaMrgcF6ny-VxUgO9M,11520
|
|
41
|
+
sdk/async_resources/usage.py,sha256=qOKTPcFh_wd4H3HFfXlGA4CF3aFJjnrBRxRaw-iBMno,3048
|
|
42
|
+
sdk/examples/auth_factory.py,sha256=zt0hJIlR6c7QMNNK92eLgAu7tz0i-Rnp9rFh2XzDtf4,861
|
|
43
|
+
sdk/examples/batch_operations.py,sha256=wfzsv0-BY7PaBzbN50renCqGQ2VCPJFLtmyL-6M2_wU,1649
|
|
44
|
+
sdk/examples/document_upload.py,sha256=HkswJJI1fbEDwzQ0Ha96mXTzQi9bhCVWTvSq3tdjfS0,1553
|
|
45
|
+
sdk/examples/e2e_lifecycle.py,sha256=ioLndgCUYUV0wCG-lJhqKCzCoctwvZX53chpiWhXc6Y,7920
|
|
46
|
+
sdk/examples/error_handling.py,sha256=fsdns2LWiv2UhuR61TKwRPEGyxxBfHaA7PGa25SV6BE,1632
|
|
47
|
+
sdk/examples/pagination.py,sha256=y_qP6D8Ds5DO9px_hAy3bex0pf586qJuyf_PSy693DA,2050
|
|
48
|
+
sdk/examples/quickstart.py,sha256=EE-beWTJRLXfm6V155Z6WvYVDoYuVyLbr21PQtDH_nI,1042
|
|
49
|
+
sdk/examples/request_options.py,sha256=HD3pkhSUtFdCz800u9Be8Bp8evo7IKGlzkU1q9V0wz4,1211
|
|
50
|
+
sdk/examples/search.py,sha256=Rzf1c2m7-H7VHLquFbHMnfq6Q0txFPEahb_VcTShf-c,1899
|
|
51
|
+
sdk/integrations/__init__.py,sha256=K3fFqXXbJWP6yc2bvQ0pKQBlfLB0fZUqaRxNYlWrxb8,1823
|
|
52
|
+
sdk/integrations/_client.py,sha256=0RyXUSVLqjV_NKR3K5VWWfSZiZfhlfzY9t1xPXlZr7Y,3487
|
|
53
|
+
sdk/integrations/langchain/__init__.py,sha256=t0IoqBoPpk5Ft-5Z3i8kJD_oMKxceSqdHENUvN6Ix7w,252
|
|
54
|
+
sdk/integrations/langchain/retriever.py,sha256=vDizjTVtjy8ZO_wwmkusxIGyA4cH935o1RttyjmKYxE,6233
|
|
55
|
+
sdk/integrations/langchain/tools.py,sha256=086zBGSFvzPycnqDmYP-gO4z9Ex1xWzdBZ_L_Sy3Tuo,3535
|
|
56
|
+
sdk/integrations/llamaindex/__init__.py,sha256=pd4YXZfqpskeEC6gt4WgL3Z3zG_FcFC9K3QFbXDpyvU,378
|
|
57
|
+
sdk/integrations/llamaindex/filters.py,sha256=krxvZfjGHQhTBcv3aLufLgOSq-LViQE6BtWImKCBXHc,2325
|
|
58
|
+
sdk/integrations/llamaindex/retriever.py,sha256=NVLHQgaV4aRFdVKqahnPPk0JngQfbnJfy8YkrrHGjs0,6023
|
|
59
|
+
sdk/integrations/llamaindex/tools.py,sha256=Y-9QM0jRWlafY-zZRxML3IELUsIRM_HFE9_aJUA8kvE,3688
|
|
60
|
+
sdk/integrations/llamaindex/vector_store.py,sha256=Py1DZN4w7xdjWkMhwHSvjKDUGrZ5wz27LZCDIQwJtRc,11849
|
|
61
|
+
sdk/models/__init__.py,sha256=Zrq3e6OyzzvDU1B-uyTV4VmNIK1BTxx9aiY1OKoFQ1Y,601
|
|
62
|
+
sdk/models/_base.py,sha256=n7vt1Z1JF_aPagWCtl77W2c2jUWzP5TzEMOmApC1jA4,748
|
|
63
|
+
sdk/models/_registry.py,sha256=EXAFml57VACV47WlU6vON-kx7A7BJfAvpcyKiZ8xTDE,17813
|
|
64
|
+
sdk/models/a2a.py,sha256=pL_jd3f_uMsLfWJpi9X2yr02GM72NEU-HAZi7UUj0os,2531
|
|
65
|
+
sdk/models/agents.py,sha256=b188ACGsRxF1e302uo9DdMQq6hluLSaZrYUUlkcg02Y,2751
|
|
66
|
+
sdk/models/audit.py,sha256=GG4JFk9jaL93OlDJVxrsY7hCArugCIriLVQhfbfb15c,680
|
|
67
|
+
sdk/models/auth.py,sha256=QRhcbmuKwuGtVWoPRWmdIA7LU3s57TGkUl1CVSMoMWs,1004
|
|
68
|
+
sdk/models/chunks.py,sha256=zQqcdooPFnFOh13y4-xGcxznrWtMqvaFs2uQM9GdVdM,510
|
|
69
|
+
sdk/models/common.py,sha256=zJF60c2nuee8oT-qS7Zr_hQm9qCGXIcX9veIlExy-Jk,308
|
|
70
|
+
sdk/models/console.py,sha256=TXRV0MSZf0NsAjHY_cLR4rGthmBH2Pw7jnRN2FFftBA,2498
|
|
71
|
+
sdk/models/corpora.py,sha256=AXtRFnUHZmlSHvn08j--NmvCdUkx1IuoJXlzFEGdqVU,1380
|
|
72
|
+
sdk/models/deployments.py,sha256=lrX_Ne-CzP-0DnlNZoZyGPQZ3FGacYdCGisRBMuOAzc,332
|
|
73
|
+
sdk/models/documents.py,sha256=qsV-qqulhAQd-8culEfDKrnFtWClyrXu4VjzW0D4zbo,3779
|
|
74
|
+
sdk/models/embeddings.py,sha256=VbCjmgYCp_453ai2Bs490ll7jqtk8k_0ywQpaO39Zyc,483
|
|
75
|
+
sdk/models/evaluation.py,sha256=Pd0uAWvTyRpv0Jw48Yjbjs4MIvm0uGxOFDDxz781mqE,356
|
|
76
|
+
sdk/models/feedback.py,sha256=qwEExzLhOpzh62kFwig2IpuYyYwXBuwtK8vF4EyZDp8,181
|
|
77
|
+
sdk/models/feeds.py,sha256=H9eLb1yMKC8ArjzEKMx9hTtO-lKJ5NVpOpEKuyuCimM,1642
|
|
78
|
+
sdk/models/indexes.py,sha256=4qu04PHxPdCRSWz_8K526AVsH-k64SgFIvl9-ccJpoE,1021
|
|
79
|
+
sdk/models/jobs.py,sha256=_c8wK8GKnf6QY2eVGZmW1F6B5JzB44Jh6Gva9G6burI,1316
|
|
80
|
+
sdk/models/models.py,sha256=RXHqwwZe8vceIB3I8TnWNJLRqZqf7VZrvKqik3DxqgI,616
|
|
81
|
+
sdk/models/onboarding.py,sha256=lWJppiZSaV3XE_sTk4CRzZdCVUkP-FxmrGMVcW6f1ug,8157
|
|
82
|
+
sdk/models/orgs.py,sha256=BxfeQVXQp609tcAR8LEVT78oRsGd5z0jV4p5yoQ4DvM,245
|
|
83
|
+
sdk/models/pipelines.py,sha256=QDBrJB4Tw6ayYf78CCrZ9fLBLXIAu9brm2fbStfM99w,4295
|
|
84
|
+
sdk/models/projects.py,sha256=b6_7bWjg2DYYxLEOGC4Uqm4dOEP4nrt7j0JrlPfJ-jM,375
|
|
85
|
+
sdk/models/search.py,sha256=rsQzPuRQJu5vSdnz0reFwSBbcBJg_QpsseHDJz8bRfQ,4564
|
|
86
|
+
sdk/models/training.py,sha256=qU6xtI4f22OLQ7_WsxTYRnXfW6x8lP9GVPRJYTwnXuc,1181
|
|
87
|
+
sdk/models/usage.py,sha256=MRRE_Wf56n72h66arYvCdDyBCoMFkacDjnyUPzhcJ5M,923
|
|
88
|
+
sdk/resources/__init__.py,sha256=eCK60wV-W8Ian8HPQVJfN2qePImKouueau2_EGo_D7k,1107
|
|
89
|
+
sdk/resources/_mixin_base.py,sha256=I0t7KtwTUqTWFKYY76F0Ltn7QHqKmtnPThJkfWOy4lY,1021
|
|
90
|
+
sdk/resources/a2a.py,sha256=cHcywtzOHkALUk5TissXahb2z64VfOoeaHTqtQ-PQZI,8170
|
|
91
|
+
sdk/resources/agents.py,sha256=GNtaBblxe21hecp0KJzW9LESY_FG4xLkxHtzNQAg6C0,16921
|
|
92
|
+
sdk/resources/audit.py,sha256=Dl3eUMJ6WTmv_kPT04R5QFieKkcmQ9fsiSt8PLU8D3w,4827
|
|
93
|
+
sdk/resources/auth.py,sha256=vzXxfVS31iecWsA3HQLdpZ42K39lALfbeU8N4_k_dcI,4455
|
|
94
|
+
sdk/resources/console.py,sha256=nuAn76S5Ot2EesSvmkRe3UG926nOD6pKyH0TrnIfuBI,13404
|
|
95
|
+
sdk/resources/corpora.py,sha256=DeZ9FTjClxcmDwrTz0opSJ8OGOoRnYZQvKr2KguVJNc,8783
|
|
96
|
+
sdk/resources/deployments.py,sha256=Oo5D6TF8fPKN_KGDQrP0v9Qwi_BoHZawsD51O7gTvEg,3326
|
|
97
|
+
sdk/resources/documents.py,sha256=mnc6oJop2bhdEwocTl29DxG8yIGc-bh6YaFLF79oc7A,23114
|
|
98
|
+
sdk/resources/feeds.py,sha256=fm2AT72_QNvTbfoRdNx_1Ac7ceYT0EbSM5jwwWwKJSk,8792
|
|
99
|
+
sdk/resources/indexes.py,sha256=yUAQI6jTdQKS1zyR6KGkSRxt32zD1Xn4zAn6noDBCQw,7985
|
|
100
|
+
sdk/resources/jobs.py,sha256=_nBQn-N-RHu1jVLZqc_4joY-QE70ObW_6deQEpF_tzM,5312
|
|
101
|
+
sdk/resources/metadata.py,sha256=_MlKJ4nchaLlyVKVvUwFd3uVy49FP0TSsOeKIePqpOg,1622
|
|
102
|
+
sdk/resources/models.py,sha256=wr9O-W-fHuGsZ81389beE1zLAEssfTCYx9ivvfDiYCM,3147
|
|
103
|
+
sdk/resources/onboarding.py,sha256=1pxjYLvGm9zwauP26IsUZXPgDXtg4vFuAsdiBMBKWRk,18043
|
|
104
|
+
sdk/resources/orgs.py,sha256=TlwPMhXFIUQtUAiDgNYWG1wciP7qsfWh3WN5zGZlXaM,1084
|
|
105
|
+
sdk/resources/pipeline_builder.py,sha256=rhlnr0BdIaYE-8vM2zWK3KXW19JboxpZZYnRr2N_ylk,8924
|
|
106
|
+
sdk/resources/pipelines.py,sha256=R4gAwRRjBTxPbWrkjJ6Mrk-wb3MS0qQ-1xNRYuQdVCY,17162
|
|
107
|
+
sdk/resources/projects.py,sha256=aKtLjVvwZ-eY3AxD1B4NtbcC2T5svNFTzXFffsieDbY,2753
|
|
108
|
+
sdk/resources/search.py,sha256=EjcwFp6GgQh3c86yjahtMjMrFHxzx-PGn5bRo8ar5rs,10209
|
|
109
|
+
sdk/resources/training.py,sha256=KnJVWnLJit1-9ssvWNxq109euwl7KpZGYHPETMmxu0Y,11517
|
|
110
|
+
sdk/resources/usage.py,sha256=4caf6Mo1KLRu8rKufR3x8r0VPMdgHjQbLbM1yXzetUs,2991
|
|
111
|
+
sdk/types/__init__.py,sha256=k5gnJ0Qj6sosC-0zIraq7NmuPN1KiNGFeJ8MJgR4vC0,9121
|
|
112
|
+
sdk/types/a2a.py,sha256=ZGfqp5b3GHGaTslwdNXD5t6pgvYRjJS2Uzv3byHt-Gw,1811
|
|
113
|
+
sdk/types/agents.py,sha256=s3qh8HDwz-JHUPVudx26hpG4E50jJC6qsmTe-9yJVZA,2808
|
|
114
|
+
sdk/types/audit.py,sha256=QR9SX4WvR2tpomPb4qj2atrxYcRDF5W72G3zsqVbr1Y,512
|
|
115
|
+
sdk/types/auth.py,sha256=v8h0uaCKuIo0ZUrzPkzJTt6UUCxiVl-keEbflraj_z8,798
|
|
116
|
+
sdk/types/chunks.py,sha256=R9xMVN1WRjGFZP8HMs-aXmj117akqdgfsBFEuqsiszQ,384
|
|
117
|
+
sdk/types/common.py,sha256=Xb09aZNTS6yBy4VJU6pKaMsreMn1VBSC0O5b1qF6HOQ,186
|
|
118
|
+
sdk/types/console.py,sha256=0jUoFtsOIio5pSa24S_E6Qd8xCWHdWyYB9h5B5IG6z8,1888
|
|
119
|
+
sdk/types/corpora.py,sha256=koJ-yRb6op2XDh7U6JmDJOc-Nmpk9Hvg1QRwZgHC3C8,961
|
|
120
|
+
sdk/types/deployments.py,sha256=KdAUFEPzYFE2lS5gx7EJ-5zwBq97mfokgvo2z2IPfIc,228
|
|
121
|
+
sdk/types/documents.py,sha256=iDvRbKWZJwTCF-IYWjeOayLuS62WG7ZCWSl9YpVLM0g,2746
|
|
122
|
+
sdk/types/embeddings.py,sha256=Sr6buAjW1meryDVtgdmRW_3JJWNziandxPpJLyZcAYc,395
|
|
123
|
+
sdk/types/evaluation.py,sha256=ys2lGD98i67hLFkiorEUdRVAQD0WjMHy1WXuAwJ_l8g,256
|
|
124
|
+
sdk/types/feedback.py,sha256=8hoPM9QQendyzbN1dg1V0K4co6rvgDB9Fx9i8oi8g6s,119
|
|
125
|
+
sdk/types/feeds.py,sha256=0hNHEI6U0V0eqtCRXy598dVuXv87AhfEmgm67DHV3cA,1406
|
|
126
|
+
sdk/types/indexes.py,sha256=3rW_D3vl7OWUKsNNv524yD5vS7tSgmF3Whv2OTEhyW0,773
|
|
127
|
+
sdk/types/jobs.py,sha256=zjb1Xf47vSi0q9ozX4zkXWTJ3a-egd13IoJ3DyxocjQ,984
|
|
128
|
+
sdk/types/models.py,sha256=wZvH6cgxvH0N5F97Lqd6rgS23v-TyR7QJgjleJLeawg,431
|
|
129
|
+
sdk/types/onboarding.py,sha256=reOjxaLda6yCyzqQUwmGKZLi-sYp1rjd8odbfX6gUig,9841
|
|
130
|
+
sdk/types/orgs.py,sha256=GS8eWaaSgY4o7QifMfb8NMsyr4iKsDsJgjM8b3hNfEU,176
|
|
131
|
+
sdk/types/pipelines.py,sha256=gC2zvXc8VtmUlfEt9_kPrqu8bhUYJfQy6pAxm5jIfSQ,4186
|
|
132
|
+
sdk/types/projects.py,sha256=GfLUXKPbsob_DvdhLMLb86b7ecDPB9gTwS4dX08PVzg,239
|
|
133
|
+
sdk/types/search.py,sha256=wIuFuRQ2f9QOKdWEw5ZDBqRZqdb34yYk0Xl6ChpXYkE,2724
|
|
134
|
+
sdk/types/training.py,sha256=QFvb1TGMmMQquM8AS9e-t83DQzFhQCfujJK6_WYXO2w,967
|
|
135
|
+
sdk/types/usage.py,sha256=ltJKB8wadTnRK-2eDjGGDijchkImwXHr9Q14pLZhbvc,736
|
|
136
|
+
knowledge2-0.4.0.dist-info/METADATA,sha256=ShzkO_DxRV-ZKhMzosNxp-gVr7WICZDWkNkguz4OeBo,18288
|
|
137
|
+
knowledge2-0.4.0.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
|
138
|
+
knowledge2-0.4.0.dist-info/top_level.txt,sha256=JuXS55gRP3EzGKmJgbLfVfUolO3cM_u69k3qvutnBuw,4
|
|
139
|
+
knowledge2-0.4.0.dist-info/RECORD,,
|