qtype 0.0.16__py3-none-any.whl → 0.1.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.
Files changed (126) hide show
  1. qtype/application/commons/tools.py +1 -1
  2. qtype/application/converters/tools_from_api.py +5 -5
  3. qtype/application/converters/tools_from_module.py +2 -2
  4. qtype/application/converters/types.py +14 -43
  5. qtype/application/documentation.py +1 -1
  6. qtype/application/facade.py +92 -71
  7. qtype/base/types.py +227 -7
  8. qtype/commands/convert.py +20 -8
  9. qtype/commands/generate.py +19 -27
  10. qtype/commands/run.py +54 -36
  11. qtype/commands/serve.py +74 -54
  12. qtype/commands/validate.py +34 -8
  13. qtype/commands/visualize.py +46 -22
  14. qtype/dsl/__init__.py +6 -5
  15. qtype/dsl/custom_types.py +1 -1
  16. qtype/dsl/domain_types.py +65 -5
  17. qtype/dsl/linker.py +384 -0
  18. qtype/dsl/loader.py +315 -0
  19. qtype/dsl/model.py +612 -363
  20. qtype/dsl/parser.py +200 -0
  21. qtype/dsl/types.py +50 -0
  22. qtype/interpreter/api.py +57 -136
  23. qtype/interpreter/auth/aws.py +19 -9
  24. qtype/interpreter/auth/generic.py +93 -16
  25. qtype/interpreter/base/base_step_executor.py +429 -0
  26. qtype/interpreter/base/batch_step_executor.py +171 -0
  27. qtype/interpreter/base/exceptions.py +50 -0
  28. qtype/interpreter/base/executor_context.py +74 -0
  29. qtype/interpreter/base/factory.py +117 -0
  30. qtype/interpreter/base/progress_tracker.py +75 -0
  31. qtype/interpreter/base/secrets.py +339 -0
  32. qtype/interpreter/base/step_cache.py +73 -0
  33. qtype/interpreter/base/stream_emitter.py +469 -0
  34. qtype/interpreter/conversions.py +455 -21
  35. qtype/interpreter/converters.py +73 -0
  36. qtype/interpreter/endpoints.py +355 -0
  37. qtype/interpreter/executors/agent_executor.py +242 -0
  38. qtype/interpreter/executors/aggregate_executor.py +93 -0
  39. qtype/interpreter/executors/decoder_executor.py +163 -0
  40. qtype/interpreter/executors/doc_to_text_executor.py +112 -0
  41. qtype/interpreter/executors/document_embedder_executor.py +75 -0
  42. qtype/interpreter/executors/document_search_executor.py +122 -0
  43. qtype/interpreter/executors/document_source_executor.py +118 -0
  44. qtype/interpreter/executors/document_splitter_executor.py +105 -0
  45. qtype/interpreter/executors/echo_executor.py +63 -0
  46. qtype/interpreter/executors/field_extractor_executor.py +160 -0
  47. qtype/interpreter/executors/file_source_executor.py +101 -0
  48. qtype/interpreter/executors/file_writer_executor.py +110 -0
  49. qtype/interpreter/executors/index_upsert_executor.py +228 -0
  50. qtype/interpreter/executors/invoke_embedding_executor.py +92 -0
  51. qtype/interpreter/executors/invoke_flow_executor.py +51 -0
  52. qtype/interpreter/executors/invoke_tool_executor.py +353 -0
  53. qtype/interpreter/executors/llm_inference_executor.py +272 -0
  54. qtype/interpreter/executors/prompt_template_executor.py +78 -0
  55. qtype/interpreter/executors/sql_source_executor.py +106 -0
  56. qtype/interpreter/executors/vector_search_executor.py +91 -0
  57. qtype/interpreter/flow.py +147 -22
  58. qtype/interpreter/metadata_api.py +115 -0
  59. qtype/interpreter/resource_cache.py +5 -4
  60. qtype/interpreter/stream/chat/__init__.py +15 -0
  61. qtype/interpreter/stream/chat/converter.py +391 -0
  62. qtype/interpreter/{chat → stream/chat}/file_conversions.py +2 -2
  63. qtype/interpreter/stream/chat/ui_request_to_domain_type.py +140 -0
  64. qtype/interpreter/stream/chat/vercel.py +609 -0
  65. qtype/interpreter/stream/utils/__init__.py +15 -0
  66. qtype/interpreter/stream/utils/build_vercel_ai_formatter.py +74 -0
  67. qtype/interpreter/stream/utils/callback_to_stream.py +66 -0
  68. qtype/interpreter/stream/utils/create_streaming_response.py +18 -0
  69. qtype/interpreter/stream/utils/default_chat_extract_text.py +20 -0
  70. qtype/interpreter/stream/utils/error_streaming_response.py +20 -0
  71. qtype/interpreter/telemetry.py +135 -8
  72. qtype/interpreter/tools/__init__.py +5 -0
  73. qtype/interpreter/tools/function_tool_helper.py +265 -0
  74. qtype/interpreter/types.py +328 -0
  75. qtype/interpreter/typing.py +83 -89
  76. qtype/interpreter/ui/404/index.html +1 -1
  77. qtype/interpreter/ui/404.html +1 -1
  78. qtype/interpreter/ui/_next/static/{nUaw6_IwRwPqkzwe5s725 → 20HoJN6otZ_LyHLHpCPE6}/_buildManifest.js +1 -1
  79. qtype/interpreter/ui/_next/static/chunks/{393-8fd474427f8e19ce.js → 434-b2112d19f25c44ff.js} +3 -3
  80. qtype/interpreter/ui/_next/static/chunks/app/page-8c67d16ac90d23cb.js +1 -0
  81. qtype/interpreter/ui/_next/static/chunks/ba12c10f-546f2714ff8abc66.js +1 -0
  82. qtype/interpreter/ui/_next/static/css/8a8d1269e362fef7.css +3 -0
  83. qtype/interpreter/ui/icon.png +0 -0
  84. qtype/interpreter/ui/index.html +1 -1
  85. qtype/interpreter/ui/index.txt +4 -4
  86. qtype/semantic/checker.py +583 -0
  87. qtype/semantic/generate.py +262 -83
  88. qtype/semantic/loader.py +95 -0
  89. qtype/semantic/model.py +436 -159
  90. qtype/semantic/resolver.py +59 -17
  91. qtype/semantic/visualize.py +28 -31
  92. {qtype-0.0.16.dist-info → qtype-0.1.0.dist-info}/METADATA +16 -3
  93. qtype-0.1.0.dist-info/RECORD +134 -0
  94. qtype/dsl/base_types.py +0 -38
  95. qtype/dsl/validator.py +0 -465
  96. qtype/interpreter/batch/__init__.py +0 -0
  97. qtype/interpreter/batch/file_sink_source.py +0 -162
  98. qtype/interpreter/batch/flow.py +0 -95
  99. qtype/interpreter/batch/sql_source.py +0 -92
  100. qtype/interpreter/batch/step.py +0 -74
  101. qtype/interpreter/batch/types.py +0 -41
  102. qtype/interpreter/batch/utils.py +0 -178
  103. qtype/interpreter/chat/chat_api.py +0 -237
  104. qtype/interpreter/chat/vercel.py +0 -314
  105. qtype/interpreter/exceptions.py +0 -10
  106. qtype/interpreter/step.py +0 -67
  107. qtype/interpreter/steps/__init__.py +0 -0
  108. qtype/interpreter/steps/agent.py +0 -114
  109. qtype/interpreter/steps/condition.py +0 -36
  110. qtype/interpreter/steps/decoder.py +0 -88
  111. qtype/interpreter/steps/llm_inference.py +0 -171
  112. qtype/interpreter/steps/prompt_template.py +0 -54
  113. qtype/interpreter/steps/search.py +0 -24
  114. qtype/interpreter/steps/tool.py +0 -219
  115. qtype/interpreter/streaming_helpers.py +0 -123
  116. qtype/interpreter/ui/_next/static/chunks/app/page-7e26b6156cfb55d3.js +0 -1
  117. qtype/interpreter/ui/_next/static/chunks/ba12c10f-22556063851a6df2.js +0 -1
  118. qtype/interpreter/ui/_next/static/css/b40532b0db09cce3.css +0 -3
  119. qtype/interpreter/ui/favicon.ico +0 -0
  120. qtype/loader.py +0 -390
  121. qtype-0.0.16.dist-info/RECORD +0 -106
  122. /qtype/interpreter/ui/_next/static/{nUaw6_IwRwPqkzwe5s725 → 20HoJN6otZ_LyHLHpCPE6}/_ssgManifest.js +0 -0
  123. {qtype-0.0.16.dist-info → qtype-0.1.0.dist-info}/WHEEL +0 -0
  124. {qtype-0.0.16.dist-info → qtype-0.1.0.dist-info}/entry_points.txt +0 -0
  125. {qtype-0.0.16.dist-info → qtype-0.1.0.dist-info}/licenses/LICENSE +0 -0
  126. {qtype-0.0.16.dist-info → qtype-0.1.0.dist-info}/top_level.txt +0 -0
