deepset-mcp 0.0.2rc1__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.
Files changed (114) hide show
  1. deepset_mcp/__init__.py +0 -0
  2. deepset_mcp/agents/__init__.py +0 -0
  3. deepset_mcp/agents/debugging/__init__.py +0 -0
  4. deepset_mcp/agents/debugging/debugging_agent.py +37 -0
  5. deepset_mcp/agents/debugging/system_prompt.md +214 -0
  6. deepset_mcp/agents/generalist/__init__.py +0 -0
  7. deepset_mcp/agents/generalist/generalist_agent.py +38 -0
  8. deepset_mcp/agents/generalist/system_prompt.md +241 -0
  9. deepset_mcp/api/README.md +536 -0
  10. deepset_mcp/api/__init__.py +0 -0
  11. deepset_mcp/api/client.py +277 -0
  12. deepset_mcp/api/custom_components/__init__.py +0 -0
  13. deepset_mcp/api/custom_components/models.py +25 -0
  14. deepset_mcp/api/custom_components/protocols.py +17 -0
  15. deepset_mcp/api/custom_components/resource.py +56 -0
  16. deepset_mcp/api/exceptions.py +70 -0
  17. deepset_mcp/api/haystack_service/__init__.py +0 -0
  18. deepset_mcp/api/haystack_service/protocols.py +13 -0
  19. deepset_mcp/api/haystack_service/resource.py +55 -0
  20. deepset_mcp/api/indexes/__init__.py +0 -0
  21. deepset_mcp/api/indexes/models.py +63 -0
  22. deepset_mcp/api/indexes/protocols.py +53 -0
  23. deepset_mcp/api/indexes/resource.py +138 -0
  24. deepset_mcp/api/integrations/__init__.py +1 -0
  25. deepset_mcp/api/integrations/models.py +49 -0
  26. deepset_mcp/api/integrations/protocols.py +27 -0
  27. deepset_mcp/api/integrations/resource.py +57 -0
  28. deepset_mcp/api/pipeline/__init__.py +17 -0
  29. deepset_mcp/api/pipeline/log_level.py +9 -0
  30. deepset_mcp/api/pipeline/models.py +235 -0
  31. deepset_mcp/api/pipeline/protocols.py +83 -0
  32. deepset_mcp/api/pipeline/resource.py +378 -0
  33. deepset_mcp/api/pipeline_template/__init__.py +0 -0
  34. deepset_mcp/api/pipeline_template/models.py +56 -0
  35. deepset_mcp/api/pipeline_template/protocols.py +17 -0
  36. deepset_mcp/api/pipeline_template/resource.py +88 -0
  37. deepset_mcp/api/protocols.py +122 -0
  38. deepset_mcp/api/secrets/__init__.py +0 -0
  39. deepset_mcp/api/secrets/models.py +16 -0
  40. deepset_mcp/api/secrets/protocols.py +29 -0
  41. deepset_mcp/api/secrets/resource.py +112 -0
  42. deepset_mcp/api/shared_models.py +17 -0
  43. deepset_mcp/api/transport.py +336 -0
  44. deepset_mcp/api/user/__init__.py +0 -0
  45. deepset_mcp/api/user/protocols.py +11 -0
  46. deepset_mcp/api/user/resource.py +38 -0
  47. deepset_mcp/api/workspace/__init__.py +7 -0
  48. deepset_mcp/api/workspace/models.py +23 -0
  49. deepset_mcp/api/workspace/protocols.py +41 -0
  50. deepset_mcp/api/workspace/resource.py +94 -0
  51. deepset_mcp/benchmark/README.md +425 -0
  52. deepset_mcp/benchmark/__init__.py +1 -0
  53. deepset_mcp/benchmark/agent_configs/debugging_agent.yml +10 -0
  54. deepset_mcp/benchmark/agent_configs/generalist_agent.yml +6 -0
  55. deepset_mcp/benchmark/dp_validation_error_analysis/__init__.py +0 -0
  56. deepset_mcp/benchmark/dp_validation_error_analysis/eda.ipynb +757 -0
  57. deepset_mcp/benchmark/dp_validation_error_analysis/prepare_interaction_data.ipynb +167 -0
  58. deepset_mcp/benchmark/dp_validation_error_analysis/preprocessing_utils.py +213 -0
  59. deepset_mcp/benchmark/runner/__init__.py +0 -0
  60. deepset_mcp/benchmark/runner/agent_benchmark_runner.py +561 -0
  61. deepset_mcp/benchmark/runner/agent_loader.py +110 -0
  62. deepset_mcp/benchmark/runner/cli.py +39 -0
  63. deepset_mcp/benchmark/runner/cli_agent.py +373 -0
  64. deepset_mcp/benchmark/runner/cli_index.py +71 -0
  65. deepset_mcp/benchmark/runner/cli_pipeline.py +73 -0
  66. deepset_mcp/benchmark/runner/cli_tests.py +226 -0
  67. deepset_mcp/benchmark/runner/cli_utils.py +61 -0
  68. deepset_mcp/benchmark/runner/config.py +73 -0
  69. deepset_mcp/benchmark/runner/config_loader.py +64 -0
  70. deepset_mcp/benchmark/runner/interactive.py +140 -0
  71. deepset_mcp/benchmark/runner/models.py +203 -0
  72. deepset_mcp/benchmark/runner/repl.py +67 -0
  73. deepset_mcp/benchmark/runner/setup_actions.py +238 -0
  74. deepset_mcp/benchmark/runner/streaming.py +360 -0
  75. deepset_mcp/benchmark/runner/teardown_actions.py +196 -0
  76. deepset_mcp/benchmark/runner/tracing.py +21 -0
  77. deepset_mcp/benchmark/tasks/chat_rag_answers_wrong_format.yml +16 -0
  78. deepset_mcp/benchmark/tasks/documents_output_wrong.yml +13 -0
  79. deepset_mcp/benchmark/tasks/jinja_str_instead_of_complex_type.yml +11 -0
  80. deepset_mcp/benchmark/tasks/jinja_syntax_error.yml +11 -0
  81. deepset_mcp/benchmark/tasks/missing_output_mapping.yml +14 -0
  82. deepset_mcp/benchmark/tasks/no_query_input.yml +13 -0
  83. deepset_mcp/benchmark/tasks/pipelines/chat_agent_jinja_str.yml +141 -0
  84. deepset_mcp/benchmark/tasks/pipelines/chat_agent_jinja_syntax.yml +141 -0
  85. deepset_mcp/benchmark/tasks/pipelines/chat_rag_answers_wrong_format.yml +181 -0
  86. deepset_mcp/benchmark/tasks/pipelines/chat_rag_missing_output_mapping.yml +189 -0
  87. deepset_mcp/benchmark/tasks/pipelines/rag_documents_wrong_format.yml +193 -0
  88. deepset_mcp/benchmark/tasks/pipelines/rag_no_query_input.yml +191 -0
  89. deepset_mcp/benchmark/tasks/pipelines/standard_index.yml +167 -0
  90. deepset_mcp/initialize_embedding_model.py +12 -0
  91. deepset_mcp/main.py +133 -0
  92. deepset_mcp/prompts/deepset_copilot_prompt.md +271 -0
  93. deepset_mcp/prompts/deepset_debugging_agent.md +214 -0
  94. deepset_mcp/store.py +5 -0
  95. deepset_mcp/tool_factory.py +473 -0
  96. deepset_mcp/tools/__init__.py +0 -0
  97. deepset_mcp/tools/custom_components.py +52 -0
  98. deepset_mcp/tools/doc_search.py +83 -0
  99. deepset_mcp/tools/haystack_service.py +358 -0
  100. deepset_mcp/tools/haystack_service_models.py +97 -0
  101. deepset_mcp/tools/indexes.py +129 -0
  102. deepset_mcp/tools/model_protocol.py +16 -0
  103. deepset_mcp/tools/pipeline.py +335 -0
  104. deepset_mcp/tools/pipeline_template.py +116 -0
  105. deepset_mcp/tools/secrets.py +45 -0
  106. deepset_mcp/tools/tokonomics/__init__.py +73 -0
  107. deepset_mcp/tools/tokonomics/decorators.py +396 -0
  108. deepset_mcp/tools/tokonomics/explorer.py +347 -0
  109. deepset_mcp/tools/tokonomics/object_store.py +177 -0
  110. deepset_mcp/tools/workspace.py +61 -0
  111. deepset_mcp-0.0.2rc1.dist-info/METADATA +292 -0
  112. deepset_mcp-0.0.2rc1.dist-info/RECORD +114 -0
  113. deepset_mcp-0.0.2rc1.dist-info/WHEEL +4 -0
  114. deepset_mcp-0.0.2rc1.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,536 @@
