diff options
Diffstat (limited to 'server/continuedev/plugins/recipes/AddTransformRecipe/main.py')
-rw-r--r-- | server/continuedev/plugins/recipes/AddTransformRecipe/main.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/server/continuedev/plugins/recipes/AddTransformRecipe/main.py b/server/continuedev/plugins/recipes/AddTransformRecipe/main.py new file mode 100644 index 00000000..583cef1a --- /dev/null +++ b/server/continuedev/plugins/recipes/AddTransformRecipe/main.py @@ -0,0 +1,31 @@ +from textwrap import dedent + +from ....core.main import Step +from ....core.sdk import ContinueSDK +from ....core.steps import MessageStep, WaitForUserInputStep +from .steps import AddTransformStep, SetUpChessPipelineStep + + +class AddTransformRecipe(Step): + hide: bool = True + + async def run(self, sdk: ContinueSDK): + text_observation = await sdk.run_step( + MessageStep( + message=dedent( + """\ + This recipe will walk you through the process of adding a transform to a dlt pipeline that uses the chess.com API source. With the help of Continue, you will: + - Set up a dlt pipeline for the chess.com API + - Add a filter or map transform to the pipeline + - Run the pipeline and view the transformed data in a Streamlit app""" + ), + name="Add transformation to a dlt pipeline", + ) + >> SetUpChessPipelineStep() + >> WaitForUserInputStep( + prompt="How do you want to transform the Chess.com API data before loading it? For example, you could filter out games that ended in a draw." + ) + ) + await sdk.run_step( + AddTransformStep(transform_description=text_observation.text) + ) |