@@ -9,26 +9,58 @@ are resolved to actual object references.
9
9
  import logging
10
10
  from typing import Any
11
11
 
12
- import qtype.dsl.domain_types
12
+ from pydantic import BaseModel
13
+
14
+ import qtype.base.types as base_types
13
15
  import qtype.dsl.model as dsl
14
16
  import qtype.semantic.model as ir
15
17
  from qtype.base.exceptions import SemanticError
16
- from qtype.dsl.validator import _is_dsl_type, _resolve_forward_ref
17
18
 
18
19
  logger = logging.getLogger(__name__)
19
20
 
20
21
  FIELDS_TO_IGNORE = {"Application.references"}
21
22
 
22
23
 
24
+ def _is_dsl_type(type_obj: Any) -> bool:
25
+ """Check if a type is a DSL type that should be converted to semantic."""
26
+ if not hasattr(type_obj, "__name__"):
27
+ return False
28
+
29
+ # Check if it's defined in the DSL module
30
+ return (
31
+ hasattr(type_obj, "__module__")
32
+ and (
33
+ type_obj.__module__ == dsl.__name__
34
+ or type_obj.__module__ == base_types.__name__
35
+ )
36
+ and not type_obj.__name__.startswith("_")
37
+ )
38
+
39
+
40
+ def _resolve_forward_ref(field_type: Any) -> Any:
41
+ """
42
+ Resolve a ForwardRef type to its actual type.
43
+ This is used to handle cases where the type is a string that refers to a class.
44
+ """
45
+ if hasattr(field_type, "__forward_arg__"):
46
+ # Extract the string from ForwardRef and process it
47
+ forward_ref_str = field_type.__forward_arg__
48
+ # Use eval to get the actual type from the string
49
+ return eval(forward_ref_str, dict(vars(dsl)))
50
+ return field_type
51
+
52
+
23
53
  def to_semantic_ir(
24
- dslobj: qtype.dsl.domain_types.StrictBaseModel,
54
+ dslobj: BaseModel,
25
55
  symbol_table: dict[str, Any],
26
56
  ) -> Any:
27
57
  """
28
- Convert a DSL QTypeSpec object to its semantic intermediate representation (IR).
58
+ Convert a DSL object to its semantic intermediate representation (IR).
59
+
60
+ Handles both regular BaseModel types and RootModel types (like *List documents).
29
61
 
30
62
  Args:
31
- dsl: The DSL QTypeSpec object to convert.
63
+ dslobj: The DSL object to convert (StrictBaseModel or RootModel).
32
64
 
33
65
  Returns:
34
66
  ir.Application: The semantic IR representation of the DSL object.
@@ -66,32 +98,42 @@ def to_semantic_ir(
66
98
  result = ir_class(**params)
67
99
  symbol_table[obj_id] = result # type: ignore
68
100
  return result
69
- elif isinstance(dslobj, list):
70
- return [to_semantic_ir(item, symbol_table) for item in dslobj] # type: ignore
71
101
  else:
72
102
  return dslobj
73
103
 
74
104
 
75
- def resolve(application: dsl.Application) -> ir.Application:
105
+ def resolve(document: dsl.DocumentType) -> ir.DocumentType:
76
106
  """
