qtype 0.1.12__py3-none-any.whl → 0.1.14__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.
- qtype/` +0 -0
- qtype/application/__init__.py +0 -2
- qtype/application/converters/tools_from_api.py +28 -22
- qtype/application/converters/tools_from_module.py +66 -32
- qtype/base/__init__.py +8 -2
- qtype/base/logging.py +0 -17
- qtype/base/resources.py +193 -0
- qtype/cli.py +5 -9
- qtype/commands/generate.py +95 -7
- qtype/commands/run.py +153 -54
- qtype/docs/.pages +8 -0
- {docs → qtype/docs}/Concepts/mental-model-and-philosophy.md +1 -1
- qtype/docs/Contributing/.pages +4 -0
- {docs → qtype/docs}/Contributing/index.md +8 -1
- {docs → qtype/docs}/Gallery/dataflow_pipelines.md +18 -4
- qtype/docs/Gallery/recipe_chatbot.md +103 -0
- qtype/docs/Gallery/recipe_chatbot.mermaid +62 -0
- qtype/docs/Gallery/recipe_chatbot.png +0 -0
- {docs → qtype/docs}/Gallery/research_assistant.md +4 -5
- {docs → qtype/docs}/Gallery/simple_chatbot.md +3 -1
- {docs → qtype/docs}/How To/Authentication/configure_aws_authentication.md +2 -2
- {docs → qtype/docs}/How To/Authentication/use_api_key_authentication.md +2 -2
- {docs → qtype/docs}/How To/Command Line Usage/load_multiple_inputs_from_files.md +24 -9
- {docs → qtype/docs}/How To/Command Line Usage/pass_inputs_on_the_cli.md +7 -4
- {docs → qtype/docs}/How To/Command Line Usage/serve_with_auto_reload.md +3 -2
- {docs → qtype/docs}/How To/Data Processing/adjust_concurrency.md +3 -4
- {docs → qtype/docs}/How To/Data Processing/cache_step_results.md +2 -2
- {docs → qtype/docs}/How To/Data Processing/decode_json_xml.md +1 -1
- {docs → qtype/docs}/How To/Data Processing/explode_collections.md +2 -2
- {docs → qtype/docs}/How To/Data Processing/gather_results.md +4 -4
- qtype/docs/How To/Data Processing/invoke_other_flows.md +71 -0
- qtype/docs/How To/Data Processing/load_data_from_athena.md +49 -0
- qtype/docs/How To/Data Processing/load_documents.md +74 -0
- qtype/docs/How To/Data Processing/read_data_from_files.md +61 -0
- {docs → qtype/docs}/How To/Data Processing/read_sql_databases.md +4 -3
- {docs → qtype/docs}/How To/Data Processing/write_data_to_file.md +1 -2
- {docs → qtype/docs}/How To/Invoke Models/call_large_language_models.md +1 -1
- {docs → qtype/docs}/How To/Invoke Models/create_embeddings.md +1 -1
- {docs → qtype/docs}/How To/Invoke Models/reuse_prompts_with_templates.md +2 -3
- {docs → qtype/docs}/How To/Language Features/include_raw_text_from_other_files.md +2 -1
- {docs → qtype/docs}/How To/Language Features/reference_entities_by_id.md +2 -2
- qtype/docs/How To/Language Features/use_agent_skills.md +29 -0
- {docs → qtype/docs}/How To/Language Features/use_environment_variables.md +2 -1
- qtype/docs/How To/Language Features/use_optional_variables.md +42 -0
- {docs → qtype/docs}/How To/Language Features/use_qtype_mcp.md +4 -4
- {docs → qtype/docs}/How To/Observability & Debugging/trace_calls_with_open_telemetry.md +1 -1
- {docs → qtype/docs}/How To/Observability & Debugging/validate_qtype_yaml.md +3 -2
- {docs → qtype/docs}/How To/Observability & Debugging/visualize_application_architecture.md +1 -1
- {docs → qtype/docs}/How To/Qtype Server/serve_flows_as_apis.md +3 -3
- {docs → qtype/docs}/How To/Qtype Server/serve_flows_as_ui.md +2 -3
- {docs → qtype/docs}/How To/Qtype Server/use_conversational_interfaces.md +1 -4
- {docs → qtype/docs}/How To/Qtype Server/use_variables_with_ui_hints.md +3 -2
- {docs → qtype/docs}/How To/Tools & Integration/bind_tool_inputs_and_outputs.md +1 -2
- {docs → qtype/docs}/How To/Tools & Integration/create_tools_from_openapi_specifications.md +10 -14
- {docs → qtype/docs}/How To/Tools & Integration/create_tools_from_python_modules.md +5 -8
- {docs → qtype/docs}/Reference/cli.md +16 -17
- qtype/docs/Tutorials/.pages +1 -0
- {docs → qtype/docs}/Tutorials/01-first-qtype-application.md +4 -3
- {docs → qtype/docs}/Tutorials/02-conversational-chatbot.md +3 -3
- {docs → qtype/docs}/Tutorials/03-structured-data.md +10 -11
- {docs → qtype/docs}/Tutorials/04-tools-and-function-calling.md +13 -20
- {docs → qtype/docs}/components/APITool.md +1 -1
- qtype/docs/components/Aggregate.md +7 -0
- qtype/docs/components/Collect.md +6 -0
- qtype/docs/components/Construct.md +6 -0
- {docs → qtype/docs}/components/DocumentEmbedder.md +0 -1
- {docs → qtype/docs}/components/DocumentSplitter.md +0 -1
- qtype/docs/components/Explode.md +5 -0
- {docs → qtype/docs}/components/FieldExtractor.md +2 -1
- qtype/docs/components/InvokeFlow.md +8 -0
- qtype/docs/components/InvokeTool.md +8 -0
- {docs → qtype/docs}/components/PrimitiveTypeEnum.md +0 -1
- {docs → qtype/docs}/components/Source.md +0 -1
- {docs → qtype/docs}/components/Step.md +0 -1
- {docs → qtype/docs}/components/Tool.md +2 -2
- {docs → qtype/docs}/components/Variable.md +2 -0
- qtype/docs/legacy_how_tos/.pages +6 -0
- qtype/docs/skills/architect/SKILL.md +188 -0
- qtype/docs/skills/architect/references/cheatsheet.md +198 -0
- qtype/docs/skills/architect/references/patterns.md +29 -0
- qtype/docs/stylesheets/extra.css +27 -0
- qtype/dsl/linker.py +8 -0
- qtype/dsl/model.py +177 -84
- qtype/examples/conversational_ai/simple_chatbot_with_auth.qtype.yaml +48 -0
- qtype/examples/data_processing/athena_query.qtype.yaml +56 -0
- qtype/examples/data_processing/batch_inputs.csv +5 -0
- qtype/examples/data_processing/create_sample_db.py +129 -0
- qtype/examples/data_processing/invoke_other_flows.qtype.yaml +98 -0
- qtype/examples/data_processing/load_documents.qtype.yaml +31 -0
- qtype/examples/data_processing/reviews.db +0 -0
- qtype/examples/data_processing/sample_article.txt +1 -0
- qtype/examples/data_processing/sample_documents.jsonl +5 -0
- qtype/examples/invoke_models/invoke_embedding_aws.qtype.yaml +45 -0
- qtype/examples/language_features/optional_variables.qtype.yaml +32 -0
- qtype/examples/language_features/story_prompt.txt +6 -0
- qtype/examples/legacy/data/customers.csv +6 -0
- qtype/examples/legacy/echo/readme.md +29 -0
- qtype/examples/legacy/qtype_plugin_example.py +51 -0
- qtype/examples/legacy/sample_data.txt +43 -0
- qtype/examples/legacy/vertex/README.md +11 -0
- qtype/examples/rag/recipe_chatbot.qtype.yaml +216 -0
- qtype/examples/research_assistant/tavily.qtype.yaml +216 -0
- {examples → qtype/examples}/tutorials/03_structured_data.qtype.yaml +2 -2
- {examples → qtype/examples}/tutorials/04_tools_and_function_calling.qtype.yaml +5 -5
- qtype/interpreter/auth/aws.py +94 -17
- qtype/interpreter/auth/generic.py +11 -12
- qtype/interpreter/base/secrets.py +4 -2
- qtype/interpreter/base/stream_emitter.py +19 -13
- qtype/interpreter/conversions.py +15 -14
- qtype/interpreter/converters.py +142 -26
- qtype/interpreter/executors/agent_executor.py +2 -3
- qtype/interpreter/executors/aggregate_executor.py +3 -4
- qtype/interpreter/executors/bedrock_reranker_executor.py +17 -28
- qtype/interpreter/executors/construct_executor.py +15 -15
- qtype/interpreter/executors/doc_to_text_executor.py +1 -3
- qtype/interpreter/executors/document_embedder_executor.py +1 -12
- qtype/interpreter/executors/field_extractor_executor.py +13 -12
- qtype/interpreter/executors/file_source_executor.py +18 -31
- qtype/interpreter/executors/invoke_embedding_executor.py +24 -37
- qtype/interpreter/executors/invoke_flow_executor.py +2 -2
- qtype/interpreter/executors/invoke_tool_executor.py +19 -18
- qtype/interpreter/executors/llm_inference_executor.py +18 -18
- qtype/interpreter/executors/prompt_template_executor.py +1 -3
- qtype/interpreter/executors/sql_source_executor.py +6 -2
- qtype/interpreter/flow.py +11 -1
- qtype/interpreter/tools/function_tool_helper.py +11 -10
- qtype/interpreter/types.py +89 -4
- qtype/interpreter/typing.py +31 -32
- qtype/mcp/server.py +194 -86
- {schema → qtype/schema}/qtype.schema.json +77 -79
- qtype/semantic/checker.py +19 -0
- qtype/semantic/generate.py +3 -6
- qtype/semantic/model.py +26 -33
- qtype/semantic/resolver.py +7 -0
- qtype/semantic/visualize.py +18 -6
- {qtype-0.1.12.dist-info → qtype-0.1.14.dist-info}/METADATA +47 -46
- qtype-0.1.14.dist-info/RECORD +361 -0
- {qtype-0.1.12.dist-info → qtype-0.1.14.dist-info}/WHEEL +1 -2
- docs/How To/Data Processing/read_data_from_files.md +0 -35
- docs/components/Aggregate.md +0 -8
- docs/components/InvokeFlow.md +0 -8
- docs/components/InvokeTool.md +0 -8
- docs/components/ToolParameter.md +0 -6
- examples/research_assistant/tavily.qtype.yaml +0 -289
- qtype/application/facade.py +0 -177
- qtype-0.1.12.dist-info/RECORD +0 -325
- qtype-0.1.12.dist-info/top_level.txt +0 -1
- {docs → qtype/docs}/Contributing/roadmap.md +0 -0
- {docs → qtype/docs}/Decisions/ADR-001-Chat-vs-Completion-Endpoint-Features.md +0 -0
- {docs → qtype/docs}/Gallery/dataflow_pipelines.mermaid +0 -0
- {docs → qtype/docs}/Gallery/research_assistant.mermaid +0 -0
- {docs → qtype/docs}/Gallery/simple_chatbot.mermaid +0 -0
- {docs → qtype/docs}/How To/Language Features/include_qtype_yaml.md +0 -0
- {docs → qtype/docs}/How To/Observability & Debugging/visualize_example.mermaid +0 -0
- {docs → qtype/docs}/How To/Qtype Server/flow_as_ui.png +0 -0
- {docs → qtype/docs}/Reference/plugins.md +0 -0
- {docs → qtype/docs}/Reference/semantic-validation-rules.md +0 -0
- {docs → qtype/docs}/Tutorials/example_chat.png +0 -0
- {docs → qtype/docs}/Tutorials/index.md +0 -0
- {docs → qtype/docs}/components/APIKeyAuthProvider.md +0 -0
- {docs → qtype/docs}/components/AWSAuthProvider.md +0 -0
- {docs → qtype/docs}/components/AWSSecretManager.md +0 -0
- {docs → qtype/docs}/components/Agent.md +0 -0
- {docs → qtype/docs}/components/AggregateStats.md +0 -0
- {docs → qtype/docs}/components/Application.md +0 -0
- {docs → qtype/docs}/components/AuthorizationProvider.md +0 -0
- {docs → qtype/docs}/components/AuthorizationProviderList.md +0 -0
- {docs → qtype/docs}/components/BearerTokenAuthProvider.md +0 -0
- {docs → qtype/docs}/components/BedrockReranker.md +0 -0
- {docs → qtype/docs}/components/ChatContent.md +0 -0
- {docs → qtype/docs}/components/ChatMessage.md +0 -0
- {docs → qtype/docs}/components/ConstantPath.md +0 -0
- {docs → qtype/docs}/components/CustomType.md +0 -0
- {docs → qtype/docs}/components/Decoder.md +0 -0
- {docs → qtype/docs}/components/DecoderFormat.md +0 -0
- {docs → qtype/docs}/components/DocToTextConverter.md +0 -0
- {docs → qtype/docs}/components/Document.md +0 -0
- {docs → qtype/docs}/components/DocumentIndex.md +0 -0
- {docs → qtype/docs}/components/DocumentSearch.md +0 -0
- {docs → qtype/docs}/components/DocumentSource.md +0 -0
- {docs → qtype/docs}/components/Echo.md +0 -0
- {docs → qtype/docs}/components/Embedding.md +0 -0
- {docs → qtype/docs}/components/EmbeddingModel.md +0 -0
- {docs → qtype/docs}/components/FileSource.md +0 -0
- {docs → qtype/docs}/components/FileWriter.md +0 -0
- {docs → qtype/docs}/components/Flow.md +0 -0
- {docs → qtype/docs}/components/FlowInterface.md +0 -0
- {docs → qtype/docs}/components/Index.md +0 -0
- {docs → qtype/docs}/components/IndexUpsert.md +0 -0
- {docs → qtype/docs}/components/InvokeEmbedding.md +0 -0
- {docs → qtype/docs}/components/LLMInference.md +0 -0
- {docs → qtype/docs}/components/ListType.md +0 -0
- {docs → qtype/docs}/components/Memory.md +0 -0
- {docs → qtype/docs}/components/MessageRole.md +0 -0
- {docs → qtype/docs}/components/Model.md +0 -0
- {docs → qtype/docs}/components/ModelList.md +0 -0
- {docs → qtype/docs}/components/OAuth2AuthProvider.md +0 -0
- {docs → qtype/docs}/components/PromptTemplate.md +0 -0
- {docs → qtype/docs}/components/PythonFunctionTool.md +0 -0
- {docs → qtype/docs}/components/RAGChunk.md +0 -0
- {docs → qtype/docs}/components/RAGDocument.md +0 -0
- {docs → qtype/docs}/components/RAGSearchResult.md +0 -0
- {docs → qtype/docs}/components/Reranker.md +0 -0
- {docs → qtype/docs}/components/SQLSource.md +0 -0
- {docs → qtype/docs}/components/Search.md +0 -0
- {docs → qtype/docs}/components/SearchResult.md +0 -0
- {docs → qtype/docs}/components/SecretManager.md +0 -0
- {docs → qtype/docs}/components/SecretReference.md +0 -0
- {docs → qtype/docs}/components/TelemetrySink.md +0 -0
- {docs → qtype/docs}/components/ToolList.md +0 -0
- {docs → qtype/docs}/components/TypeList.md +0 -0
- {docs → qtype/docs}/components/VariableList.md +0 -0
- {docs → qtype/docs}/components/VectorIndex.md +0 -0
- {docs → qtype/docs}/components/VectorSearch.md +0 -0
- {docs → qtype/docs}/components/VertexAuthProvider.md +0 -0
- {docs → qtype/docs}/components/Writer.md +0 -0
- {docs → qtype/docs}/example_ui.png +0 -0
- {docs → qtype/docs}/index.md +0 -0
- {docs → qtype/docs}/legacy_how_tos/Configuration/modular-yaml.md +0 -0
- {docs → qtype/docs}/legacy_how_tos/Configuration/phoenix_projects.png +0 -0
- {docs → qtype/docs}/legacy_how_tos/Configuration/phoenix_traces.png +0 -0
- {docs → qtype/docs}/legacy_how_tos/Configuration/reference-by-id.md +0 -0
- {docs → qtype/docs}/legacy_how_tos/Configuration/telemetry-setup.md +0 -0
- {docs → qtype/docs}/legacy_how_tos/Data Types/custom-types.md +0 -0
- {docs → qtype/docs}/legacy_how_tos/Data Types/domain-types.md +0 -0
- {docs → qtype/docs}/legacy_how_tos/Debugging/visualize-apps.md +0 -0
- {docs → qtype/docs}/legacy_how_tos/Tools/api-tools.md +0 -0
- {docs → qtype/docs}/legacy_how_tos/Tools/python-tools.md +0 -0
- {examples → qtype/examples}/authentication/aws_authentication.qtype.yaml +0 -0
- {examples → qtype/examples}/conversational_ai/hello_world_chat.qtype.yaml +0 -0
- {examples → qtype/examples}/conversational_ai/simple_chatbot.qtype.yaml +0 -0
- {examples → qtype/examples}/data_processing/batch_processing.qtype.yaml +0 -0
- {examples → qtype/examples}/data_processing/cache_step_results.qtype.yaml +0 -0
- {examples → qtype/examples}/data_processing/collect_results.qtype.yaml +0 -0
- {examples → qtype/examples}/data_processing/dataflow_pipelines.qtype.yaml +0 -0
- {examples → qtype/examples}/data_processing/decode_json.qtype.yaml +0 -0
- {examples → qtype/examples}/data_processing/explode_items.qtype.yaml +0 -0
- {examples → qtype/examples}/data_processing/read_file.qtype.yaml +0 -0
- {examples → qtype/examples}/invoke_models/create_embeddings.qtype.yaml +0 -0
- {examples → qtype/examples}/invoke_models/simple_llm_call.qtype.yaml +0 -0
- {examples → qtype/examples}/language_features/include_raw.qtype.yaml +0 -0
- {examples → qtype/examples}/language_features/ui_hints.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/bedrock/data_analysis_with_telemetry.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/bedrock/hello_world.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/bedrock/hello_world_chat.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/bedrock/hello_world_chat_with_telemetry.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/bedrock/hello_world_chat_with_thinking.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/bedrock/hello_world_completion.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/bedrock/hello_world_completion_with_auth.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/bedrock/simple_agent_chat.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/chat_with_langfuse.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/data_processor.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/echo/debug_example.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/echo/prompt.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/echo/test.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/echo/video.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/field_extractor_example.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/multi_flow_example.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/openai/hello_world_chat.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/openai/hello_world_chat_with_telemetry.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/rag.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/time_utilities.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/vertex/hello_world_chat.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/vertex/hello_world_completion.qtype.yaml +0 -0
- {examples → qtype/examples}/legacy/vertex/hello_world_completion_with_auth.qtype.yaml +0 -0
- {examples → qtype/examples}/observability_debugging/trace_with_opentelemetry.qtype.yaml +0 -0
- {examples → qtype/examples}/research_assistant/research_assistant.qtype.yaml +0 -0
- {examples → qtype/examples}/research_assistant/tavily.oas.yaml +0 -0
- {examples → qtype/examples}/tutorials/01_hello_world.qtype.yaml +0 -0
- {examples → qtype/examples}/tutorials/02_conversational_chat.qtype.yaml +0 -0
- {qtype-0.1.12.dist-info → qtype-0.1.14.dist-info}/entry_points.txt +0 -0
- {qtype-0.1.12.dist-info → qtype-0.1.14.dist-info}/licenses/LICENSE +0 -0
|
Binary file
|
|
@@ -59,7 +59,7 @@ qtype validate examples/research_assistant/research_assistant.qtype.yaml
|
|
|
59
59
|
|
|
60
60
|
# Run directly
|
|
61
61
|
qtype run -i '{"topic":"Latest developments in retrieval augmented generation"}' \
|
|
62
|
-
examples/research_assistant/research_assistant.qtype.yaml
|
|
62
|
+
--show-output examples/research_assistant/research_assistant.qtype.yaml
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
### Example Output
|
|
@@ -92,7 +92,6 @@ When running with the topic "Latest developments in retrieval augmented generati
|
|
|
92
92
|
|
|
93
93
|
## Learn More
|
|
94
94
|
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
- How-To: [Call Large Language Models](../How%20To/Invoke%20Models/call_large_language_models.md)
|
|
95
|
+
- [Create Tools from OpenAPI Specifications](../How%20To/Tools%20%26%20Integration/create_tools_from_openapi_specifications.md)
|
|
96
|
+
- [Bind Tool Inputs and Outputs](../How%20To/Tools%20%26%20Integration/bind_tool_inputs_and_outputs.md)
|
|
97
|
+
- [Call Large Language Models](../How%20To/Invoke%20Models/call_large_language_models.md)
|
|
@@ -33,4 +33,6 @@ qtype serve examples/conversational_ai/simple_chatbot.qtype.yaml
|
|
|
33
33
|
|
|
34
34
|
## Learn More
|
|
35
35
|
|
|
36
|
-
- Tutorial:
|
|
36
|
+
- [Tutorial: Conversational Chatbot](../Tutorials/02-conversational-chatbot.md)
|
|
37
|
+
- [Use Conversational Interfaces](../How%20To/Qtype%20Server/use_conversational_interfaces.md)
|
|
38
|
+
- [ChatMessage Reference](../components/ChatMessage.md)
|
|
@@ -55,6 +55,6 @@ models:
|
|
|
55
55
|
## See Also
|
|
56
56
|
|
|
57
57
|
- [AWSAuthProvider Reference](../../components/AWSAuthProvider.md)
|
|
58
|
+
- [Use API Key Authentication](use_api_key_authentication.md)
|
|
59
|
+
- [Call Large Language Models](../Invoke%20Models/call_large_language_models.md)
|
|
58
60
|
- [Model Reference](../../components/Model.md)
|
|
59
|
-
- [How-To: Use API Key Authentication](use_api_key_authentication.md)
|
|
60
|
-
- [How-To: Manage Secrets with Secret Manager](../Authentication/manage_secrets.md)
|
|
@@ -36,5 +36,5 @@ models:
|
|
|
36
36
|
|
|
37
37
|
- [APIKeyAuthProvider Reference](../../components/APIKeyAuthProvider.md)
|
|
38
38
|
- [Use Environment Variables](../Language%20Features/use_environment_variables.md)
|
|
39
|
-
- [
|
|
40
|
-
- [Tutorial: Your First QType Application](../../Tutorials/
|
|
39
|
+
- [Configure AWS Authentication](configure_aws_authentication.md)
|
|
40
|
+
- [Tutorial: Your First QType Application](../../Tutorials/01-first-qtype-application.md)
|
|
@@ -10,8 +10,8 @@ qtype run app.qtype.yaml --input-file inputs.csv
|
|
|
10
10
|
|
|
11
11
|
### Supported File Formats
|
|
12
12
|
|
|
13
|
-
- **CSV**: Columns map to input variable names
|
|
14
|
-
- **JSON**: Array of objects or records format
|
|
13
|
+
- **CSV**: Columns map to input variable names (best for primitive types)
|
|
14
|
+
- **JSON**: Array of objects or records format (best for nested/complex types)
|
|
15
15
|
- **Parquet**: Efficient columnar format for large datasets
|
|
16
16
|
- **Excel**: `.xlsx` or `.xls` files
|
|
17
17
|
|
|
@@ -19,10 +19,25 @@ qtype run app.qtype.yaml --input-file inputs.csv
|
|
|
19
19
|
|
|
20
20
|
When you provide `--input-file`, QType:
|
|
21
21
|
1. Reads the file into a pandas DataFrame
|
|
22
|
-
2.
|
|
23
|
-
3.
|
|
24
|
-
4.
|
|
25
|
-
5.
|
|
22
|
+
2. Automatically converts data to match input variable types
|
|
23
|
+
3. Each row becomes one execution of the flow
|
|
24
|
+
4. Column names must match flow input variable IDs
|
|
25
|
+
5. Processes rows with configured concurrency
|
|
26
|
+
6. Returns results as a DataFrame (can be saved with `--output`)
|
|
27
|
+
|
|
28
|
+
### Type Conversion
|
|
29
|
+
|
|
30
|
+
QType automatically converts file data to match your flow's input types:
|
|
31
|
+
|
|
32
|
+
- **Primitive types** (`int`, `float`, `bool`, `text`): Converted from file values
|
|
33
|
+
- **Custom types**: Validated and instantiated from dict/object columns (use JSON format)
|
|
34
|
+
- **Domain types**: Built-in types like `ChatMessage` or `SearchResult` (use JSON format)
|
|
35
|
+
|
|
36
|
+
**Format Selection Guide:**
|
|
37
|
+
|
|
38
|
+
- Use **CSV** for simple data with primitive types (strings, numbers, booleans)
|
|
39
|
+
- Use **JSON** for complex data with custom types, nested objects, or domain types
|
|
40
|
+
- Use **Parquet** for large datasets with mixed types and efficient storage
|
|
26
41
|
|
|
27
42
|
## Complete Example
|
|
28
43
|
|
|
@@ -57,6 +72,6 @@ qtype run batch_processing.qtype.yaml \
|
|
|
57
72
|
|
|
58
73
|
## See Also
|
|
59
74
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
- [
|
|
75
|
+
- [Pass Inputs On The CLI](pass_inputs_on_the_cli.md)
|
|
76
|
+
- [Adjust Concurrency](../Data%20Processing/adjust_concurrency.md)
|
|
77
|
+
- [Gallery: Dataflow Pipelines](../../Gallery/dataflow_pipelines.md)
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Provide input values to your QType flows directly from the command line using JSON-formatted input data, enabling dynamic parameterization of applications without modifying YAML files.
|
|
4
4
|
|
|
5
|
+
**Note:** Inputs are optional. Flows with source steps (like `DocumentSource` or `SQLSource`) can run without any inputs, as these steps generate their own data.
|
|
6
|
+
|
|
5
7
|
### CLI Usage
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -20,10 +22,11 @@ qtype run -f analyze_data -i '{"threshold":0.85}' app.qtype.yaml
|
|
|
20
22
|
|
|
21
23
|
### Explanation
|
|
22
24
|
|
|
23
|
-
- **`-i`, `--input`**: Accepts a JSON blob containing key-value pairs where keys match variable names declared in your flow's `inputs` field
|
|
25
|
+
- **`-i`, `--input`**: Accepts a JSON blob containing key-value pairs where keys match variable names declared in your flow's `inputs` field (optional - omit for flows with source steps)
|
|
24
26
|
- **JSON format**: Must be valid JSON with double quotes for strings, properly escaped special characters
|
|
25
27
|
- **Flow inputs**: The variables must match those declared in the flow's `inputs` list or the application's `inputs` list
|
|
26
28
|
- **`-f`, `--flow`**: Specifies which flow to run when your application contains multiple flows (defaults to first flow if omitted)
|
|
29
|
+
- **Source steps**: Flows containing source steps like `DocumentSource`, `SQLSource`, or `FileSource` can run without inputs, as these steps generate data independently
|
|
27
30
|
|
|
28
31
|
## Complete Example
|
|
29
32
|
|
|
@@ -47,6 +50,6 @@ flows:
|
|
|
47
50
|
|
|
48
51
|
## See Also
|
|
49
52
|
|
|
50
|
-
- [Load Multiple Inputs from Files](
|
|
51
|
-
- [
|
|
52
|
-
- [
|
|
53
|
+
- [Load Multiple Inputs from Files](load_multiple_inputs_from_files.md)
|
|
54
|
+
- [CLI Reference](../../Reference/cli.md)
|
|
55
|
+
- [Gallery: Dataflow Pipelines](../../Gallery/dataflow_pipelines.md)
|
|
@@ -22,5 +22,6 @@ qtype serve --reload -p 8080 examples/tutorials/01_hello_world.qtype.yaml
|
|
|
22
22
|
|
|
23
23
|
## See Also
|
|
24
24
|
|
|
25
|
-
- [Serve
|
|
26
|
-
- [
|
|
25
|
+
- [Serve Flows as APIs](../Qtype%20Server/serve_flows_as_apis.md)
|
|
26
|
+
- [Serve Flows as UI](../Qtype%20Server/serve_flows_as_ui.md)
|
|
27
|
+
- [CLI Reference](../../Reference/cli.md)
|
|
@@ -35,7 +35,6 @@ The following step types support `concurrency_config`:
|
|
|
35
35
|
|
|
36
36
|
## See Also
|
|
37
37
|
|
|
38
|
-
- [
|
|
39
|
-
- [
|
|
40
|
-
- [
|
|
41
|
-
- [LLM Processing Pipelines](../../Gallery/dataflow_pipelines.md)
|
|
38
|
+
- [Step Reference](../../components/Step.md)
|
|
39
|
+
- [Cache Step Results](cache_step_results.md)
|
|
40
|
+
- [Gallery: Dataflow Pipelines](../../Gallery/dataflow_pipelines.md)
|
|
@@ -66,6 +66,6 @@ qtype run examples/data_processing/cache_step_results.qtype.yaml --progress -i
|
|
|
66
66
|
|
|
67
67
|
## See Also
|
|
68
68
|
|
|
69
|
-
- [
|
|
69
|
+
- [Step Reference](../../components/Step.md)
|
|
70
70
|
- [Adjust Concurrency](adjust_concurrency.md)
|
|
71
|
-
- [Tutorial: Your First QType Application](../../Tutorials/
|
|
71
|
+
- [Tutorial: Your First QType Application](../../Tutorials/01-first-qtype-application.md)
|
|
@@ -21,4 +21,4 @@ Parse string data in JSON or XML format into structured outputs. This is particu
|
|
|
21
21
|
|
|
22
22
|
- [Decoder Reference](../../components/Decoder.md)
|
|
23
23
|
- [CustomType Reference](../../components/CustomType.md)
|
|
24
|
-
- [Tutorial:
|
|
24
|
+
- [Tutorial: Structured Data](../../Tutorials/03-structured-data.md)
|
|
@@ -35,6 +35,6 @@ qtype run examples/data_processing/explode_items.qtype.yaml \
|
|
|
35
35
|
|
|
36
36
|
## See Also
|
|
37
37
|
|
|
38
|
-
- [
|
|
38
|
+
- [Gather Results into a List](gather_results.md)
|
|
39
39
|
- [Explode Reference](../../components/Explode.md)
|
|
40
|
-
- [Adjust Concurrency](
|
|
40
|
+
- [Adjust Concurrency](adjust_concurrency.md)
|
|
@@ -22,8 +22,8 @@ steps:
|
|
|
22
22
|
|
|
23
23
|
- **Collect**: Gathers all input values from multiple messages into a single list output
|
|
24
24
|
- **Common ancestors**: Only variables that have the exact same value across ALL input messages are preserved in the output message
|
|
25
|
-
- **Fan-out pattern**: Typically used after `Explode` to reverse the fan-out and
|
|
26
|
-
- **Single output**: Always produces exactly one output message containing the
|
|
25
|
+
- **Fan-out pattern**: Typically used after `Explode` to reverse the fan-out and accumulate results
|
|
26
|
+
- **Single output**: Always produces exactly one output message containing the accumulate list
|
|
27
27
|
|
|
28
28
|
### Understanding Common Ancestors
|
|
29
29
|
|
|
@@ -63,6 +63,6 @@ all_processed: ['Processed: Phone', 'Processed: Laptop', 'Processed: Tablet']
|
|
|
63
63
|
|
|
64
64
|
## See Also
|
|
65
65
|
|
|
66
|
-
- [Explode Collections
|
|
66
|
+
- [Explode Collections](explode_collections.md)
|
|
67
67
|
- [Collect Reference](../../components/Collect.md)
|
|
68
|
-
- [
|
|
68
|
+
- [Aggregate Reference](../../components/Aggregate.md)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Invoke Other Flows
|
|
2
|
+
|
|
3
|
+
Reuse flows as composable building blocks by invoking them from other flows with input and output bindings.
|
|
4
|
+
|
|
5
|
+
### QType YAML
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
flows:
|
|
9
|
+
# Define reusable flow
|
|
10
|
+
- type: Flow
|
|
11
|
+
id: summarize_text
|
|
12
|
+
variables:
|
|
13
|
+
- id: input_text
|
|
14
|
+
type: text
|
|
15
|
+
- id: output_summary
|
|
16
|
+
type: text
|
|
17
|
+
inputs: [input_text]
|
|
18
|
+
outputs: [output_summary]
|
|
19
|
+
steps:
|
|
20
|
+
- type: LLMInference
|
|
21
|
+
id: summarizer
|
|
22
|
+
model: my_model
|
|
23
|
+
inputs: [input_text]
|
|
24
|
+
outputs: [output_summary]
|
|
25
|
+
|
|
26
|
+
# Main flow invokes the reusable flow
|
|
27
|
+
- type: Flow
|
|
28
|
+
id: main
|
|
29
|
+
variables:
|
|
30
|
+
- id: article
|
|
31
|
+
type: text
|
|
32
|
+
- id: summary
|
|
33
|
+
type: text
|
|
34
|
+
inputs: [article]
|
|
35
|
+
outputs: [summary]
|
|
36
|
+
steps:
|
|
37
|
+
- type: InvokeFlow
|
|
38
|
+
id: get_summary
|
|
39
|
+
flow: summarize_text # Reference to flow by ID
|
|
40
|
+
input_bindings:
|
|
41
|
+
input_text: article # Map flow input to step variable
|
|
42
|
+
output_bindings:
|
|
43
|
+
output_summary: summary # Map flow output to step variable
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Explanation
|
|
47
|
+
|
|
48
|
+
- **InvokeFlow**: Step type that executes another flow with variable mapping
|
|
49
|
+
- **flow**: ID of the flow to invoke (must be defined in the application)
|
|
50
|
+
- **input_bindings**: Maps flow input variables to the invoking step's variables (format: `flow_input_name: step_variable_name`)
|
|
51
|
+
- **output_bindings**: Maps flow output variables to the invoking step's variables (format: `flow_output_name: step_variable_name`)
|
|
52
|
+
- **Reusability**: Flows can be invoked multiple times with different bindings
|
|
53
|
+
|
|
54
|
+
## Complete Example
|
|
55
|
+
|
|
56
|
+
```yaml
|
|
57
|
+
--8<-- "../examples/data_processing/invoke_other_flows.qtype.yaml"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Run it:**
|
|
61
|
+
```bash
|
|
62
|
+
qtype run examples/data_processing/invoke_other_flows.qtype.yaml \
|
|
63
|
+
--flow main \
|
|
64
|
+
--input '{"article_text": "Your article text here..."}'
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## See Also
|
|
68
|
+
|
|
69
|
+
- [InvokeFlow Reference](../../components/InvokeFlow.md)
|
|
70
|
+
- [Flow Reference](../../components/Flow.md)
|
|
71
|
+
- [Use Agent Skills](../Language%20Features/use_agent_skills.md)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Load Data from Athena
|
|
2
|
+
|
|
3
|
+
Query AWS Athena databases using standard SQL with the `SQLSource` step, which supports Athena through SQLAlchemy connection strings and AWS authentication.
|
|
4
|
+
|
|
5
|
+
### QType YAML
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
flows:
|
|
9
|
+
- id: query-athena
|
|
10
|
+
steps:
|
|
11
|
+
- type: SQLSource
|
|
12
|
+
id: load_sales
|
|
13
|
+
connection: "awsathena+rest://:@athena.us-east-1.amazonaws.com:443/sales_db?s3_staging_dir=s3://my-results-bucket/athena-results/&work_group=primary&catalog_name=some_catalog"
|
|
14
|
+
query: |
|
|
15
|
+
SELECT
|
|
16
|
+
product_id,
|
|
17
|
+
product_name,
|
|
18
|
+
total_sales
|
|
19
|
+
FROM product_sales
|
|
20
|
+
WHERE total_sales >= :min_sales
|
|
21
|
+
ORDER BY total_sales DESC
|
|
22
|
+
inputs:
|
|
23
|
+
- min_sales
|
|
24
|
+
outputs:
|
|
25
|
+
- product_id
|
|
26
|
+
- product_name
|
|
27
|
+
- total_sales
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Explanation
|
|
31
|
+
|
|
32
|
+
- **awsathena+rest**: PyAthena SQLAlchemy dialect for accessing Athena via REST API
|
|
33
|
+
- **Connection string format**: `awsathena+rest://:@athena.{REGION}.amazonaws.com:443/{DATABASE}?s3_staging_dir={S3_PATH}&work_group={WORKGROUP}&catalog_name={CATALOG}"`
|
|
34
|
+
- **s3_staging_dir**: S3 location where Athena writes query results (required by Athena)
|
|
35
|
+
- **work_group**: Athena workgroup name (e.g., `primary`)
|
|
36
|
+
- **auth**: Reference to AWSAuthProvider for AWS credentials
|
|
37
|
+
- **query**: Standard SQL query with parameter substitution using `:parameter_name` syntax
|
|
38
|
+
|
|
39
|
+
## Complete Example
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
--8<-- "../examples/data_processing/athena_query.qtype.yaml"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## See Also
|
|
46
|
+
|
|
47
|
+
- [SQLSource Reference](../../components/SQLSource.md)
|
|
48
|
+
- [Configure AWS Authentication](../Authentication/configure_aws_authentication.md)
|
|
49
|
+
- [Read Data from SQL Databases](read_sql_databases.md)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Load Documents
|
|
2
|
+
|
|
3
|
+
Load documents from files, directories, or external systems using LlamaIndex readers with DocumentSource.
|
|
4
|
+
|
|
5
|
+
**Note:** DocumentSource is a source step that generates data independently, so flows using it typically require no inputs.
|
|
6
|
+
|
|
7
|
+
### QType YAML
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
steps:
|
|
11
|
+
- type: DocumentSource
|
|
12
|
+
id: load_docs
|
|
13
|
+
reader_module: llama_index.core.SimpleDirectoryReader
|
|
14
|
+
args:
|
|
15
|
+
input_dir: ./data
|
|
16
|
+
required_exts: [".md", ".txt"]
|
|
17
|
+
recursive: true
|
|
18
|
+
loader_args:
|
|
19
|
+
num_workers: 4
|
|
20
|
+
outputs:
|
|
21
|
+
- document
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Explanation
|
|
25
|
+
|
|
26
|
+
- **reader_module**: Python module path to a class that inherits from `llama_index.core.readers.base.BaseReader` (most common: `llama_index.core.SimpleDirectoryReader`)
|
|
27
|
+
- **args**: Arguments passed to the reader class constructor (e.g., `input_dir`, `required_exts`, `recursive`, `file_extractor`)
|
|
28
|
+
- **loader_args**: Arguments passed to the reader's `load_data()` method (e.g., `num_workers` for parallel processing)
|
|
29
|
+
- **outputs**: Variable to store loaded documents (type: `RAGDocument`) - DocumentSource fans out, emitting one message per document
|
|
30
|
+
- **Critical distinction**: Constructor args configure the reader instance; `load_data` args control how documents are loaded
|
|
31
|
+
|
|
32
|
+
### Common Reader Modules
|
|
33
|
+
|
|
34
|
+
**SimpleDirectoryReader** (`llama_index.core.SimpleDirectoryReader`):
|
|
35
|
+
- Constructor args: `input_dir`, `input_files`, `required_exts`, `exclude`, `recursive`, `file_extractor`, `file_metadata`, `encoding`
|
|
36
|
+
- Loader args: `num_workers` (parallel processing)
|
|
37
|
+
- Supports 15+ file types including PDF, DOCX, CSV, Markdown, images, audio/video
|
|
38
|
+
- [Full documentation](https://developers.llamaindex.ai/python/framework/module_guides/loading/simpledirectoryreader/)
|
|
39
|
+
|
|
40
|
+
**JSONReader** (`llama_index.readers.json.JSONReader`):
|
|
41
|
+
- Constructor args: `levels_back`, `collapse_length`, `ensure_ascii`, `is_jsonl`, `clean_json`
|
|
42
|
+
- Loader args: `input_file`, `extra_info`
|
|
43
|
+
- Supports both JSON and JSONL (JSON Lines) formats
|
|
44
|
+
- [Full documentation](https://developers.llamaindex.ai/typescript/framework/modules/data/readers/json/)
|
|
45
|
+
|
|
46
|
+
### Dynamic Arguments
|
|
47
|
+
|
|
48
|
+
You can pass flow variables as constructor arguments by including them in `args`. At runtime, QType merges message variables with the configured args:
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
variables:
|
|
52
|
+
- id: data_path
|
|
53
|
+
type: text
|
|
54
|
+
|
|
55
|
+
steps:
|
|
56
|
+
- type: DocumentSource
|
|
57
|
+
id: load_docs
|
|
58
|
+
reader_module: llama_index.core.SimpleDirectoryReader
|
|
59
|
+
args:
|
|
60
|
+
input_dir: data_path # References variable from message
|
|
61
|
+
inputs: [data_path]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Complete Example
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
--8<-- "../examples/data_processing/load_documents.qtype.yaml"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## See Also
|
|
71
|
+
|
|
72
|
+
- [DocumentSource Reference](../../components/DocumentSource.md)
|
|
73
|
+
- [DocumentSplitter How-To](chunk_documents.md)
|
|
74
|
+
- [RAG Tutorial](../../Tutorials/rag_tutorial.md)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Read Data from Files
|
|
2
|
+
|
|
3
|
+
Load structured data from files using FileSource, which supports CSV, JSON, JSONL, and Parquet formats with automatic format detection and type conversion.
|
|
4
|
+
|
|
5
|
+
### QType YAML
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
steps:
|
|
9
|
+
- id: read_data
|
|
10
|
+
type: FileSource
|
|
11
|
+
path: batch_inputs.csv
|
|
12
|
+
outputs:
|
|
13
|
+
- query
|
|
14
|
+
- topic
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Explanation
|
|
18
|
+
|
|
19
|
+
- **FileSource**: Step that reads structured data from files using fsspec-compatible URIs
|
|
20
|
+
- **path**: File path (relative to YAML file or absolute), supports local files and cloud storage (s3://, gs://, etc.)
|
|
21
|
+
- **outputs**: Column names from the file to extract as variables (must match actual column names)
|
|
22
|
+
- **Format detection**: Automatically determined by file extension (.csv, .json, .jsonl, .parquet)
|
|
23
|
+
- **Type conversion**: Automatically converts data to match variable types (primitives, domain types, custom types)
|
|
24
|
+
- **Streaming**: Emits one FlowMessage per row, enabling downstream steps to process data in parallel
|
|
25
|
+
|
|
26
|
+
### Automatic Type Conversion
|
|
27
|
+
|
|
28
|
+
FileSource automatically converts data from files to match your variable types:
|
|
29
|
+
|
|
30
|
+
- **Primitive types** (`int`, `float`, `bool`, `text`): Direct conversion from file data
|
|
31
|
+
- **Domain types** (`ChatMessage`, `SearchResult`, etc.): Validated from dict/object columns
|
|
32
|
+
- **Custom types**: Your defined types are validated and instantiated from dict/object columns
|
|
33
|
+
|
|
34
|
+
**Format Recommendations:**
|
|
35
|
+
|
|
36
|
+
- **CSV**: Best for simple primitive types (strings, numbers, booleans)
|
|
37
|
+
- **JSON/JSONL**: Recommended for nested objects, custom types, and domain types
|
|
38
|
+
- **Parquet**: Best for large datasets with mixed types and efficient storage
|
|
39
|
+
|
|
40
|
+
**Example with Custom Types (JSON format):**
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
[
|
|
44
|
+
{"person": {"name": "Alice", "age": 30}, "score": 95},
|
|
45
|
+
{"person": {"name": "Bob", "age": 25}, "score": 87}
|
|
46
|
+
]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
JSON preserves nested objects, making it ideal for complex types. CSV stores everything as strings, requiring nested objects to be serialized as JSON strings within the CSV.
|
|
50
|
+
|
|
51
|
+
## Complete Example
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
--8<-- "../examples/data_processing/read_file.qtype.yaml"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## See Also
|
|
58
|
+
|
|
59
|
+
- [FileSource Reference](../../components/FileSource.md)
|
|
60
|
+
- [Load Multiple Inputs from Files](../Command%20Line%20Usage/load_multiple_inputs_from_files.md)
|
|
61
|
+
- [Write Data to File](write_data_to_file.md)
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Query relational databases and process results row-by-row using the `SQLSource` step, which supports any database accessible via SQLAlchemy connection strings.
|
|
4
4
|
|
|
5
|
+
**Note:** SQLSource is a source step that generates data from database queries, so flows using it typically require no inputs.
|
|
6
|
+
|
|
5
7
|
### QType YAML
|
|
6
8
|
|
|
7
9
|
```yaml
|
|
@@ -42,6 +44,5 @@ steps:
|
|
|
42
44
|
## See Also
|
|
43
45
|
|
|
44
46
|
- [SQLSource Reference](../../components/SQLSource.md)
|
|
45
|
-
- [
|
|
46
|
-
- [
|
|
47
|
-
- [Example: Dataflow Pipeline](../../Gallery/Data%20Processing/dataflow_pipelines.md)
|
|
47
|
+
- [Load Data from Athena](load_data_from_athena.md)
|
|
48
|
+
- [Read Data from Files](read_data_from_files.md)
|
|
@@ -36,5 +36,4 @@ See the [LLM Processing Pipelines](../../Gallery/dataflow_pipelines.md) gallery
|
|
|
36
36
|
|
|
37
37
|
- [FileWriter Reference](../../components/FileWriter.md)
|
|
38
38
|
- [Read Data from Files](read_data_from_files.md)
|
|
39
|
-
- [
|
|
40
|
-
- [LLM Processing Pipelines](../../Gallery/dataflow_pipelines.md)
|
|
39
|
+
- [Gallery: Dataflow Pipelines](../../Gallery/dataflow_pipelines.md)
|
|
@@ -48,4 +48,4 @@ qtype run simple_llm_call.qtype.yaml --input '{"text": "What is the capital of F
|
|
|
48
48
|
|
|
49
49
|
- [LLMInference Reference](../../components/LLMInference.md)
|
|
50
50
|
- [Model Reference](../../components/Model.md)
|
|
51
|
-
- [Tutorial:
|
|
51
|
+
- [Tutorial: Conversational Chatbot](../../Tutorials/02-conversational-chatbot.md)
|
|
@@ -46,4 +46,4 @@ qtype run examples/invoke_models/create_embeddings.qtype.yaml \
|
|
|
46
46
|
|
|
47
47
|
- [InvokeEmbedding Reference](../../components/InvokeEmbedding.md)
|
|
48
48
|
- [EmbeddingModel Reference](../../components/EmbeddingModel.md)
|
|
49
|
-
- [
|
|
49
|
+
- [Embedding Reference](../../components/Embedding.md)
|
|
@@ -34,6 +34,5 @@ steps:
|
|
|
34
34
|
## See Also
|
|
35
35
|
|
|
36
36
|
- [PromptTemplate Reference](../../components/PromptTemplate.md)
|
|
37
|
-
- [
|
|
38
|
-
- [
|
|
39
|
-
- [Tutorial: Your First QType Application](../../Tutorials/your_first_qtype_application.md)
|
|
37
|
+
- [Include Raw Text from Other Files](../Language%20Features/include_raw_text_from_other_files.md)
|
|
38
|
+
- [Call Large Language Models](call_large_language_models.md)
|
|
@@ -44,4 +44,5 @@ qtype run include_raw.qtype.yaml -i '{"theme":"a robot learning to paint","tone"
|
|
|
44
44
|
## See Also
|
|
45
45
|
|
|
46
46
|
- [PromptTemplate Reference](../../components/PromptTemplate.md)
|
|
47
|
-
- [
|
|
47
|
+
- [Include QType YAML](include_qtype_yaml.md)
|
|
48
|
+
- [Reuse Prompts with Templates](../Invoke%20Models/reuse_prompts_with_templates.md)
|
|
@@ -46,6 +46,6 @@ flows:
|
|
|
46
46
|
|
|
47
47
|
## See Also
|
|
48
48
|
|
|
49
|
+
- [Include QType YAML](include_qtype_yaml.md)
|
|
49
50
|
- [Tutorial: Your First QType Application](../../Tutorials/01-first-qtype-application.md)
|
|
50
|
-
- [
|
|
51
|
-
- [APIKeyAuthProvider Reference](../../components/APIKeyAuthProvider.md)
|
|
51
|
+
- [Application Reference](../../components/Application.md)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Use QType Agent Skills
|
|
2
|
+
|
|
3
|
+
Enhance GitHub Copilot or Claude Code with domain-specific QType expertise by loading pre-built agent skills that help you architect your vision faster.
|
|
4
|
+
|
|
5
|
+
**Requires:** Active `qtype-mcp` MCP server
|
|
6
|
+
|
|
7
|
+
### Generate Skills
|
|
8
|
+
|
|
9
|
+
Simply:
|
|
10
|
+
```
|
|
11
|
+
qtype generate skills
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
and the skills will be written `.claude` for you.
|
|
15
|
+
|
|
16
|
+
## Available QType Skills
|
|
17
|
+
|
|
18
|
+
### QType Architect
|
|
19
|
+
|
|
20
|
+
Expert assistant for designing and building AI applications using QType's declarative YAML language.
|
|
21
|
+
|
|
22
|
+
**Capabilities:**
|
|
23
|
+
- Designs flows from requirements to implementation
|
|
24
|
+
- Generates architecture visualizations in VSCode
|
|
25
|
+
|
|
26
|
+
## See Also
|
|
27
|
+
|
|
28
|
+
- [Use QType MCP](use_qtype_mcp.md)
|
|
29
|
+
- [Invoke Other Flows](../Data%20Processing/invoke_other_flows.md)
|
|
@@ -43,5 +43,6 @@ qtype run app.qtype.yaml
|
|
|
43
43
|
|
|
44
44
|
## See Also
|
|
45
45
|
|
|
46
|
+
- [Use API Key Authentication](../Authentication/use_api_key_authentication.md)
|
|
47
|
+
- [Configure AWS Authentication](../Authentication/configure_aws_authentication.md)
|
|
46
48
|
- [Tutorial: Your First QType Application](../../Tutorials/01-first-qtype-application.md)
|
|
47
|
-
- [APIKeyAuthProvider Reference](../../components/APIKeyAuthProvider.md)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Use Optional Variables
|
|
2
|
+
|
|
3
|
+
Mark variables as optional to handle cases where data may be missing or unset, allowing your flow to continue gracefully instead of failing.
|
|
4
|
+
|
|
5
|
+
### QType YAML
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
variables:
|
|
9
|
+
- id: email
|
|
10
|
+
type: text? # Optional text variable
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Explanation
|
|
14
|
+
|
|
15
|
+
- **`?` suffix**: Shorthand syntax to mark a variable as optional
|
|
16
|
+
- **Optional variables**: Can be `None` or set to a value
|
|
17
|
+
- **FieldExtractor**: Returns `None` for optional output variables when JSONPath finds no matches, instead of raising an error. If you make the variable non-optional, it will raise an error.
|
|
18
|
+
|
|
19
|
+
## Complete Example
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
--8<-- "../examples/language_features/optional_variables.qtype.yaml"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Run it:**
|
|
26
|
+
```bash
|
|
27
|
+
# When email field exists
|
|
28
|
+
qtype run examples/language_features/optional_variables.qtype.yaml -i '{"user_profile": {"email":"hello@domain.com"}}'
|
|
29
|
+
# Results:
|
|
30
|
+
# email: hello@domain.com
|
|
31
|
+
|
|
32
|
+
# When email field is missing
|
|
33
|
+
qtype run examples/language_features/optional_variables.qtype.yaml -i '{"user_profile": "just text"}'
|
|
34
|
+
# Results:
|
|
35
|
+
# email: None
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## See Also
|
|
39
|
+
|
|
40
|
+
- [Variable Reference](../../components/Variable.md)
|
|
41
|
+
- [FieldExtractor Reference](../../components/FieldExtractor.md)
|
|
42
|
+
- [Tutorial: Structured Data](../../Tutorials/03-structured-data.md)
|
|
@@ -41,7 +41,7 @@ Add the QType MCP server to your workspace's `.vscode/mcp.json`:
|
|
|
41
41
|
```json
|
|
42
42
|
{
|
|
43
43
|
"servers": {
|
|
44
|
-
"qtype": {
|
|
44
|
+
"qtype-mcp": {
|
|
45
45
|
"type": "stdio",
|
|
46
46
|
"command": "qtype",
|
|
47
47
|
"cwd": "${workspaceFolder}",
|
|
@@ -54,6 +54,6 @@ Add the QType MCP server to your workspace's `.vscode/mcp.json`:
|
|
|
54
54
|
|
|
55
55
|
## See Also
|
|
56
56
|
|
|
57
|
-
- [
|
|
58
|
-
- [
|
|
59
|
-
- [
|
|
57
|
+
- [Use QType Agent Skills](use_agent_skills.md)
|
|
58
|
+
- [Validate QType YAML](../Observability%20%26%20Debugging/validate_qtype_yaml.md)
|
|
59
|
+
- [Visualize Application Architecture](../Observability%20%26%20Debugging/visualize_application_architecture.md)
|
|
@@ -46,4 +46,4 @@ Then open `http://localhost:6006` in your browser to see the traced execution.
|
|
|
46
46
|
|
|
47
47
|
- [Application Reference](../../components/Application.md)
|
|
48
48
|
- [Validate QType YAML](validate_qtype_yaml.md)
|
|
49
|
-
- [
|
|
49
|
+
- [CLI Reference](../../Reference/cli.md)
|