diff --git a/docs/griptape-framework/misc/src/events_4.py b/docs/griptape-framework/misc/src/events_4.py index 6dc2d3a6c..27bb3c5a8 100644 --- a/docs/griptape-framework/misc/src/events_4.py +++ b/docs/griptape-framework/misc/src/events_4.py @@ -1,15 +1,22 @@ -from griptape.structures import Pipeline -from griptape.tasks import ToolkitTask +import logging + +from griptape.config import config +from griptape.structures import Agent from griptape.tools import PromptSummaryTool, WebScraperTool from griptape.utils import Stream -pipeline = Pipeline() -pipeline.add_tasks( - ToolkitTask( - "Based on https://griptape.ai, tell me what griptape is.", - tools=[WebScraperTool(off_prompt=True), PromptSummaryTool(off_prompt=False)], - ) +# Hide Griptape's usual output +logging.getLogger(config.logging_config.logger_name).setLevel(logging.ERROR) + +agent = Agent( + input="Based on https://griptape.ai, tell me what griptape is.", + tools=[ + PromptSummaryTool(off_prompt=True), + WebScraperTool(off_prompt=False), + ], + stream=True, ) -for artifact in Stream(pipeline).run(): + +for artifact in Stream(agent).run(): print(artifact.value, end="", flush=True) diff --git a/docs/griptape-framework/structures/src/config_8.py b/docs/griptape-framework/structures/src/config_8.py index 909a2d5d9..999911b25 100644 --- a/docs/griptape-framework/structures/src/config_8.py +++ b/docs/griptape-framework/structures/src/config_8.py @@ -5,7 +5,7 @@ custom_config = AmazonBedrockDriverConfig() dict_config = custom_config.to_dict() # Use OpenAi for embeddings -dict_config["embedding"] = { +dict_config["embedding_driver"] = { "base_url": None, "model": "text-embedding-3-small", "organization": None,