1
+ # deepset API SDK
2
+
3
+ The deepset API SDK provides a comprehensive Python interface for interacting with the deepset AI Platform. It simplifies the process of building, managing, and deploying AI-powered applications by providing structured access to all platform resources.
4
+
5
+ ## Getting Started
6
+
7
+ The SDK is built around the `AsyncDeepsetClient`, which provides access to different resources on the deepset platform. All operations are asynchronous and use modern Python async/await patterns for optimal performance.
8
+
9
+ ### Installation and Setup
10
+
11
+ Initialize the client with your API key:
12
+
13
+ ```python
14
+ from deepset_mcp.api.client import AsyncDeepsetClient
15
+
16
+ # Using environment variable DEEPSET_API_KEY
17
+ async with AsyncDeepsetClient() as client:
18
+ # Your code here
19
+ pass
20
+
21
+ # Or provide API key directly
22
+ async with AsyncDeepsetClient(api_key="your-api-key") as client:
23
+ # Your code here
24
+ pass
25
+ ```
26
+
27
+ The client automatically handles authentication, request management, and connection pooling. Always use it as an async context manager to ensure proper resource cleanup.
28
+
29
+ ## Core Resources
30
+
31
+ The SDK provides access to nine main resources, each designed for specific aspects of the deepset platform:
32
+
33
+ ### Pipelines
34
+
35
+ Pipelines are the core building blocks of your AI applications. They define how data flows through different components to produce results.
36
+
37
+ ```python
38
+ from deepset_mcp.api.client import AsyncDeepsetClient
39
+
40
+ async with AsyncDeepsetClient() as client:
41
+ # Access pipeline resource for a specific workspace
42
+ pipelines = client.pipelines(workspace="your-workspace")
43
+
44
+ # List all pipelines
45
+ pipeline_list = await pipelines.list(page_number=1, limit=10)
46
+
47
+ # Get a specific pipeline with its YAML configuration
48
+ pipeline = await pipelines.get("my-pipeline", include_yaml=True)
49
+
50
+ # Create a new pipeline
51
+ yaml_config = """
52
+ components:
53
+ text_embedder:
54
+ type: SentenceTransformersTextEmbedder
55
+ params:
56
+ model: "sentence-transformers/all-MiniLM-L6-v2"
57
+ """
58
+
59
+ response = await pipelines.create(
60
+ name="my-new-pipeline",
61
+ yaml_config=yaml_config
62
+ )
63
+ ```
64
+
65
+ ### Pipeline Management
66
+
67
+ The SDK provides comprehensive pipeline lifecycle management:
68
+
69
+ ```python
70
+ from deepset_mcp.api.client import AsyncDeepsetClient
71
+
72
+ yaml_config = "some: yaml"
73
+ updated_yaml_config = "some: other yaml"
74
+
75
+ async with AsyncDeepsetClient() as client:
76
+ # Access pipeline resource for a specific workspace
77
+ pipelines = client.pipelines(workspace="your-workspace")
78
+
79
+ # Validate a pipeline configuration before deployment
80
+ validation_result = await pipelines.validate(yaml_config)
81
+ if validation_result.valid:
82
+ print("Pipeline configuration is valid")
83
+ else:
84
+ for error in validation_result.errors:
85
+ print(f"Error {error.code}: {error.message}")
86
+
87
+ # Update an existing pipeline
88
+ await pipelines.update(
89
+ pipeline_name="my-pipeline",
90
+ updated_pipeline_name="my-renamed-pipeline", # Optional
91
+ yaml_config=updated_yaml_config # Optional
92
+ )
93
+
94
+ # Deploy a pipeline to production
95
+ deployment_result = await pipelines.deploy("my-pipeline")
96
+
97
+ # Delete a pipeline
98
+ await pipelines.delete("my-pipeline")
99
+ ```
100
+
101
+ ### Search and Streaming
102
+
103
+ Execute searches using deployed pipelines:
104
+
105
+ ```python
106
+ from deepset_mcp.api.client import AsyncDeepsetClient
107
+
108
+ async with AsyncDeepsetClient() as client:
109
+ pipelines = client.pipelines(workspace="your-workspace")
110
+
111
+ # Basic search
112
+ search_response = await pipelines.search(
113
+ pipeline_name="my-pipeline",
114
+ query="What is artificial intelligence?",
115
+ debug=True, # Include debug information
116
+ view_prompts=True, # Include prompts in response
117
+ params={"top_k": 5}, # Pipeline-specific parameters
118
+ filters={"category": "AI"} # Search filters
119
+ )
120
+
121
+ # Streaming search for real-time results
122
+ async for event in pipelines.search_stream(
123
+ pipeline_name="my-pipeline",
124
+ query="What is artificial intelligence?",
125
+ debug=True
126
+ ):
127
+ if event.type == "delta":
128
+ print(event.delta.text, end="")
129
+ elif event.type == "result":
130
+ print(f"\nFinal result: {event.result}")
131
+ ```
132
+
133
+ ### Pipeline Monitoring
134
+
135
+ Monitor pipeline performance and troubleshoot issues:
136
+
137
+ ```python
138
+ from deepset_mcp.api.pipeline.log_level import LogLevel
139
+ from deepset_mcp.api.client import AsyncDeepsetClient
140
+
141
+
142
+ async with AsyncDeepsetClient() as client:
143
+ pipelines = client.pipelines(workspace="your-workspace")
144
+ # Get pipeline logs
145
+ logs = await pipelines.get_logs(
146
+ pipeline_name="my-pipeline",
147
+ limit=50,
148
+ level=LogLevel.ERROR # Filter by log level
149
+ )
150
+
151
+ for log_entry in logs.data:
152
+ print(f"[{log_entry.level}] {log_entry.message}")
153
+ ```
154
+
155
+ ### Indexes
156
+
157
+ Indexes store and organize your data for efficient retrieval:
158
+
159
+ ```python
160
+ from deepset_mcp.api.client import AsyncDeepsetClient
161
+
162
+ async with AsyncDeepsetClient() as client:
163
+ indexes = client.indexes(workspace="your-workspace")
164
+
165
+ # List all indexes
166
+ index_list = await indexes.list()
167
+
168
+ # Get a specific index
169
+ index = await indexes.get("my-index")
170
+
171
+ # Create a new index
172
+ index_yaml = """
173
+ document_store:
174
+ type: InMemoryDocumentStore
175
+ indexing_pipeline:
176
+ type: Pipeline
177
+ components:
178
+ converter:
179
+ type: TextFileToDocument
180
+ """
181
+
182
+ await indexes.create(
183
+ name="my-new-index",
184
+ yaml_config=index_yaml,
185
+ description="My document index"
186
+ )
187
+
188
+ updated_yaml = """
189
+ document_store:
190
+ type: OpenSearchDocumentStore
191
+ indexing_pipeline:
192
+ type: Pipeline
193
+ components:
194
+ converter:
195
+ type: TextFileToDocument
196
+ """
197
+
198
+ # Update an existing index
199
+ await indexes.update(
200
+ index_name="my-index",
201
+ updated_index_name="my-renamed-index",
202
+ yaml_config=updated_yaml
203
+ )
204
+ ```
205
+
206
+ ### Pipeline Templates
207
+
208
+ Templates provide pre-built pipeline configurations for common use cases:
209
+
210
+ ```python
211
+ from deepset_mcp.api.client import AsyncDeepsetClient
212
+
213
+ async with AsyncDeepsetClient() as client:
214
+ templates = client.pipeline_templates(workspace="your-workspace")
215
+
216
+ # List available templates
217
+ template_list = await templates.list_templates(
218
+ limit=20,
219
+ field="created_at",
220
+ order="DESC",
221
+ filter="category eq 'RAG'" # OData filter
222
+ )
223
+
224
+ # Get a specific template with its YAML configuration
225
+ template = await templates.get_template("template-name")
226
+
227
+ # Use the template YAML to create a new pipeline
228
+ if template.yaml_config:
229
+ pipelines = client.pipelines(workspace="your-workspace")
230
+ await pipelines.create(
231
+ name="pipeline-from-template",
232
+ yaml_config=template.yaml_config
233
+ )
234
+ ```
235
+
236
+ ### Haystack Service
237
+
238
+ Access Haystack component definitions and schemas:
239
+
240
+ ```python
241
+ from deepset_mcp.api.client import AsyncDeepsetClient
242
+
243
+ async with AsyncDeepsetClient() as client:
244
+ haystack = client.haystack_service()
245
+
246
+ # Get all component schemas
247
+ schemas = await haystack.get_component_schemas()
248
+
249
+ # Get input/output information for a specific component
250
+ io_info = await haystack.get_component_input_output("ConditionalRouter")
251
+
252
+ print(f"Component inputs: {io_info.inputs}")
253
+ print(f"Component outputs: {io_info.outputs}")
254
+ ```
255
+
256
+ ### Custom Components
257
+
258
+ Manage custom component installations:
259
+
260
+ ```python
261
+ from deepset_mcp.api.client import AsyncDeepsetClient
262
+
263
+ async with AsyncDeepsetClient() as client:
264
+ custom_components = client.custom_components(workspace="your-workspace")
265
+
266
+ # List installed custom components
267
+ installations = await custom_components.list_installations()
268
+
269
+ for installation in installations.data:
270
+ print(f"Component: {installation.custom_component_id}")
271
+ print(f"Status: {installation.status}")
272
+ print(f"Version: {installation.version}")
273
+ ```
274
+
275
+ ### Integrations
276
+
277
+ Manage external service integrations:
278
+
279
+ ```python
280
+ from deepset_mcp.api.client import AsyncDeepsetClient
281
+ from deepset_mcp.api.integrations.models import IntegrationProvider
282
+
283
+ async with AsyncDeepsetClient() as client:
284
+ integrations = client.integrations()
285
+
286
+ # List all integrations
287
+ integration_list = await integrations.list()
288
+
289
+ for integration in integration_list.integrations:
290
+ print(f"Provider: {integration.provider}")
291
+ print(f"Domain: {integration.provider_domain}")
292
+
293
+ # Get a specific integration by provider
294
+ openai_integration = await integrations.get(IntegrationProvider.OPENAI)
295
+ print(f"OpenAI Integration: {openai_integration.provider_domain}")
296
+ ```
297
+
298
+ ### Secrets
299
+
300
+ Manage secrets for secure configuration and sensitive data:
301
+
302
+ ```python
303
+ from deepset_mcp.api.client import AsyncDeepsetClient
304
+
305
+ async with AsyncDeepsetClient() as client:
306
+ secrets = client.secrets()
307
+
308
+ # List all secrets
309
+ secret_list = await secrets.list(
310
+ limit=20,
311
+ field="created_at",
312
+ order="DESC"
313
+ )
314
+
315
+ # Create a new secret
316
+ await secrets.create(
317
+ name="api-key-secret",
318
+ secret="your-secret-value"
319
+ )
320
+
321
+ # Get a specific secret
322
+ secret = await secrets.get("secret-id")
323
+ print(f"Secret name: {secret.name}")
324
+
325
+ # Delete a secret
326
+ await secrets.delete("secret-id")
327
+ ```
328
+
329
+ ### Users
330
+
331
+ Access user information and manage user-related operations:
332
+
333
+ ```python
334
+ from deepset_mcp.api.client import AsyncDeepsetClient
335
+
336
+
337
+ async with AsyncDeepsetClient() as client:
338
+ users = client.users()
339
+
340
+ # Get user information
341
+ user = await users.get("user-id")
342
+ print(f"User: {user.given_name} {user.family_name}")
343
+ print(f"Email: {user.email}")
344
+ ```
345
+
346
+ ### Workspaces
347
+
348
+ Manage workspaces to organize your projects and resources:
349
+
350
+ ```python
351
+ from deepset_mcp.api.client import AsyncDeepsetClient
352
+
353
+ async with AsyncDeepsetClient() as client:
354
+ workspaces = client.workspaces()
355
+
356
+ # List all workspaces
357
+ workspace_list = await workspaces.list()
358
+
359
+ for workspace in workspace_list.data:
360
+ print(f"Workspace: {workspace.name}")
361
+ print(f"ID: {workspace.workspace_id}")
362
+ print(f"Default timeout: {workspace.default_idle_timeout_in_seconds}s")
363
+
364
+ # Get a specific workspace
365
+ workspace = await workspaces.get("my-workspace")
366
+ print(f"Languages: {workspace.languages}")
367
+
368
+ # Create a new workspace
369
+ await workspaces.create(name="new-workspace")
370
+
371
+ # Delete a workspace
372
+ await workspaces.delete("old-workspace")
373
+ ```
374
+
375
+ ## Advanced Configuration
376
+
377
+ ### Custom Transport
378
+
379
+ For advanced use cases, you can provide custom transport configuration:
380
+
381
+ ```python
382
+ from deepset_mcp.api.client import AsyncDeepsetClient
383
+
384
+ transport_config = {
385
+ "timeout": 30, # Request timeout in seconds
386
+ "retries": 3, # Number of retries
387
+ }
388
+
389
+ async with AsyncDeepsetClient(
390
+ transport_config=transport_config
391
+ ) as client:
392
+ # Your code here
393
+ pass
394
+ ```
395
+
396
+ ### Error Handling
397
+
398
+ The SDK provides specific exceptions for different error conditions:
399
+
400
+ ```python
401
+ from deepset_mcp.api.exceptions import (
402
+ BadRequestError,
403
+ ResourceNotFoundError,
404
+ UnexpectedAPIError
405
+ )
406
+
407
+ from deepset_mcp.api.client import AsyncDeepsetClient
408
+
409
+
410
+ async with AsyncDeepsetClient() as client:
411
+ pipelines = client.pipelines(workspace="your-workspace")
412
+
413
+ try:
414
+ pipeline = await pipelines.get("non-existent-pipeline")
415
+ except ResourceNotFoundError:
416
+ print("Pipeline not found")
417
+ except BadRequestError as e:
418
+ print(f"Bad request: {e}")
419
+ except UnexpectedAPIError as e:
420
+ print(f"Unexpected error: {e}")
421
+ ```
422
+
423
+ ## Best Practices
424
+
425
+ ### Resource Management
426
+
427
+ Always use the client as an async context manager to ensure proper cleanup:
428
+
429
+ ```python
430
+ from deepset_mcp.api.client import AsyncDeepsetClient
431
+
432
+ # Good - automatically handles resource cleanup
433
+ async with AsyncDeepsetClient() as client:
434
+ result = await client.pipelines("workspace").list()
435
+
436
+ # Avoid - requires manual cleanup
437
+ client = AsyncDeepsetClient()
438
+ try:
439
+ result = await client.pipelines("workspace").list()
440
+ finally:
441
+ await client.close()
442
+ ```
443
+
444
+ ### Workspace Organization
445
+
446
+ Organize your resources by workspace for better management:
447
+
448
+ ```python
449
+ from deepset_mcp.api.client import AsyncDeepsetClient
450
+
451
+ async with AsyncDeepsetClient() as client:
452
+ # Development workspace
453
+ dev_pipelines = client.pipelines("development")
454
+ dev_pipeline = await dev_pipelines.create(name="test-pipeline", yaml_config=config)
455
+
456
+ # Production workspace
457
+ prod_pipelines = client.pipelines("production")
458
+ prod_pipeline = await prod_pipelines.create(name="prod-pipeline", yaml_config=config)
459
+ ```
460
+
461
+ ### Validation Before Deployment
462
+
463
+ Always validate pipeline configurations before deployment:
464
+
465
+ ```python
466
+ from deepset_mcp.api.client import AsyncDeepsetClient
467
+
468
+
469
+ async with AsyncDeepsetClient() as client:
470
+ pipelines = client.pipelines(workspace="your-workspace")
471
+
472
+ # Validate configuration
473
+ validation_result = await pipelines.validate(yaml_config)
474
+
475
+ if validation_result.valid:
476
+ # Create and deploy pipeline
477
+ await pipelines.create(name="my-pipeline", yaml_config=yaml_config)
478
+ deployment_result = await pipelines.deploy("my-pipeline")
479
+
480
+ if deployment_result.valid:
481
+ print("Pipeline deployed successfully")
482
+ else:
483
+ print("Deployment failed:", deployment_result.errors)
484
+ else:
485
+ print("Configuration invalid:", validation_result.errors)
486
+ ```
487
+
488
+ ### Streaming for Real-Time Applications
489
+
490
+ Use streaming for applications that need real-time responses:
491
+
492
+ ```python
493
+ async def stream_search_results(pipelines, query):
494
+ async for event in pipelines.search_stream(
495
+ pipeline_name="chat-pipeline",
496
+ query=query
497
+ ):
498
+ if event.type == "delta":
499
+ # Stream partial results to user
500
+ yield event.delta.text
501
+ elif event.type == "result":
502
+ # Final result available
503
+ return event.result
504
+ elif event.error:
505
+ # Handle streaming errors
506
+ raise Exception(event.error)
507
+ ```
508
+
509
+ ## API Reference
510
+
511
+ ### AsyncDeepsetClient
512
+
513
+ Main client class for API access.
514
+
515
+ **Constructor Parameters:**
516
+ - `api_key` (str, optional): API key for authentication. Falls back to `DEEPSET_API_KEY` environment variable.
517
+ - `base_url` (str, optional): Base URL for the API. Defaults to `https://api.cloud.deepset.ai/api`.
518
+ - `transport` (TransportProtocol, optional): Custom transport implementation.
519
+ - `transport_config` (dict, optional): Configuration for default transport.
520
+
521
+ **Resource Methods:**
522
+ - `pipelines(workspace: str)`: Returns PipelineResource for the specified workspace
523
+ - `indexes(workspace: str)`: Returns IndexResource for the specified workspace
524
+ - `pipeline_templates(workspace: str)`: Returns PipelineTemplateResource for the specified workspace
525
+ - `custom_components(workspace: str)`: Returns CustomComponentsResource for the specified workspace
526
+ - `integrations()`: Returns IntegrationResource
527
+ - `haystack_service()`: Returns HaystackServiceResource
528
+ - `secrets()`: Returns SecretResource
529
+ - `users()`: Returns UserResource
530
+ - `workspaces()`: Returns WorkspaceResource for workspace management
531
+
532
+ ### Resource Classes
533
+
534
+ Each resource class provides methods specific to that resource type. All methods are async and return appropriate response models.
535
+
536
+ For detailed method signatures and response models, refer to the type hints in the source code or use your IDE's autocomplete functionality.
File without changes