77
- Resolve a DSL Application into its semantic intermediate representation.
107
+ Resolve a DSL Document into its semantic intermediate representation.
78
108
 
79
- This function transforms the DSL Application into its IR equivalent,
80
- resolving all ID references to actual object references.
109
+ This function transforms any DSL DocumentType (Application, ModelList, etc.)
110
+ into its IR equivalent, resolving all ID references to actual object references.
81
111
 
82
112
  Args:
83
- application: The DSL Application to transform
113
+ document: The DSL Document to transform (Application or any *List type)
84
114
 
85
115
  Returns:
86
- dsl.Application: The resolved IR application
116
+ ir.DocumentType: The resolved IR document
87
117
  """
88
- # Next, we'll build up the semantic representation.
118
+ # Build up the semantic representation.
89
119
  # This will create a map of all objects by their ID, ensuring that we can resolve
90
120
  # references to actual objects.
91
- result = to_semantic_ir(application, {})
92
- if not isinstance(result, ir.Application):
121
+ result = to_semantic_ir(document, {})
122
+
123
+ # Verify the result is one of the valid DocumentType variants
124
+ if not isinstance(
125
+ result,
126
+ (
127
+ ir.Application,
128
+ ir.AuthorizationProviderList,
129
+ ir.ModelList,
130
+ ir.ToolList,
131
+ ir.TypeList,
132
+ ir.VariableList,
133
+ ),
134
+ ):
93
135
  raise SemanticError(
94
- "The root object must be an Application, but got: "
136
+ f"The root object must be a valid DocumentType, but got: "
95
137
  f"{type(result).__name__}"
96
138
  )
97
139
  return result
@@ -17,7 +17,6 @@ from qtype.semantic.model import (
17
17
  APITool,
18
18
  Application,
19
19
  AuthorizationProvider,
20
- Condition,
21
20
  Decoder,
22
21
  DocumentIndex,
23
22
  DocumentSearch,
@@ -118,13 +117,17 @@ def _generate_flow_subgraph(
118
117
  flow: Flow, flow_id: str
119
118
  ) -> tuple[list[str], list[str]]:
120
119
  """Generate a flow subgraph with internal nodes and return external connections."""
121
- mode_indicator = "💬" if flow.mode == "Chat" else "🔄"
122
120
  # Add more spacing and line breaks for better SVG rendering
123
121
  description = f"\n{flow.description}" if flow.description else ""
124
122
 
123
+ # Choose direction based on flow characteristics:
124
+ # - Flows with interface (e.g., Conversational) use LR (left-right)
125
+ # - Linear pipelines without interface use TB (top-bottom)
126
+ direction = "LR" if flow.interface else "TB"
127
+
125
128
  lines = [
126
- f' subgraph {flow_id} ["{mode_indicator} Flow: {flow.id}{description}"]',
127
- " direction LR",
129
+ f' subgraph {flow_id} ["🔄 Flow: {flow.id}{description}"]',
130
+ f" direction {direction}",
128
131
  ]
129
132
 
130
133
  # Generate nodes for each step
@@ -195,25 +198,6 @@ def _generate_step_node(
195
198
  lines.append(
196
199
  f' {node_id}@{{shape: doc, label: "📄 Template: {step.id}"}}'
197
200
  )
198
- elif isinstance(step, Condition):
199
- lines.append(
200
- f' {node_id}@{{shape: diamond, label: "❓ Condition: {step.id}"}}'
201
- )
202
- # Add conditional branches
203
- then_id = f"{node_id}_THEN"
204
- then_def, then_ext = _generate_step_node(step.then, then_id, flow_id)
205
- lines.extend(then_def)
206
- lines.append(f" {node_id} -->|Yes| {then_id}")
207
- external_connections.extend(then_ext)
208
-
209
- if step.else_:
210
- else_id = f"{node_id}_ELSE"
211
- else_def, else_ext = _generate_step_node(
212
- step.else_, else_id, flow_id
213
- )
214
- lines.extend(else_def)
215
- lines.append(f" {node_id} -->|No| {else_id}")
216
- external_connections.extend(else_ext)
217
201
  elif isinstance(step, Decoder):
218
202
  format_label = (
219
203
  step.format.value
@@ -275,30 +259,43 @@ def _generate_step_connections(
275
259
  """Generate connections between steps based on variable flow."""
276
260
  lines = []
277
261
 
278
- # Create a map of output variables to their producing steps
262
+ # If we have a start node and flow inputs, add them to initial output map
279
263
  output_map: dict[str, str] = {}
280
- for node_id, step in step_nodes:
281
- for output_var in step.outputs:
282
- output_map[output_var.id] = node_id
283
-
284
- # If we have a start node and flow inputs, add them to the output map
285
264
  if start_node_id and flow_inputs:
286
265
  for flow_input in flow_inputs:
287
266
  output_map[flow_input.id] = start_node_id
288
267
 
289
- # Connect steps based on input requirements
268
+ # Process each step: connect inputs, then register outputs
269
+ # This ensures we connect to the previous producer before updating map
290
270
  for node_id, step in step_nodes:
271
+ # First, connect this step's inputs to their producers
291
272
  for input_var in step.inputs:
292
273
  if input_var.id in output_map:
293
274
  producer_id = output_map[input_var.id]
275
+ # Skip self-referencing connections (when a step both
276
+ # consumes and produces the same variable)
277
+ if producer_id == node_id:
278
+ continue
294
279
  # Get a simple string representation of the variable type
295
280
  var_type = str(input_var.type).split(".")[
296
281
  -1
297
282
  ] # Get the last part after dots
283
+ var_id_and_type = f"{input_var.id}: {var_type}"
284
+
285
+ is_list = str(var_type).startswith("list[") and str(
286
+ var_type
287
+ ).endswith("]")
288
+ if is_list:
289
+ var_id_and_type = f'"{var_id_and_type}"'
290
+
298
291
  lines.append(
299
- f" {producer_id} -->|{input_var.id}: {var_type}| {node_id}"
292
+ f" {producer_id} -->|{var_id_and_type}| {node_id}"
300
293
  )
301
294
 
295
+ # Then, register this step's outputs for future steps
296
+ for output_var in step.outputs:
297
+ output_map[output_var.id] = node_id
298
+
302
299
  # If no connections were made, create a simple sequential flow
303
300
  if not lines and len(step_nodes) > 1:
304
301
  for i in range(len(step_nodes) - 1):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qtype
3
- Version: 0.0.16
3
+ Version: 0.1.0
4
4
  Summary: DSL for Generative AI Prototyping
5
5
  Author-email: Lou Kratz <lou.kratz+qtype@bazaarvoice.com>
6
6
  License-Expression: Apache-2.0
@@ -15,20 +15,24 @@ Requires-Dist: python-dotenv>=1.0.0
15
15
  Requires-Dist: openai>=1.93.0
16
16
  Requires-Dist: fsspec>=2025.5.1
17
17
  Requires-Dist: mkdocs-awesome-pages-plugin>=2.10.1
18
- Requires-Dist: mermaid-py>=0.8.0
19
18
  Requires-Dist: pip-system-certs>=5.2
20
19
  Requires-Dist: openapi3-parser>=1.1.21
21
20
  Requires-Dist: pydantic-yaml>=1.6.0
21
+ Requires-Dist: google-cloud-aiplatform>=1.120.0
22
22
  Provides-Extra: interpreter
23
+ Requires-Dist: aiostream>=0.7.1; extra == "interpreter"
23
24
  Requires-Dist: arize-phoenix-otel>=0.12.1; extra == "interpreter"
24
25
  Requires-Dist: boto3>=1.34.0; extra == "interpreter"
26
+ Requires-Dist: docling>=2.55.1; extra == "interpreter"
27
+ Requires-Dist: diskcache[interpreter]>=5.6.3; extra == "interpreter"
25
28
  Requires-Dist: fastapi>=0.116.1; extra == "interpreter"
26
29
  Requires-Dist: llama-index-embeddings-bedrock>=0.5.2; extra == "interpreter"
27
30
  Requires-Dist: llama-index-embeddings-openai>=0.3.1; extra == "interpreter"
28
- Requires-Dist: llama-index-llms-bedrock-converse>=0.7.4; extra == "interpreter"
31
+ Requires-Dist: llama-index-llms-bedrock-converse>=0.10.5; extra == "interpreter"
29
32
  Requires-Dist: llama-index-llms-bedrock>=0.3.8; extra == "interpreter"
30
33
  Requires-Dist: llama-index>=0.12.45; extra == "interpreter"
31
34
  Requires-Dist: openinference-instrumentation-llama-index>=4.3.4; extra == "interpreter"
35
+ Requires-Dist: opensearch-py>=2.7.0; extra == "interpreter"
32
36
  Requires-Dist: pandas>=2.2.3; extra == "interpreter"
33
37
  Requires-Dist: psycopg2-binary>=2.9.10; extra == "interpreter"
34
38
  Requires-Dist: pyarrow>=21.0.0; extra == "interpreter"
@@ -37,6 +41,15 @@ Requires-Dist: python-magic>=0.4.27; extra == "interpreter"
37
41
  Requires-Dist: s3fs>=2025.7.0; extra == "interpreter"
38
42
  Requires-Dist: sqlalchemy>=2.0.42; extra == "interpreter"
39
43
  Requires-Dist: uvicorn[standard]>=0.35.0; extra == "interpreter"
44
+ Requires-Dist: llama-index-llms-vertex>=0.6.1; extra == "interpreter"
45
+ Requires-Dist: langfuse>=3.9.0; extra == "interpreter"
46
+ Requires-Dist: opentelemetry-exporter-otlp>=1.35.0; extra == "interpreter"
47
+ Requires-Dist: opentelemetry-sdk>=1.35.0; extra == "interpreter"
48
+ Requires-Dist: docx2txt>=0.9; extra == "interpreter"
49
+ Requires-Dist: llama-index-vector-stores-qdrant>=0.8.6; extra == "interpreter"
50
+ Requires-Dist: jsonpath-ng>=1.7.0; extra == "interpreter"
51
+ Requires-Dist: llama-index-readers-huggingface-fs>=0.4.1; extra == "interpreter"
52
+ Requires-Dist: datasets>=4.4.1; extra == "interpreter"
40
53
  Dynamic: license-file
41
54
 
42
55
  # QType
@@ -0,0 +1,134 @@
1
+ qtype/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ qtype/cli.py,sha256=XSVtfzpjTbQBQ60iyb5oupwi-mFpGH5jT8H1bJQdjis,4697
3
+ qtype/application/__init__.py,sha256=WS3x0b0NRt-nRmj1trsytlvMpQS5KN7Hi6THGfY8bKE,230
4
+ qtype/application/documentation.py,sha256=ifmdt0jBW410baQuCUxovYDQQj-kxPZ4fmf6rWps9JY,4988
5
+ qtype/application/facade.py,sha256=i_ILR_SE5RS_Ic6M_gESBrhQpgsfxFMS4KTlEmlgoGo,5827
6
+ qtype/application/commons/__init__.py,sha256=QyWAB2cvimM4DxNo2oBFCGkfBikH-ZeMBMGWmJcq4Uc,135
7
+ qtype/application/commons/tools.py,sha256=U_jJdVN2NO5v9b3qb6dPIiVykfal6tp6NvcLGWR6HC8,5035
8
+ qtype/application/converters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ qtype/application/converters/tools_from_api.py,sha256=h1g4nOLEpLPqbXAtqSLPA1WuRELMOMsI392kA61nsxc,16831
10
+ qtype/application/converters/tools_from_module.py,sha256=PDfQVMytpCjcMxoCUb_Viqxn3IzD7Lb9tHqsbb9tcT0,9047
11
+ qtype/application/converters/types.py,sha256=OsJQ2fmgQm5NaxgS9cvHER9anfv3qttbt7co3f-MxPE,440
12
+ qtype/base/__init__.py,sha256=4jwcB8cDHzDNF3NBv8WqHNk3sDZDNvUFNjx2CKZ-pyY,283
13
+ qtype/base/exceptions.py,sha256=NR6-p6FnIabFPid9xIUTTeNhCYoIw8sbxEzaWQ11a4o,1155
14
+ qtype/base/logging.py,sha256=eqStjILlmhNryYRqUiyTdDHoUoiLKSY8J0GevvzvTKQ,1075
15
+ qtype/base/types.py,sha256=zkweSHfpP6MrDEHzEpEWTZ-xVxQLZJj1QhKv-Mj4s0A,6834
16
+ qtype/commands/__init__.py,sha256=Qo4M07zm5I63r8STxDjvt5fhP1jygdXTsExNGELkefc,257
17
+ qtype/commands/convert.py,sha256=wh2-MSBlnMU5peAzVeQcGqqFzQbeCuL5WC5-EDZ-TFM,4636
18
+ qtype/commands/generate.py,sha256=v_k_CN0ub-_18rquvX_B366K4bec1aFLnLO9Bp-NfRc,7287
19
+ qtype/commands/run.py,sha256=Sr7BgYYux4wMstLF_HU_JOnA3BZrlgUJ30wojf-IMSY,5720
20
+ qtype/commands/serve.py,sha256=lb5akSZ8fYLlCl8u8HDFFk6kyCHHwSRnP5wNzZry8sg,3216
21
+ qtype/commands/validate.py,sha256=f0aOk6A08910bFfamfg8xafByADMx4EktXAGMrEeUXU,3067
22
+ qtype/commands/visualize.py,sha256=J1eqwaVWTteGzib84g7Qtp0JlX9wIMmRQWSv1RhAns8,3763
23
+ qtype/dsl/__init__.py,sha256=clrmM1ZlK6c0Le_183eo5bc9dDK53Ebp-vH5ZVfwhfw,397
24
+ qtype/dsl/custom_types.py,sha256=N3qswimv0foH40YDubHaTZ3HYF9RUbZ2x5eQ4i798Ko,2901
25
+ qtype/dsl/domain_types.py,sha256=7NH0UGqOW-DbNvJa5mErbJtpZzTHRnC1EVrQm0Uz950,3663
26
+ qtype/dsl/linker.py,sha256=c7PPTULy7_z_9u_qeseIaomR_B8kBa9YzOhQpjeGaSM,12975
27
+ qtype/dsl/loader.py,sha256=mht0BqfmyTNHIEDaF3iTEmYQLJBP5GIZULwexxw9Dpg,9771
28
+ qtype/dsl/model.py,sha256=--aSrcsH1ZjWCDqfagViTENzxPxRZfmCDNAVGnwxeqM,38964
29
+ qtype/dsl/parser.py,sha256=jpz32zyvOIo-R6Xr1lshzQiGfeo-2-fZczkdfURBufo,5487
30
+ qtype/dsl/types.py,sha256=k6cgThA287bZ_pvTKQvxWhatcYCPNne8zpqOYOvLvOg,1687
31
+ qtype/interpreter/__init__.py,sha256=IaRF90JLFbsTLKz9LTOMI_Pz4xwVaEyXPNaXV7sLou8,43
32
+ qtype/interpreter/api.py,sha256=V7hjsmDhe1IwbcwdM5bnPGBiwH3TtlMLjUJdGJumCdA,4193
33
+ qtype/interpreter/conversions.py,sha256=wOk_bFdS5TE63CsDr00NnG6l1sZ7pX3wC6AlolM_H2U,20599
34
+ qtype/interpreter/converters.py,sha256=B8nixffQuwvuR6m7U54Bnb7qFPhNDqqyyzvT-dPkE4E,2013
35
+ qtype/interpreter/endpoints.py,sha256=un4iCYCk86lYKpTDFdzlByvebdctNwRF3n4oD4ZwpTw,11946
36
+ qtype/interpreter/flow.py,sha256=ZjGh0C3yDa8fGz970nhlxQF21h7KSVQR5jpVmwre80k,5253
37
+ qtype/interpreter/metadata_api.py,sha256=LfJjt9atsgiAra6aVBXLoJrPa06_CBUagYysT556nt8,3267
38
+ qtype/interpreter/resource_cache.py,sha256=K0kzpm223COWk7FN9qyOvNOEoOcABR4yLeADL9ekE_o,1188
39
+ qtype/interpreter/telemetry.py,sha256=Hcwd9sMW55LejgOIpPwjkWsmTvB2vnpSr4TshTAKljk,4901
40
+ qtype/interpreter/types.py,sha256=2J_3zbZ9o8LfZK9f5d_EInmO8F2XpMUFcDmSPz_ZUQg,9979
41
+ qtype/interpreter/typing.py,sha256=Ka5wkkpQFZQKgKMCR3p7bD7W4uHpOryevEi-isc2RCw,3888
42
+ qtype/interpreter/auth/__init__.py,sha256=L98AxaSizb6LMdXEr8FGe9MBtPBnfCeWxjI0oi7sg_o,62
43
+ qtype/interpreter/auth/aws.py,sha256=eMXyEBqzv7I243fS-A1zHPQkN--yPFEh1Hxp4rxmyEs,8154
44
+ qtype/interpreter/auth/cache.py,sha256=uVyJ_jkbprRdlvbnm1DVIaYyTDLEsPXvi3xjuRneH2k,1825
45
+ qtype/interpreter/auth/generic.py,sha256=WHXu3SxWzxJn_bv6R20Aod84Vwe73xTYHx754dY1MSg,6178
46
+ qtype/interpreter/base/base_step_executor.py,sha256=jbs6HSwZcO4hU1Fu8JrijxBFVN43iCvQnxKdcKzrlvo,16166
47
+ qtype/interpreter/base/batch_step_executor.py,sha256=g5_yPd5VTy_slW5ZXyamgFyTRd0CoaeVfDHj8x4PvUk,5906
48
+ qtype/interpreter/base/exceptions.py,sha256=7CIexzDfIjvAA0c6qwg4jsDcTQM1pKQLj6szxcqil_c,1586
49
+ qtype/interpreter/base/executor_context.py,sha256=s_EiNURd7uDkUdOvuVC0u7zuWDGV89r4ppMFOC0C1m0,2839
50
+ qtype/interpreter/base/factory.py,sha256=vpMvqVmBCrdJKbizEkjqNNDbq8d-CKsAEXiNX7PrJRM,3823
51
+ qtype/interpreter/base/progress_tracker.py,sha256=Nvhinit8nuhsEZAeoLqsG-mXNK0ir0JL07uhBu0t-JM,2385
52
+ qtype/interpreter/base/secrets.py,sha256=74NoU0Fx96vva6LGWXk7EkvFWD4uZEk12NjWrGHWZTc,11241
53
+ qtype/interpreter/base/step_cache.py,sha256=-cP19l38tbNyhYLoWNyN-rVQ12CS4RkDYepumthgijM,2361
54
+ qtype/interpreter/base/stream_emitter.py,sha256=8l5bCFTjMA3Takjh51QdWw8ERb7_GamHVoU-x6xkG5I,13828
55
+ qtype/interpreter/executors/agent_executor.py,sha256=pll5tdUD977fmMMfoXVhY-dLQttv-aqT04gyjrF6seo,8378
56
+ qtype/interpreter/executors/aggregate_executor.py,sha256=Z3NJekpeo7aqqvOcXQqb6d6t9g4UB1r3N1lSV9EwZq4,3495
57
+ qtype/interpreter/executors/decoder_executor.py,sha256=KqLhnhiclMIcUNf3bu7H4vDAOXCQeVO0rc2hIXm1qZ4,5610
58
+ qtype/interpreter/executors/doc_to_text_executor.py,sha256=ZkTtKUL0BfNIiuj-OcYybn1f0By6ujRmd1U4VEAtJt4,3804
59
+ qtype/interpreter/executors/document_embedder_executor.py,sha256=uVZihDWVI9Wl-xDD_2qE-KwSMXk0yM2RVKy3Dsb-dXI,2626
60
+ qtype/interpreter/executors/document_search_executor.py,sha256=q_z8Lhl6jlIRt2I8NaINUiygr9T7nuz_tpRS6OowrvQ,4507
61
+ qtype/interpreter/executors/document_source_executor.py,sha256=ZpBrBaE16YeRk750TxvE08NnCIUzArjESZImESomaIo,4247
62
+ qtype/interpreter/executors/document_splitter_executor.py,sha256=tarIOxlf-DxpZWxQLOi4G7uwMjxOEF29W9222f6infk,3812
63
+ qtype/interpreter/executors/echo_executor.py,sha256=oQUgzQTHruT4on7wgEBOcikwOy6KP82d5zrul5QLoRU,2194
64
+ qtype/interpreter/executors/field_extractor_executor.py,sha256=M7sPFR89PiAF0vU5veaAE8N130SeC0WGPNO1t3yV5dM,5551
65
+ qtype/interpreter/executors/file_source_executor.py,sha256=OUT_zJrYN3iFMUgLECde93C4rv8PthcQsuJ--CJvEsI,3605
66
+ qtype/interpreter/executors/file_writer_executor.py,sha256=x4BpgdXM7Xhz1tJJ5MmBIjFO4y80VC1V1ow3tox_Xrw,4099
67
+ qtype/interpreter/executors/index_upsert_executor.py,sha256=GjfKWlETyvJ7r73EOSamyNHDn8wW5UppzVwQmvk1UDQ,8168
68
+ qtype/interpreter/executors/invoke_embedding_executor.py,sha256=Z_E3A5OOy9T4SYbr34FJzUAM57IQBdhPX7NWfpC6MSM,3297
69
+ qtype/interpreter/executors/invoke_flow_executor.py,sha256=U30cYM3F_zy1_2CD1Dde59xyZD0rDa5W46lST1hxF6s,1682
70
+ qtype/interpreter/executors/invoke_tool_executor.py,sha256=eKV3IgFMmnIOt6KoLuBkzoZEw8X__s4HqgdIPqiTgxI,12593
71
+ qtype/interpreter/executors/llm_inference_executor.py,sha256=A6b_Ns_734TCn_DMhdNSqWc5qX970FryhpsX_jtEu_4,9593
72
+ qtype/interpreter/executors/prompt_template_executor.py,sha256=AKZWQvsoY2fQoSg5N8_R7LIlC8AKTwjNKOz_MuvASc0,2700
73
+ qtype/interpreter/executors/sql_source_executor.py,sha256=-fUWQK2S7NBe3oJG1lmkNRujASHFyXu3H8h-WrobbQw,3932
74
+ qtype/interpreter/executors/vector_search_executor.py,sha256=8IJpobn8XYX_WCDGPN5XGGXzsE2Fpvg2nM4hc8DV9GI,3189
75
+ qtype/interpreter/stream/chat/__init__.py,sha256=evNfJJp3VUiTgip8___vBryAZubS-cij-8YYAjOJXX8,401
76
+ qtype/interpreter/stream/chat/converter.py,sha256=0kAYtX_QNDZHJbzFHJGTHYLlKbl79hDkmZuFECG7FSQ,13623
77
+ qtype/interpreter/stream/chat/file_conversions.py,sha256=klSsXjATfSoOzKEjAiabGRXKErIHxP6-bVWbNM3EM4E,1751
78
+ qtype/interpreter/stream/chat/ui_request_to_domain_type.py,sha256=QcRxUkHW4GWookBPRClh95wPDivvD-xvgt0TC-Az9QY,4695
79
+ qtype/interpreter/stream/chat/vercel.py,sha256=3q3H2xTZ17tCKCt53GurrKUKtG3kBMEqZ_OT9KAudMY,19164
80
+ qtype/interpreter/stream/utils/__init__.py,sha256=V7slu_wB4H7MiM6pysKjww0eDVg53bo_NvkEbtM2NuU,533
81
+ qtype/interpreter/stream/utils/build_vercel_ai_formatter.py,sha256=P_EL2VB_hWigN4OQrtnZgBj1C3hm3_rajdlY60Ay_j8,2511
82
+ qtype/interpreter/stream/utils/callback_to_stream.py,sha256=oAriHcFNUTYsA__6A3bNDdjGe4JMpRUStCq7UUKzRRc,1904
83
+ qtype/interpreter/stream/utils/create_streaming_response.py,sha256=OsefnAV6i1RnfP3EjnfvVwfl3fscKvBleBs6I6ubJ1s,495
84
+ qtype/interpreter/stream/utils/default_chat_extract_text.py,sha256=opEwJujQ1pNn_pEbHtVWfEJpO8tiArnm4G4XqJQp-o8,502
85
+ qtype/interpreter/stream/utils/error_streaming_response.py,sha256=wX9oD3w4x9_hIT15rDTGboOAix80gW_VkvpIo4CMVi0,613
86
+ qtype/interpreter/tools/__init__.py,sha256=kgUmX4jVdKe2kXSFfdxWeO4BOU2W2tUY005KGDyKoys,153
87
+ qtype/interpreter/tools/function_tool_helper.py,sha256=Qne_-XX9S0Cxld1AGs6zCnzA3Y3CVIkHC-M7PU4it70,9816
88
+ qtype/interpreter/ui/404.html,sha256=DlXv3HnsqQO0N3zexYRIYLdxp-LLKBOL_1TKNVyTzB8,6907
89
+ qtype/interpreter/ui/file.svg,sha256=K2eBLDJcGZoCU2zb7qDFk6cvcH0yO3LuPgjbqwZ1O9Q,391
90
+ qtype/interpreter/ui/globe.svg,sha256=thS5vxg5JZV2YayFFJj-HYAp_UOmL7_thvniYkpX588,1035
91
+ qtype/interpreter/ui/icon.png,sha256=_6nLJGL8ZsuOMyDMPxTM2oIdAUMCTLRejxN0fRyiqug,605542
92
+ qtype/interpreter/ui/index.html,sha256=s6Q8X8A3PlVocc0gcjyI5nE2xWTsn1u22XxfsaEyqS0,6429
93
+ qtype/interpreter/ui/index.txt,sha256=6lP5PY6zC9jiNN8G-RhdHuc0w8M1vXkBXMFbH_pdy2U,3630
94
+ qtype/interpreter/ui/next.svg,sha256=VZld-tbstJRaHoVt3KA8XhaqW_E_0htN9qdK55NXvPw,1375
95
+ qtype/interpreter/ui/vercel.svg,sha256=8IEzey_uY1tFW2MnVAaj5_OdagFOJa2Q2rWmfmKhKsQ,128
96
+ qtype/interpreter/ui/window.svg,sha256=ZEdoxKrrR2e84pM0TusMEl-4BKlNgBRAQkByIC2F46E,385
97
+ qtype/interpreter/ui/404/index.html,sha256=DlXv3HnsqQO0N3zexYRIYLdxp-LLKBOL_1TKNVyTzB8,6907
98
+ qtype/interpreter/ui/_next/static/20HoJN6otZ_LyHLHpCPE6/_buildManifest.js,sha256=0vsMOGOUUSRTopZZCMo6vOZAv9Cv1y_Op2pDCfR_gm8,544
99
+ qtype/interpreter/ui/_next/static/20HoJN6otZ_LyHLHpCPE6/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
100
+ qtype/interpreter/ui/_next/static/chunks/434-b2112d19f25c44ff.js,sha256=w8wMuRUv16h3AnZYPN7mBdmX4LdeLz2QOgnYFVcd6rU,483590
101
+ qtype/interpreter/ui/_next/static/chunks/4bd1b696-cf72ae8a39fa05aa.js,sha256=LZF4GSB27wWEGfcZ8svgftIhKsR-dbSEPQOMFE1UMZk,172729
102
+ qtype/interpreter/ui/_next/static/chunks/964-2b041321a01cbf56.js,sha256=bNvMJDSoselMWYBOle3aNrTUGI5QH4fqwFJylKAOQBI,166060
103
+ qtype/interpreter/ui/_next/static/chunks/ba12c10f-546f2714ff8abc66.js,sha256=ZQ18rys4yLfPxrJKDFAPCunmM4EAf1EdWgGKHSSmoVc,27560
104
+ qtype/interpreter/ui/_next/static/chunks/framework-7c95b8e5103c9e90.js,sha256=DOKGYsI-E-_-bPetqL9T2YAkmfJw74DS4rMmb0q-Nu4,182720
105
+ qtype/interpreter/ui/_next/static/chunks/main-app-6fc6346bc8f7f163.js,sha256=1ZmGHUk2IyojKisUhbDSHd92tWVBzkjQFWXfHfa6xGw,557
106
+ qtype/interpreter/ui/_next/static/chunks/main-e26b9cb206da2cac.js,sha256=RyWVg7xUCd25ftCvewNChywH-GzG0ndCwzfxUk6FAik,117652
107
+ qtype/interpreter/ui/_next/static/chunks/polyfills-42372ed130431b0a.js,sha256=CXPB1kyIrcjjyVBBDLWLKI9yEY1ZZbeASUON648vloM,112594
108
+ qtype/interpreter/ui/_next/static/chunks/webpack-08642e441b39b6c2.js,sha256=pKy0RNL4jzGXP3Xpxl2t9xP7WcPL31k5EN26E7sDDMY,3359
109
+ qtype/interpreter/ui/_next/static/chunks/app/layout-a05273ead5de2c41.js,sha256=dJnsPHn-pQkAnEQyKEW3qbIoj3TWzqGj8E0H4ou6jUQ,589
110
+ qtype/interpreter/ui/_next/static/chunks/app/page-8c67d16ac90d23cb.js,sha256=niPKzFSKcHll7mDY5vDbbuvxgSbCva2sfz10i-d6iqw,39753
111
+ qtype/interpreter/ui/_next/static/chunks/app/_not-found/page-e110d2a9d0a83d82.js,sha256=0vU7y8ruY2D5Gsa9ymwbZeK7yZbfPDm0yYiQ8SG8ZmI,2670
112
+ qtype/interpreter/ui/_next/static/chunks/pages/_app-0a0020ddd67f79cf.js,sha256=42mX-qEGt0LNFAAUjOhcM71wHqZHO_xQFM53G5WPiSc,233
113
+ qtype/interpreter/ui/_next/static/chunks/pages/_error-03529f2c21436739.js,sha256=m8CkMJwrMUfIvaSXNXOsO6TOxsWPXQjBa9R52GCvaQk,218
114
+ qtype/interpreter/ui/_next/static/css/8a8d1269e362fef7.css,sha256=OZ73MS7C4fys9hY6jq0vApbjzR5CuB0U48gk2bdbEl0,42203
115
+ qtype/interpreter/ui/_next/static/media/4cf2300e9c8272f7-s.p.woff2,sha256=op-QCm1gPpiUSTJ5VuesYeo-aybKdCb2TnzM8s1K7Tc,28388
116
+ qtype/interpreter/ui/_next/static/media/747892c23ea88013-s.woff2,sha256=fVYJU4p5VF7JReAZdx7VYuLGWmwcPEzMTqNDcuJ3w5Y,13036
117
+ qtype/interpreter/ui/_next/static/media/8d697b304b401681-s.woff2,sha256=L-8o3IIethe91jtC7gxTC4zX1J0g83yrYaTKeWUUpwM,14676
118
+ qtype/interpreter/ui/_next/static/media/93f479601ee12b01-s.p.woff2,sha256=t6wUSzlMvYEFLWOX7AwzOXl3sdfpvAledE5lKjeMb7M,31288
119
+ qtype/interpreter/ui/_next/static/media/9610d9e46709d722-s.woff2,sha256=N08hXnJfWWXM9XN7Rteie_5rOzIOaof0kGjkiIksSAk,12608
120
+ qtype/interpreter/ui/_next/static/media/ba015fad6dcf6784-s.woff2,sha256=92BKU6ACUPZttLR91EMnzipD9u3shQ1SF7uAI4gZ790,15292
121
+ qtype/semantic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
+ qtype/semantic/base_types.py,sha256=wfUlT0gV3_Mk1xLLI64SSXCB9GFmn29yz5adTaHrsOI,1540
123
+ qtype/semantic/checker.py,sha256=B23bFmSISFgmL9ji_0QOFuTaSF55xLZNPDwyCXm1Z8U,19906
124
+ qtype/semantic/generate.py,sha256=s56N0ollRJVVxy6RUKZWFFReKYcSSVw33ixvT2MQRuA,21116
125
+ qtype/semantic/loader.py,sha256=QRhTc_AJfsWSMn8ThaW60GmIGjFMN-3bBUy4pktFjz4,3041
126
+ qtype/semantic/model.py,sha256=OMScGFp1FMe8k_yWFhFs5yJW67fKL75BrZDUBmPT9aI,26981
127
+ qtype/semantic/resolver.py,sha256=RE103j88UXrJ6G_d4m29xDBPNA_gCwElJWBHmbBdyMA,4597
128
+ qtype/semantic/visualize.py,sha256=thjrZcfQuZJWrZ9EMAPhAa2kNikR5rLIJrfcD3hJ8XY,17426
129
+ qtype-0.1.0.dist-info/licenses/LICENSE,sha256=1KA5EgYBSR0O6nCH2HEvk6Di53YKJ9r_VCR7G8G8qAY,11341
130
+ qtype-0.1.0.dist-info/METADATA,sha256=IlhkGKFc3ohJUmvoKRUEZEU91jCOw1t3uIaEsSFYDvw,5583
131
+ qtype-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
132
+ qtype-0.1.0.dist-info/entry_points.txt,sha256=5y4vj8RLvgl2tXSj-Hm7v5-Tn3kP4-UonjNoN-mfaQE,41
133
+ qtype-0.1.0.dist-info/top_level.txt,sha256=ONroH5B0mZ51jr7NSWCK0weFwwCO7wBLmyVS1YqNU14,6
134
+ qtype-0.1.0.dist-info/RECORD,,
qtype/dsl/base_types.py DELETED
@@ -1,38 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from enum import Enum
4
-
5
- from pydantic import BaseModel, ConfigDict
6
-
7
- # ---------------- Shared Base Types and Enums ----------------
8
-
9
-
10
- class PrimitiveTypeEnum(str, Enum):
11
- """Represents the type of data a user or system input can accept within the DSL."""
12
-
13
- audio = "audio"
14
- boolean = "boolean"
15
- bytes = "bytes"
16
- date = "date"
17
- datetime = "datetime"
18
- int = "int"
19
- file = "file"
20
- float = "float"
21
- image = "image"
22
- text = "text"
23
- time = "time"
24
- video = "video"
25
-
26
-
27
- class StepCardinality(str, Enum):
28
- """Does this step emit 1 (one) or 0...N (many) items?"""
29
-
30
- one = "one"
31
- many = "many"
32
- auto = "auto" # Let's the step determine this in semantic resolution. Currently only Flows can do this..
33
-
34
-
35
- class StrictBaseModel(BaseModel):
36
- """Base model with extra fields forbidden."""
37
-
38
- model_config = ConfigDict(extra="forbid")