File size: 1,583 Bytes
db60f58 6165600 db60f58 4983616 db60f58 27ab1be 4983616 27ab1be db60f58 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | components:
llm:
init_parameters:
api_params:
model: google/gemma-2-2b-it
api_type: serverless_inference_api
generation_kwargs:
max_new_tokens: 5000
stop:
- <stop>
stop_sequences: []
streaming_callback: null
token:
env_vars:
- HF_API_TOKEN
strict: true
type: env_var
type: haystack.components.generators.hugging_face_api.HuggingFaceAPIGenerator
prompt_builder:
init_parameters:
required_variables: null
template: "\nYou are an instructional designer. Create a detailed, educational\
\ Markdown module titled \"{{name}}\" that takes {{duration}} to read.\n\n\
- Use **200 WPM** for general topics or **150 WPM** for technical ones.\n\
- Target word count: {{word_count}} \xB15%.\n- Output valid **Markdown only**\
\ using the structure below.\n- Do **not** include code fences, extra commentary,\
\ or repeat \"### End\".\n\n### Structure:\n# {{name}}\n**Estimated Reading\
\ Time: {{duration}}**\n\n## Introduction\n- Brief intro to the topic.\n\n\
## Key Concepts\n{{formatted_subtopics}}\n\n## Explanation\n- Detailed explanation\
\ using paragraphs, bullets, and examples.\n\n## Examples\n- Include at least\
\ one relevant example.\n\n## Summary\n- Key takeaways.\n\n### End\n"
variables: null
type: haystack.components.builders.prompt_builder.PromptBuilder
connections:
- receiver: llm.prompt
sender: prompt_builder.prompt
max_runs_per_component: 100
metadata: {}
|