qtype 0.1.11__py3-none-any.whl → 0.1.13__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 (263) hide show
  1. qtype/` +0 -0
  2. qtype/application/__init__.py +0 -2
  3. qtype/application/converters/tools_from_api.py +67 -57
  4. qtype/application/converters/tools_from_module.py +66 -32
  5. qtype/base/types.py +6 -1
  6. qtype/commands/convert.py +3 -6
  7. qtype/commands/generate.py +97 -10
  8. qtype/commands/mcp.py +68 -0
  9. qtype/commands/run.py +116 -44
  10. qtype/commands/validate.py +4 -4
  11. qtype/docs/.pages +8 -0
  12. qtype/docs/Concepts/mental-model-and-philosophy.md +363 -0
  13. qtype/docs/Contributing/.pages +4 -0
  14. qtype/docs/Contributing/index.md +283 -0
  15. qtype/docs/Contributing/roadmap.md +81 -0
  16. qtype/docs/Decisions/ADR-001-Chat-vs-Completion-Endpoint-Features.md +56 -0
  17. qtype/docs/Gallery/dataflow_pipelines.md +81 -0
  18. qtype/docs/Gallery/dataflow_pipelines.mermaid +45 -0
  19. qtype/docs/Gallery/research_assistant.md +97 -0
  20. qtype/docs/Gallery/research_assistant.mermaid +42 -0
  21. qtype/docs/Gallery/simple_chatbot.md +38 -0
  22. qtype/docs/Gallery/simple_chatbot.mermaid +35 -0
  23. qtype/docs/How To/Authentication/configure_aws_authentication.md +60 -0
  24. qtype/docs/How To/Authentication/use_api_key_authentication.md +40 -0
  25. qtype/docs/How To/Command Line Usage/load_multiple_inputs_from_files.md +77 -0
  26. qtype/docs/How To/Command Line Usage/pass_inputs_on_the_cli.md +52 -0
  27. qtype/docs/How To/Command Line Usage/serve_with_auto_reload.md +27 -0
  28. qtype/docs/How To/Data Processing/adjust_concurrency.md +40 -0
  29. qtype/docs/How To/Data Processing/cache_step_results.md +71 -0
  30. qtype/docs/How To/Data Processing/decode_json_xml.md +24 -0
  31. qtype/docs/How To/Data Processing/explode_collections.md +40 -0
  32. qtype/docs/How To/Data Processing/gather_results.md +68 -0
  33. qtype/docs/How To/Data Processing/invoke_other_flows.md +71 -0
  34. qtype/docs/How To/Data Processing/load_data_from_athena.md +49 -0
  35. qtype/docs/How To/Data Processing/read_data_from_files.md +61 -0
  36. qtype/docs/How To/Data Processing/read_sql_databases.md +46 -0
  37. qtype/docs/How To/Data Processing/write_data_to_file.md +39 -0
  38. qtype/docs/How To/Invoke Models/call_large_language_models.md +51 -0
  39. qtype/docs/How To/Invoke Models/create_embeddings.md +49 -0
  40. qtype/docs/How To/Invoke Models/reuse_prompts_with_templates.md +38 -0
  41. qtype/docs/How To/Language Features/include_qtype_yaml.md +45 -0
  42. qtype/docs/How To/Language Features/include_raw_text_from_other_files.md +48 -0
  43. qtype/docs/How To/Language Features/reference_entities_by_id.md +51 -0
  44. qtype/docs/How To/Language Features/use_agent_skills.md +29 -0
  45. qtype/docs/How To/Language Features/use_environment_variables.md +48 -0
  46. qtype/docs/How To/Language Features/use_optional_variables.md +42 -0
  47. qtype/docs/How To/Language Features/use_qtype_mcp.md +59 -0
  48. qtype/docs/How To/Observability & Debugging/trace_calls_with_open_telemetry.md +49 -0
  49. qtype/docs/How To/Observability & Debugging/validate_qtype_yaml.md +36 -0
  50. qtype/docs/How To/Observability & Debugging/visualize_application_architecture.md +61 -0
  51. qtype/docs/How To/Observability & Debugging/visualize_example.mermaid +35 -0
  52. qtype/docs/How To/Qtype Server/flow_as_ui.png +0 -0
  53. qtype/docs/How To/Qtype Server/serve_flows_as_apis.md +40 -0
  54. qtype/docs/How To/Qtype Server/serve_flows_as_ui.md +41 -0
  55. qtype/docs/How To/Qtype Server/use_conversational_interfaces.md +56 -0
  56. qtype/docs/How To/Qtype Server/use_variables_with_ui_hints.md +48 -0
  57. qtype/docs/How To/Tools & Integration/bind_tool_inputs_and_outputs.md +47 -0
  58. qtype/docs/How To/Tools & Integration/create_tools_from_openapi_specifications.md +85 -0
  59. qtype/docs/How To/Tools & Integration/create_tools_from_python_modules.md +87 -0
  60. qtype/docs/Reference/cli.md +336 -0
  61. qtype/docs/Reference/plugins.md +99 -0
  62. qtype/docs/Reference/semantic-validation-rules.md +184 -0
  63. qtype/docs/Tutorials/.pages +1 -0
  64. qtype/docs/Tutorials/01-first-qtype-application.md +249 -0
  65. qtype/docs/Tutorials/02-conversational-chatbot.md +327 -0
  66. qtype/docs/Tutorials/03-structured-data.md +480 -0
  67. qtype/docs/Tutorials/04-tools-and-function-calling.md +476 -0
  68. qtype/docs/Tutorials/example_chat.png +0 -0
  69. qtype/docs/Tutorials/index.md +92 -0
  70. qtype/docs/components/APIKeyAuthProvider.md +7 -0
  71. qtype/docs/components/APITool.md +10 -0
  72. qtype/docs/components/AWSAuthProvider.md +13 -0
  73. qtype/docs/components/AWSSecretManager.md +5 -0
  74. qtype/docs/components/Agent.md +6 -0
  75. qtype/docs/components/Aggregate.md +7 -0
  76. qtype/docs/components/AggregateStats.md +7 -0
  77. qtype/docs/components/Application.md +22 -0
  78. qtype/docs/components/AuthorizationProvider.md +6 -0
  79. qtype/docs/components/AuthorizationProviderList.md +5 -0
  80. qtype/docs/components/BearerTokenAuthProvider.md +6 -0
  81. qtype/docs/components/BedrockReranker.md +8 -0
  82. qtype/docs/components/ChatContent.md +7 -0
  83. qtype/docs/components/ChatMessage.md +6 -0
  84. qtype/docs/components/Collect.md +6 -0
  85. qtype/docs/components/ConstantPath.md +5 -0
  86. qtype/docs/components/Construct.md +6 -0
  87. qtype/docs/components/CustomType.md +7 -0
  88. qtype/docs/components/Decoder.md +8 -0
  89. qtype/docs/components/DecoderFormat.md +8 -0
  90. qtype/docs/components/DocToTextConverter.md +7 -0
  91. qtype/docs/components/Document.md +7 -0
  92. qtype/docs/components/DocumentEmbedder.md +6 -0
  93. qtype/docs/components/DocumentIndex.md +7 -0
  94. qtype/docs/components/DocumentSearch.md +7 -0
  95. qtype/docs/components/DocumentSource.md +12 -0
  96. qtype/docs/components/DocumentSplitter.md +9 -0
  97. qtype/docs/components/Echo.md +8 -0
  98. qtype/docs/components/Embedding.md +7 -0
  99. qtype/docs/components/EmbeddingModel.md +6 -0
  100. qtype/docs/components/Explode.md +5 -0
  101. qtype/docs/components/FieldExtractor.md +21 -0
  102. qtype/docs/components/FileSource.md +6 -0
  103. qtype/docs/components/FileWriter.md +7 -0
  104. qtype/docs/components/Flow.md +14 -0
  105. qtype/docs/components/FlowInterface.md +7 -0
  106. qtype/docs/components/Index.md +8 -0
  107. qtype/docs/components/IndexUpsert.md +6 -0
  108. qtype/docs/components/InvokeEmbedding.md +7 -0
  109. qtype/docs/components/InvokeFlow.md +8 -0
  110. qtype/docs/components/InvokeTool.md +8 -0
  111. qtype/docs/components/LLMInference.md +9 -0
  112. qtype/docs/components/ListType.md +5 -0
  113. qtype/docs/components/Memory.md +8 -0
  114. qtype/docs/components/MessageRole.md +14 -0
  115. qtype/docs/components/Model.md +10 -0
  116. qtype/docs/components/ModelList.md +5 -0
  117. qtype/docs/components/OAuth2AuthProvider.md +9 -0
  118. qtype/docs/components/PrimitiveTypeEnum.md +20 -0
  119. qtype/docs/components/PromptTemplate.md +7 -0
  120. qtype/docs/components/PythonFunctionTool.md +7 -0
  121. qtype/docs/components/RAGChunk.md +7 -0
  122. qtype/docs/components/RAGDocument.md +10 -0
  123. qtype/docs/components/RAGSearchResult.md +8 -0
  124. qtype/docs/components/Reranker.md +5 -0
  125. qtype/docs/components/SQLSource.md +8 -0
  126. qtype/docs/components/Search.md +7 -0
  127. qtype/docs/components/SearchResult.md +7 -0
  128. qtype/docs/components/SecretManager.md +7 -0
  129. qtype/docs/components/SecretReference.md +7 -0
  130. qtype/docs/components/Source.md +5 -0
  131. qtype/docs/components/Step.md +8 -0
  132. qtype/docs/components/TelemetrySink.md +9 -0
  133. qtype/docs/components/Tool.md +9 -0
  134. qtype/docs/components/ToolList.md +5 -0
  135. qtype/docs/components/TypeList.md +5 -0
  136. qtype/docs/components/Variable.md +8 -0
  137. qtype/docs/components/VariableList.md +5 -0
  138. qtype/docs/components/VectorIndex.md +7 -0
  139. qtype/docs/components/VectorSearch.md +6 -0
  140. qtype/docs/components/VertexAuthProvider.md +9 -0
  141. qtype/docs/components/Writer.md +5 -0
  142. qtype/docs/example_ui.png +0 -0
  143. qtype/docs/index.md +81 -0
  144. qtype/docs/legacy_how_tos/.pages +6 -0
  145. qtype/docs/legacy_how_tos/Configuration/modular-yaml.md +366 -0
  146. qtype/docs/legacy_how_tos/Configuration/phoenix_projects.png +0 -0
  147. qtype/docs/legacy_how_tos/Configuration/phoenix_traces.png +0 -0
  148. qtype/docs/legacy_how_tos/Configuration/reference-by-id.md +251 -0
  149. qtype/docs/legacy_how_tos/Configuration/telemetry-setup.md +259 -0
  150. qtype/docs/legacy_how_tos/Data Types/custom-types.md +52 -0
  151. qtype/docs/legacy_how_tos/Data Types/domain-types.md +113 -0
  152. qtype/docs/legacy_how_tos/Debugging/visualize-apps.md +147 -0
  153. qtype/docs/legacy_how_tos/Tools/api-tools.md +29 -0
  154. qtype/docs/legacy_how_tos/Tools/python-tools.md +299 -0
  155. qtype/docs/skills/architect/SKILL.md +188 -0
  156. qtype/docs/skills/architect/references/cheatsheet.md +198 -0
  157. qtype/docs/skills/architect/references/patterns.md +29 -0
  158. qtype/docs/stylesheets/extra.css +27 -0
  159. qtype/dsl/custom_types.py +2 -1
  160. qtype/dsl/linker.py +23 -7
  161. qtype/dsl/loader.py +3 -3
  162. qtype/dsl/model.py +181 -67
  163. qtype/examples/authentication/aws_authentication.qtype.yaml +63 -0
  164. qtype/examples/conversational_ai/hello_world_chat.qtype.yaml +43 -0
  165. qtype/examples/conversational_ai/simple_chatbot.qtype.yaml +40 -0
  166. qtype/examples/data_processing/athena_query.qtype.yaml +56 -0
  167. qtype/examples/data_processing/batch_inputs.csv +5 -0
  168. qtype/examples/data_processing/batch_processing.qtype.yaml +54 -0
  169. qtype/examples/data_processing/cache_step_results.qtype.yaml +78 -0
  170. qtype/examples/data_processing/collect_results.qtype.yaml +55 -0
  171. qtype/examples/data_processing/create_sample_db.py +129 -0
  172. qtype/examples/data_processing/dataflow_pipelines.qtype.yaml +108 -0
  173. qtype/examples/data_processing/decode_json.qtype.yaml +23 -0
  174. qtype/examples/data_processing/explode_items.qtype.yaml +25 -0
  175. qtype/examples/data_processing/invoke_other_flows.qtype.yaml +98 -0
  176. qtype/examples/data_processing/read_file.qtype.yaml +60 -0
  177. qtype/examples/data_processing/reviews.db +0 -0
  178. qtype/examples/data_processing/sample_article.txt +1 -0
  179. qtype/examples/data_processing/sample_documents.jsonl +5 -0
  180. qtype/examples/invoke_models/create_embeddings.qtype.yaml +28 -0
  181. qtype/examples/invoke_models/simple_llm_call.qtype.yaml +32 -0
  182. qtype/examples/language_features/include_raw.qtype.yaml +27 -0
  183. qtype/examples/language_features/optional_variables.qtype.yaml +32 -0
  184. qtype/examples/language_features/story_prompt.txt +6 -0
  185. qtype/examples/language_features/ui_hints.qtype.yaml +52 -0
  186. qtype/examples/legacy/bedrock/data_analysis_with_telemetry.qtype.yaml +169 -0
  187. qtype/examples/legacy/bedrock/hello_world.qtype.yaml +39 -0
  188. qtype/examples/legacy/bedrock/hello_world_chat.qtype.yaml +37 -0
  189. qtype/examples/legacy/bedrock/hello_world_chat_with_telemetry.qtype.yaml +40 -0
  190. qtype/examples/legacy/bedrock/hello_world_chat_with_thinking.qtype.yaml +40 -0
  191. qtype/examples/legacy/bedrock/hello_world_completion.qtype.yaml +41 -0
  192. qtype/examples/legacy/bedrock/hello_world_completion_with_auth.qtype.yaml +44 -0
  193. qtype/examples/legacy/bedrock/simple_agent_chat.qtype.yaml +46 -0
  194. qtype/examples/legacy/chat_with_langfuse.qtype.yaml +50 -0
  195. qtype/examples/legacy/data/customers.csv +6 -0
  196. qtype/examples/legacy/data_processor.qtype.yaml +48 -0
  197. qtype/examples/legacy/echo/debug_example.qtype.yaml +59 -0
  198. qtype/examples/legacy/echo/prompt.qtype.yaml +22 -0
  199. qtype/examples/legacy/echo/readme.md +29 -0
  200. qtype/examples/legacy/echo/test.qtype.yaml +26 -0
  201. qtype/examples/legacy/echo/video.qtype.yaml +20 -0
  202. qtype/examples/legacy/field_extractor_example.qtype.yaml +137 -0
  203. qtype/examples/legacy/multi_flow_example.qtype.yaml +125 -0
  204. qtype/examples/legacy/openai/hello_world_chat.qtype.yaml +43 -0
  205. qtype/examples/legacy/openai/hello_world_chat_with_telemetry.qtype.yaml +46 -0
  206. qtype/examples/legacy/qtype_plugin_example.py +51 -0
  207. qtype/examples/legacy/rag.qtype.yaml +207 -0
  208. qtype/examples/legacy/sample_data.txt +43 -0
  209. qtype/examples/legacy/time_utilities.qtype.yaml +64 -0
  210. qtype/examples/legacy/vertex/README.md +11 -0
  211. qtype/examples/legacy/vertex/hello_world_chat.qtype.yaml +36 -0
  212. qtype/examples/legacy/vertex/hello_world_completion.qtype.yaml +40 -0
  213. qtype/examples/legacy/vertex/hello_world_completion_with_auth.qtype.yaml +45 -0
  214. qtype/examples/observability_debugging/trace_with_opentelemetry.qtype.yaml +40 -0
  215. qtype/examples/research_assistant/research_assistant.qtype.yaml +94 -0
  216. qtype/examples/research_assistant/tavily.oas.yaml +722 -0
  217. qtype/examples/research_assistant/tavily.qtype.yaml +216 -0
  218. qtype/examples/tutorials/01_hello_world.qtype.yaml +48 -0
  219. qtype/examples/tutorials/02_conversational_chat.qtype.yaml +37 -0
  220. qtype/examples/tutorials/03_structured_data.qtype.yaml +130 -0
  221. qtype/examples/tutorials/04_tools_and_function_calling.qtype.yaml +89 -0
  222. qtype/interpreter/api.py +4 -1
  223. qtype/interpreter/base/base_step_executor.py +3 -1
  224. qtype/interpreter/base/stream_emitter.py +19 -13
  225. qtype/interpreter/conversions.py +7 -3
  226. qtype/interpreter/converters.py +142 -26
  227. qtype/interpreter/executors/agent_executor.py +2 -3
  228. qtype/interpreter/executors/aggregate_executor.py +3 -4
  229. qtype/interpreter/executors/construct_executor.py +15 -15
  230. qtype/interpreter/executors/doc_to_text_executor.py +1 -3
  231. qtype/interpreter/executors/field_extractor_executor.py +13 -12
  232. qtype/interpreter/executors/file_source_executor.py +21 -34
  233. qtype/interpreter/executors/file_writer_executor.py +4 -4
  234. qtype/interpreter/executors/index_upsert_executor.py +1 -1
  235. qtype/interpreter/executors/invoke_embedding_executor.py +1 -4
  236. qtype/interpreter/executors/invoke_flow_executor.py +2 -2
  237. qtype/interpreter/executors/invoke_tool_executor.py +19 -18
  238. qtype/interpreter/executors/llm_inference_executor.py +16 -18
  239. qtype/interpreter/executors/prompt_template_executor.py +1 -3
  240. qtype/interpreter/executors/sql_source_executor.py +1 -1
  241. qtype/interpreter/resource_cache.py +3 -1
  242. qtype/interpreter/rich_progress.py +6 -3
  243. qtype/interpreter/stream/chat/converter.py +25 -17
  244. qtype/interpreter/stream/chat/ui_request_to_domain_type.py +2 -2
  245. qtype/interpreter/tools/function_tool_helper.py +11 -10
  246. qtype/interpreter/types.py +89 -4
  247. qtype/interpreter/typing.py +35 -38
  248. qtype/mcp/__init__.py +0 -0
  249. qtype/mcp/server.py +722 -0
  250. qtype/schema/qtype.schema.json +4016 -0
  251. qtype/semantic/checker.py +20 -1
  252. qtype/semantic/generate.py +6 -9
  253. qtype/semantic/model.py +26 -33
  254. qtype/semantic/resolver.py +7 -0
  255. qtype/semantic/visualize.py +45 -53
  256. {qtype-0.1.11.dist-info → qtype-0.1.13.dist-info}/METADATA +65 -44
  257. qtype-0.1.13.dist-info/RECORD +352 -0
  258. {qtype-0.1.11.dist-info → qtype-0.1.13.dist-info}/WHEEL +1 -2
  259. qtype/application/facade.py +0 -177
  260. qtype-0.1.11.dist-info/RECORD +0 -142
  261. qtype-0.1.11.dist-info/top_level.txt +0 -1
  262. {qtype-0.1.11.dist-info → qtype-0.1.13.dist-info}/entry_points.txt +0 -0
  263. {qtype-0.1.11.dist-info → qtype-0.1.13.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,28 @@
1
+ id: create_embeddings
2
+ description: Generate embeddings from text using AWS Bedrock Titan
3
+
4
+ models:
5
+ - type: EmbeddingModel
6
+ id: titan_embed
7
+ provider: aws-bedrock
8
+ model_id: amazon.titan-embed-text-v2:0
9
+ dimensions: 1024
10
+
11
+ flows:
12
+ - type: Flow
13
+ id: main
14
+ variables:
15
+ - id: text
16
+ type: text
17
+ - id: embedding
18
+ type: Embedding
19
+ inputs:
20
+ - text
21
+ outputs:
22
+ - embedding
23
+ steps:
24
+ - type: InvokeEmbedding
25
+ id: embed_text
26
+ model: titan_embed
27
+ inputs: [text]
28
+ outputs: [embedding]
@@ -0,0 +1,32 @@
1
+ id: simple_llm_call
2
+ description: Simple example of calling a large language model
3
+
4
+ models:
5
+ - type: Model
6
+ id: nova_lite
7
+ provider: aws-bedrock
8
+ model_id: amazon.nova-lite-v1:0
9
+ inference_params:
10
+ temperature: 0.7
11
+ max_tokens: 500
12
+
13
+ flows:
14
+ - type: Flow
15
+ id: main
16
+ variables:
17
+ - id: text
18
+ type: text
19
+ - id: response
20
+ type: text
21
+ inputs:
22
+ - text
23
+ outputs:
24
+ - response
25
+
26
+ steps:
27
+ - type: LLMInference
28
+ id: assistant
29
+ model: nova_lite
30
+ system_message: "You are a helpful assistant"
31
+ inputs: [text]
32
+ outputs: [response]
@@ -0,0 +1,27 @@
1
+ id: include_raw_example
2
+ description: Demonstrates using include_raw to load prompt templates from external files
3
+
4
+ flows:
5
+ - type: Flow
6
+ id: main
7
+ variables:
8
+ - id: theme
9
+ type: text
10
+ - id: tone
11
+ type: text
12
+ - id: story_prompt
13
+ type: text
14
+ inputs:
15
+ - theme
16
+ - tone
17
+ outputs:
18
+ - story_prompt
19
+ steps:
20
+ - id: generate_story
21
+ type: PromptTemplate
22
+ template: !include_raw story_prompt.txt
23
+ inputs:
24
+ - theme
25
+ - tone
26
+ outputs:
27
+ - story_prompt
@@ -0,0 +1,32 @@
1
+ id: optional_variables_demo
2
+ description: Demonstrates optional variables that can handle missing data gracefully
3
+
4
+ flows:
5
+ - id: extract_optional_field
6
+ variables:
7
+ - id: user_profile
8
+ type: text
9
+ - id: email
10
+ type: text?
11
+
12
+ inputs:
13
+ - user_profile
14
+ outputs:
15
+ - email
16
+
17
+ steps:
18
+ # Try to extract email - may not exist, will return None if missing
19
+ - type: FieldExtractor
20
+ id: extract_email
21
+ inputs:
22
+ - user_profile
23
+ outputs:
24
+ - email
25
+ json_path: $.email
26
+
27
+ - type: Echo
28
+ id: show_result
29
+ inputs:
30
+ - email
31
+ outputs:
32
+ - email
@@ -0,0 +1,6 @@
1
+ You are a creative storyteller. Write a short, engaging story based on the following theme:
2
+
3
+ Theme: {theme}
4
+ Tone: {tone}
5
+
6
+ Create a story that is 3-4 paragraphs long. Make it captivating and appropriate for the specified tone.
@@ -0,0 +1,52 @@
1
+ id: ui_hints_example
2
+ description: Demonstrates how to use UI hints to customize input widgets
3
+
4
+ models:
5
+ - type: Model
6
+ id: nova
7
+ provider: aws-bedrock
8
+ model_id: amazon.nova-lite-v1:0
9
+ inference_params:
10
+ temperature: 0.7
11
+ max_tokens: 500
12
+
13
+ flows:
14
+ - type: Flow
15
+ id: generate_story
16
+ description: Generate a creative story based on a detailed prompt
17
+
18
+ variables:
19
+ # The 'ui' field provides hints to the web UI about how to render inputs
20
+ # Using 'widget: textarea' renders a multi-line text area instead of single-line input
21
+ - id: story_prompt
22
+ type: text
23
+ ui:
24
+ widget: textarea # Options: text (default), textarea
25
+
26
+ # Variables without 'ui' hints use default widgets based on their type
27
+ - id: max_length
28
+ type: int
29
+
30
+ - id: story
31
+ type: text
32
+
33
+ inputs:
34
+ - story_prompt
35
+ - max_length
36
+
37
+ outputs:
38
+ - story
39
+
40
+ steps:
41
+ - id: generate
42
+ type: LLMInference
43
+ model: nova
44
+ inputs: [story_prompt, max_length]
45
+ system_message: |
46
+ Write a creative story based on this prompt:
47
+
48
+ {{story_prompt}}
49
+
50
+ Keep the story under {{max_length}} words.
51
+ outputs:
52
+ - story
@@ -0,0 +1,169 @@
1
+ id: data_analysis_pipeline
2
+ description: A multi-step data analysis pipeline with AWS Bedrock and telemetry tracking
3
+
4
+ models:
5
+ - type: Model
6
+ id: nova_lite
7
+ provider: aws-bedrock
8
+ model_id: amazon.nova-lite-v1:0
9
+ inference_params:
10
+ temperature: 0.7
11
+ max_tokens: 1024
12
+
13
+ flows:
14
+ - type: Flow
15
+ id: analyze_data_flow
16
+ description: Load sales data, analyze it with LLM, generate insights
17
+ variables:
18
+ - id: raw_data
19
+ type: text
20
+ - id: analysis_prompt
21
+ type: text
22
+ - id: analysis_result
23
+ type: text
24
+ - id: insights_prompt
25
+ type: text
26
+ - id: key_insights
27
+ type: text
28
+ - id: summary_prompt
29
+ type: text
30
+ - id: executive_summary
31
+ type: text
32
+ - id: final_report
33
+ type: text
34
+ - id: output_file
35
+ type: text
36
+ inputs:
37
+ - output_file
38
+ outputs:
39
+ - executive_summary
40
+ - final_report
41
+ steps:
42
+ # Step 1: Load sales data from file
43
+ - id: load_sales_data
44
+ type: PromptTemplate
45
+ template: !include_raw sample_data.txt
46
+ outputs:
47
+ - raw_data
48
+
49
+ # Step 2: Create analysis prompt
50
+ - id: create_analysis_prompt
51
+ type: PromptTemplate
52
+ template: |
53
+ You are a data analyst. Analyze the following sales data and provide:
54
+ 1. A summary of what the data contains
55
+ 2. Key patterns or trends you observe
56
+ 3. Any notable observations or anomalies
57
+
58
+ Sales Data:
59
+ {raw_data}
60
+
61
+ Provide your analysis in a clear, structured format.
62
+ inputs:
63
+ - raw_data
64
+ outputs:
65
+ - analysis_prompt
66
+
67
+ # Step 3: Generate initial analysis
68
+ - id: analyze_with_llm
69
+ type: LLMInference
70
+ model: nova_lite
71
+ system_message: You are an expert data analyst with strong analytical and critical thinking skills.
72
+ inputs:
73
+ - analysis_prompt
74
+ outputs:
75
+ - analysis_result
76
+
77
+ # Step 4: Create insights extraction prompt
78
+ - id: create_insights_prompt
79
+ type: PromptTemplate
80
+ template: |
81
+ Based on this analysis, extract the 3-5 most important insights or takeaways:
82
+
83
+ {analysis_result}
84
+
85
+ Format as a bullet list with clear, actionable insights.
86
+ inputs:
87
+ - analysis_result
88
+ outputs:
89
+ - insights_prompt
90
+
91
+ # Step 5: Extract key insights
92
+ - id: extract_insights
93
+ type: LLMInference
94
+ model: nova_lite
95
+ system_message: You are an expert at distilling complex analysis into clear, actionable insights.
96
+ inputs:
97
+ - insights_prompt
98
+ outputs:
99
+ - key_insights
100
+
101
+ # Step 6: Create executive summary prompt
102
+ - id: create_summary_prompt
103
+ type: PromptTemplate
104
+ template: |
105
+ Create a concise executive summary (2-3 paragraphs) that combines:
106
+
107
+ Original Analysis:
108
+ {analysis_result}
109
+
110
+ Key Insights:
111
+ {key_insights}
112
+
113
+ Make it suitable for C-level executives - clear, impactful, and action-oriented.
114
+ inputs:
115
+ - analysis_result
116
+ - key_insights
117
+ outputs:
118
+ - summary_prompt
119
+
120
+ # Step 7: Generate executive summary
121
+ - id: generate_summary
122
+ type: LLMInference
123
+ model: nova_lite
124
+ system_message: You are an expert at writing executive summaries for business leaders.
125
+ inputs:
126
+ - summary_prompt
127
+ outputs:
128
+ - executive_summary
129
+
130
+ # Step 8: Create final report
131
+ - id: create_final_report
132
+ type: PromptTemplate
133
+ template: |
134
+ ================================================================================
135
+ DATA ANALYSIS REPORT
136
+ ================================================================================
137
+
138
+ EXECUTIVE SUMMARY
139
+ -----------------
140
+ {executive_summary}
141
+
142
+ KEY INSIGHTS
143
+ ------------
144
+ {key_insights}
145
+
146
+ DETAILED ANALYSIS
147
+ -----------------
148
+ {analysis_result}
149
+
150
+ ================================================================================
151
+ Report generated by QType Data Analysis Pipeline
152
+ ================================================================================
153
+ inputs:
154
+ - executive_summary
155
+ - key_insights
156
+ - analysis_result
157
+ outputs:
158
+ - final_report
159
+
160
+ # Step 9: Write results to file
161
+ - id: save_report
162
+ type: FileWriter
163
+ path: output_file
164
+ inputs:
165
+ - final_report
166
+
167
+ telemetry:
168
+ id: data_analysis_telemetry
169
+ endpoint: http://localhost:6006/v1/traces
@@ -0,0 +1,39 @@
1
+ id: hello_world
2
+ description: A simple hello world application using AWS Bedrock
3
+ models:
4
+ - type: Model
5
+ id: nova_lite
6
+ provider: aws-bedrock
7
+ model_id: amazon.nova-lite-v1:0
8
+ inference_params:
9
+ temperature: 0.7
10
+ max_tokens: 512
11
+ flows:
12
+ - type: Flow
13
+ id: simple_example
14
+ variables:
15
+ - id: question
16
+ type: text
17
+ - id: formatted_prompt
18
+ type: text
19
+ - id: answer
20
+ type: text
21
+ inputs:
22
+ - question
23
+ outputs:
24
+ - answer
25
+ steps:
26
+ - id: question_prompt
27
+ type: PromptTemplate
28
+ template: "You are a helpful assistant. Answer the following question:\n{question}\n"
29
+ inputs:
30
+ - question
31
+ outputs:
32
+ - formatted_prompt
33
+ - id: llm_inference_step
34
+ type: LLMInference
35
+ model: nova_lite
36
+ inputs:
37
+ - formatted_prompt
38
+ outputs:
39
+ - answer
@@ -0,0 +1,37 @@
1
+ id: hello_world
2
+ description: A simple stateful chat flow with AWS Bedrock
3
+ models:
4
+ - type: Model
5
+ id: nova_lite
6
+ provider: aws-bedrock
7
+ model_id: amazon.nova-lite-v1:0
8
+ inference_params:
9
+ temperature: 0.7
10
+ max_tokens: 512
11
+ memories:
12
+ - id: chat_memory
13
+ token_limit: 10000
14
+ flows:
15
+ - type: Flow
16
+ id: simple_chat_example
17
+ interface:
18
+ type: Conversational
19
+ variables:
20
+ - id: user_message
21
+ type: ChatMessage
22
+ - id: response_message
23
+ type: ChatMessage
24
+ inputs:
25
+ - user_message
26
+ outputs:
27
+ - response_message
28
+ steps:
29
+ - id: llm_inference_step
30
+ type: LLMInference
31
+ model: nova_lite
32
+ system_message: "You are a helpful assistant."
33
+ memory: chat_memory
34
+ inputs:
35
+ - user_message
36
+ outputs:
37
+ - response_message
@@ -0,0 +1,40 @@
1
+ id: hello_world
2
+ description: A simple chat flow with AWS Bedrock and telemetry
3
+ models:
4
+ - type: Model
5
+ id: nova_lite
6
+ provider: aws-bedrock
7
+ model_id: amazon.nova-lite-v1:0
8
+ inference_params:
9
+ temperature: 0.7
10
+ max_tokens: 512
11
+ memories:
12
+ - id: chat_memory
13
+ token_limit: 10000
14
+ flows:
15
+ - type: Flow
16
+ id: simple_chat_example
17
+ interface:
18
+ type: Conversational
19
+ variables:
20
+ - id: user_message
21
+ type: ChatMessage
22
+ - id: response_message
23
+ type: ChatMessage
24
+ inputs:
25
+ - user_message
26
+ outputs:
27
+ - response_message
28
+ steps:
29
+ - id: llm_inference_step
30
+ type: LLMInference
31
+ model: nova_lite
32
+ system_message: 'You are a helpful assistant, but you provide opposite or incorrect answers to any question. For example, if the user asks "What is 2 + 2?", you should respond with "3".'
33
+ memory: chat_memory
34
+ inputs:
35
+ - user_message
36
+ outputs:
37
+ - response_message
38
+ telemetry:
39
+ id: hello_world_telemetry
40
+ endpoint: http://localhost:6006/v1/traces
@@ -0,0 +1,40 @@
1
+ id: hello_world
2
+ description: A simple stateful chat flow with AWS Bedrock
3
+ models:
4
+ - type: Model
5
+ id: claude-haiku
6
+ provider: aws-bedrock
7
+ model_id: us.anthropic.claude-haiku-4-5-20251001-v1:0
8
+ inference_params:
9
+ temperature: 1
10
+ max_tokens: 2048
11
+ thinking:
12
+ type: enabled
13
+ budget_tokens: 1024
14
+ memories:
15
+ - id: chat_memory
16
+ token_limit: 10000
17
+ flows:
18
+ - type: Flow
19
+ id: simple_chat_example
20
+ interface:
21
+ type: Conversational
22
+ variables:
23
+ - id: user_message
24
+ type: ChatMessage
25
+ - id: response_message
26
+ type: ChatMessage
27
+ inputs:
28
+ - user_message
29
+ outputs:
30
+ - response_message
31
+ steps:
32
+ - id: llm_inference_step
33
+ type: LLMInference
34
+ model: claude-haiku
35
+ system_message: "You are a helpful assistant."
36
+ memory: chat_memory
37
+ inputs:
38
+ - user_message
39
+ outputs:
40
+ - response_message
@@ -0,0 +1,41 @@
1
+ id: hello_world
2
+ description: A simple hello world application using AWS Bedrock with AWS authentication
3
+ models:
4
+ - type: Model
5
+ id: nova_lite
6
+ provider: aws-bedrock
7
+ model_id: amazon.nova-lite-v1:0
8
+ inference_params:
9
+ temperature: 0.7
10
+ max_tokens: 512
11
+ flows:
12
+ - type: Flow
13
+ id: simple_example
14
+ interface:
15
+ type: Complete
16
+ variables:
17
+ - id: prompt
18
+ type: text
19
+ - id: formatted_prompt
20
+ type: text
21
+ - id: answer
22
+ type: text
23
+ inputs:
24
+ - prompt
25
+ outputs:
26
+ - answer
27
+ steps:
28
+ - id: question_prompt
29
+ type: PromptTemplate
30
+ template: "You are a helpful assistant. Answer the following question:\n{prompt}\n"
31
+ inputs:
32
+ - prompt
33
+ outputs:
34
+ - formatted_prompt
35
+ - id: llm_inference_step
36
+ type: LLMInference
37
+ model: nova_lite
38
+ inputs:
39
+ - formatted_prompt
40
+ outputs:
41
+ - answer
@@ -0,0 +1,44 @@
1
+ id: hello_world
2
+ description: A simple hello world application using AWS Bedrock with AWS authentication
3
+ models:
4
+ - type: Model
5
+ id: nova_lite
6
+ provider: aws-bedrock
7
+ model_id: amazon.nova-lite-v1:0
8
+ inference_params:
9
+ temperature: 0.7
10
+ max_tokens: 512
11
+ auth: aws_auth
12
+ auths:
13
+ - type: aws
14
+ id: aws_auth
15
+ profile_name: default # Replace with relevant profile configured in .aws/config
16
+ flows:
17
+ - type: Flow
18
+ id: simple_example
19
+ variables:
20
+ - id: question
21
+ type: text
22
+ - id: prompt
23
+ type: text
24
+ - id: answer
25
+ type: text
26
+ inputs:
27
+ - question
28
+ outputs:
29
+ - answer
30
+ steps:
31
+ - id: question_prompt
32
+ type: PromptTemplate
33
+ template: "You are a helpful assistant. Answer the following question:\n{question}\n"
34
+ inputs:
35
+ - question
36
+ outputs:
37
+ - prompt
38
+ - id: llm_inference_step
39
+ type: LLMInference
40
+ model: nova_lite
41
+ inputs:
42
+ - prompt
43
+ outputs:
44
+ - answer
@@ -0,0 +1,46 @@
1
+ id: simple_agent
2
+ description: A simple agent chatbot with time and date tools
3
+ models:
4
+ - type: Model
5
+ id: nova_lite
6
+ provider: aws-bedrock
7
+ model_id: amazon.nova-lite-v1:0
8
+ inference_params:
9
+ temperature: 0.7
10
+ max_tokens: 512
11
+ references:
12
+ - !include ../../common/tools.qtype.yaml
13
+ memories:
14
+ - id: chat_memory
15
+ token_limit: 10000
16
+ flows:
17
+ - type: Flow
18
+ id: agent_chat
19
+ interface:
20
+ type: Conversational
21
+ variables:
22
+ - id: user_message
23
+ type: ChatMessage
24
+ - id: response
25
+ type: ChatMessage
26
+ inputs:
27
+ - user_message
28
+ outputs:
29
+ - response
30
+ steps:
31
+ - id: agent_step
32
+ type: Agent
33
+ model: nova_lite
34
+ system_message: "You are a helpful assistant with access to time and date tools. Use them when users ask about time-related information."
35
+ memory: chat_memory
36
+ tools:
37
+ - qtype.application.commons.tools.get_current_timestamp
38
+ - qtype.application.commons.tools.format_datetime
39
+ - qtype.application.commons.tools.timedelta
40
+ inputs:
41
+ - user_message
42
+ outputs:
43
+ - response
44
+ telemetry:
45
+ id: simple_agent_telemetry
46
+ endpoint: http://localhost:6006/v1/traces
@@ -0,0 +1,50 @@
1
+ id: hello_world_langfuse
2
+ description: A simple chat flow with Langfuse telemetry
3
+ models:
4
+ - type: Model
5
+ id: gpt4
6
+ provider: openai
7
+ model_id: gpt-4
8
+ inference_params:
9
+ temperature: 0.7
10
+ max_tokens: 512
11
+ auth: openai_auth
12
+ auths:
13
+ - type: api_key
14
+ id: openai_auth
15
+ api_key: ${OPENAI_KEY}
16
+ memories:
17
+ - id: chat_memory
18
+ token_limit: 10000
19
+ flows:
20
+ - type: Flow
21
+ id: chat_example
22
+ description: A simple chat flow with telemetry sent to Langfuse
23
+ interface:
24
+ type: Conversational
25
+ variables:
26
+ - id: user_message
27
+ type: ChatMessage
28
+ - id: response
29
+ type: ChatMessage
30
+ inputs:
31
+ - user_message
32
+ outputs:
33
+ - response
34
+ steps:
35
+ - type: LLMInference
36
+ id: llm_inference_step
37
+ model: gpt4
38
+ memory: chat_memory
39
+ system_message: "You are a helpful assistant."
40
+ inputs:
41
+ - user_message
42
+ outputs:
43
+ - response
44
+ telemetry:
45
+ id: langfuse_telemetry
46
+ provider: Langfuse
47
+ endpoint: https://cloud.langfuse.com
48
+ args:
49
+ public_key: ${LANGFUSE_PUBLIC_KEY}
50
+ secret_key: ${LANGFUSE_SECRET_KEY}
@@ -0,0 +1,6 @@
1
+ name,region,purchases
2
+ Alice,West,5
3
+ Bob,East,3
4
+ Charlie,West,7
5
+ Diana,North,2
6
+ Eve,East,4