griptape-ai / griptape

Modular Python framework for AI agents and workflows with chain-of-thought reasoning, tools, and memory.
https://www.griptape.ai
Apache License 2.0
2.01k stars 170 forks source link

Pipeline seems to be ignoring TextSummaryTask #202

Closed shhlife closed 1 year ago

shhlife commented 1 year ago

Describe the bug I created a pipeline that has a TextSummaryTask and it seems to be ignoring it.

To Reproduce

from griptape.structures import Pipeline
from griptape.tasks import  ToolkitTask, TextSummaryTask, PromptTask
from griptape.tools import WebScraper

web_scraper = WebScraper()
pipeline = Pipeline()
pipeline.add_task(ToolkitTask("What does griptape.ai do?", tools=[web_scraper], id="scrape"))
pipeline.add_task(TextSummaryTask("Summarize the results as a haiku {{ parent_output }}", id="summarize"))
pipeline.add_task(PromptTask("Summarize the results as a haiku {{ parent_output }}", id="summarize-prompt"))
pipeline.run()

Expected behavior When watching the logs I should see the summarize task, but it's ignored. The pipeline just skips right over it.

Logs

[09/08/23 03:21:49] INFO     Task scrape                                                                                                              
                             Input: What does griptape.ai do?                                                                                         
[09/08/23 03:21:58] INFO     Subtask 21cdf8f0cd7c48e480810a79d8e11d60                                                                                 
                             Thought: I need to find information about what griptape.ai does. I can use the WebScraper tool to get the content of the 
                             griptape.ai website.                                                                                                     

                             Action: {"type": "tool", "name": "WebScraper", "activity": "get_content", "input": {"values": {"url":                    
                             "https://griptape.ai"}}}                                                                                                 
[09/08/23 03:21:59] INFO     Subtask 21cdf8f0cd7c48e480810a79d8e11d60                                                                                 
                             Observation: Output of "WebScraper.get_content" was stored in memory with memory_name "TextToolMemory" and               
                             artifact_namespace "c4833907635b4b6ca208d24a86aade0a"                                                                    
[09/08/23 03:22:12] INFO     Subtask fb3593dcb5f94d399d8a15347c487524                                                                                 
                             Thought: The content of the griptape.ai website has been stored in memory. I can use the TextToolMemory tool to search   
                             this memory for information about what griptape.ai does.                                                                 
                             Action: {"type": "memory", "name": "TextToolMemory", "activity": "search", "input": {"values": {"memory_name":           
                             "TextToolMemory", "artifact_namespace": "c4833907635b4b6ca208d24a86aade0a", "query": "What does griptape.ai do?"}}}      
[09/08/23 03:22:17] INFO     Subtask fb3593dcb5f94d399d8a15347c487524                                                                                 
                             Observation: Griptape.ai is a modular open source framework that allows developers to build and deploy LLM-based agents, 
                             pipelines, and workflows. It provides the ability to create AI systems that operate across two dimensions: predictability
                             and creativity. It enforces structures like sequential pipelines, DAG-based workflows, and long-term memory for          
                             predictability, and safely prompts LLMs with tools and short-term memory connecting them to external APIs and data stores
                             for creativity. Griptape.ai also offers Griptape Cloud, a managed platform for running AI agents, pipelines, and         
                             workflows, making it easy to deploy, manage, schedule, and connect AI apps to data stores and APIs.                      
[09/08/23 03:22:30] INFO     Task scrape                                                                                                              
                             Output: Griptape.ai is a modular open source framework that allows developers to build and deploy LLM-based agents,      
                             pipelines, and workflows. It provides the ability to create AI systems that operate across two dimensions: predictability
                             and creativity. It enforces structures like sequential pipelines, DAG-based workflows, and long-term memory for          
                             predictability, and safely prompts LLMs with tools and short-term memory connecting them to external APIs and data stores
                             for creativity. Griptape.ai also offers Griptape Cloud, a managed platform for running AI agents, pipelines, and         
                             workflows, making it easy to deploy, manage, schedule, and connect AI apps to data stores and APIs.                      
[09/08/23 03:22:33] INFO     Task summarize-prompt                                                                                                    
                             Input: Summarize the results as a haiku Griptape.ai is an open source framework that allows developers to build and      
                             deploy AI agents, pipelines, and workflows. It enables the creation of AI systems that balance predictability and        
                             creativity. The framework enforces structures for predictability and provides tools for creativity. Additionally,        
                             Griptape.ai offers a managed platform called Griptape Cloud for running and managing AI apps.                            
[09/08/23 03:22:36] INFO     Task summarize-prompt                                                                                                    
                             Output: Griptape.ai's might,                                                                                             
                             Balancing with creative light,                                                                                           
                             In the cloud, takes flight.     

Desktop (please complete the following information):

vasinov commented 1 year ago

TextSummaryTask works as expected but didn't output any logs. It's now fixed in v0.16.1.