From 16742ca713d94a533126943b9393f86eea133fb7 Mon Sep 17 00:00:00 2001 From: Collin Dutter <collin@griptape.ai> Date: Mon, 22 Jul 2024 14:26:01 -0400 Subject: [PATCH] Docs Search Improvements (#1004) --- docs/gen_ref_pages.py | 2 +- docs/griptape-framework/data/artifacts.md | 5 +++++ docs/griptape-framework/data/chunkers.md | 5 +++++ docs/griptape-framework/data/loaders.md | 5 +++++ .../drivers/audio-transcription-drivers.md | 5 +++++ .../drivers/conversation-memory-drivers.md | 5 +++++ .../drivers/embedding-drivers.md | 5 +++++ .../drivers/event-listener-drivers.md | 5 +++++ .../drivers/image-generation-drivers.md | 5 +++++ .../drivers/image-query-drivers.md | 5 +++++ .../drivers/observability-drivers.md | 16 +++++++++++----- .../griptape-framework/drivers/prompt-drivers.md | 5 +++++ docs/griptape-framework/drivers/sql-drivers.md | 5 +++++ .../drivers/structure-run-drivers.md | 5 +++++ .../drivers/text-to-speech-drivers.md | 5 +++++ .../drivers/vector-store-drivers.md | 5 +++++ .../drivers/web-scraper-drivers.md | 5 +++++ .../drivers/web-search-drivers.md | 5 +++++ docs/griptape-framework/engines/audio-engines.md | 5 +++++ .../engines/extraction-engines.md | 5 +++++ .../engines/image-generation-engines.md | 5 +++++ .../engines/image-query-engines.md | 5 +++++ docs/griptape-framework/engines/rag-engines.md | 7 ++++++- .../engines/summary-engines.md | 5 +++++ docs/griptape-framework/misc/events.md | 5 +++++ docs/griptape-framework/misc/tokenizers.md | 5 +++++ docs/griptape-framework/structures/agents.md | 5 +++++ docs/griptape-framework/structures/config.md | 5 +++++ .../structures/conversation-memory.md | 5 +++++ .../structures/observability.md | 7 ++++++- docs/griptape-framework/structures/pipelines.md | 5 +++++ docs/griptape-framework/structures/rulesets.md | 5 +++++ .../griptape-framework/structures/task-memory.md | 5 +++++ docs/griptape-framework/structures/tasks.md | 5 +++++ docs/griptape-framework/structures/workflows.md | 5 +++++ docs/griptape-framework/tools/index.md | 5 +++++ mkdocs.yml | 2 ++ 37 files changed, 186 insertions(+), 8 deletions(-) diff --git a/docs/gen_ref_pages.py b/docs/gen_ref_pages.py index 85a3f3127..520eafbdf 100644 --- a/docs/gen_ref_pages.py +++ b/docs/gen_ref_pages.py @@ -32,7 +32,7 @@ def build_reference_docs() -> None: mkdocs_gen_files.set_edit_path(full_doc_path, Path("..") / path) with mkdocs_gen_files.open("reference/SUMMARY.md", "w") as nav_file: - nav_file.writelines(["---", "search:", "\texclude: true", "---\n"]) + nav_file.writelines(["---\n", "search:\n", "\x20\x20exclude: true\n", "---\n"]) nav_file.writelines(nav.build_literate_nav()) with mkdocs_gen_files.open("reference/griptape/index.md", "w") as index_file: index_file.write( diff --git a/docs/griptape-framework/data/artifacts.md b/docs/griptape-framework/data/artifacts.md index 6fe77574b..c7aa55bd0 100644 --- a/docs/griptape-framework/data/artifacts.md +++ b/docs/griptape-framework/data/artifacts.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview **[Artifacts](../../reference/griptape/artifacts/base_artifact.md)** are used for passing different types of data between Griptape components. All tools return artifacts that are later consumed by tasks and task memory. diff --git a/docs/griptape-framework/data/chunkers.md b/docs/griptape-framework/data/chunkers.md index b67951b2a..ecaee5eb4 100644 --- a/docs/griptape-framework/data/chunkers.md +++ b/docs/griptape-framework/data/chunkers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Chunkers are used to split arbitrarily long text into chunks of certain token length. diff --git a/docs/griptape-framework/data/loaders.md b/docs/griptape-framework/data/loaders.md index dbc578ccd..73116c064 100644 --- a/docs/griptape-framework/data/loaders.md +++ b/docs/griptape-framework/data/loaders.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Loaders are used to load textual data from different sources and chunk it into [TextArtifact](../../reference/griptape/artifacts/text_artifact.md)s. diff --git a/docs/griptape-framework/drivers/audio-transcription-drivers.md b/docs/griptape-framework/drivers/audio-transcription-drivers.md index c89ef9699..0fba57438 100644 --- a/docs/griptape-framework/drivers/audio-transcription-drivers.md +++ b/docs/griptape-framework/drivers/audio-transcription-drivers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview [Audio Transcription Drivers](../../reference/griptape/drivers/audio_transcription/index.md) extract text from spoken audio. diff --git a/docs/griptape-framework/drivers/conversation-memory-drivers.md b/docs/griptape-framework/drivers/conversation-memory-drivers.md index 88063292f..acdb7c202 100644 --- a/docs/griptape-framework/drivers/conversation-memory-drivers.md +++ b/docs/griptape-framework/drivers/conversation-memory-drivers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview You can persist and load memory by using Conversation Memory Drivers. You can build drivers for your own data stores by extending [BaseConversationMemoryDriver](../../reference/griptape/drivers/memory/conversation/base_conversation_memory_driver.md). diff --git a/docs/griptape-framework/drivers/embedding-drivers.md b/docs/griptape-framework/drivers/embedding-drivers.md index 5bbad3e1e..567aa13e4 100644 --- a/docs/griptape-framework/drivers/embedding-drivers.md +++ b/docs/griptape-framework/drivers/embedding-drivers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Embeddings in Griptape are multidimensional representations of text data. Embeddings carry semantic information, which makes them useful for extracting relevant chunks from large bodies of text for search and querying. diff --git a/docs/griptape-framework/drivers/event-listener-drivers.md b/docs/griptape-framework/drivers/event-listener-drivers.md index 5e73f1a09..73453afb6 100644 --- a/docs/griptape-framework/drivers/event-listener-drivers.md +++ b/docs/griptape-framework/drivers/event-listener-drivers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Event Listener Drivers are used to send Griptape [Events](../misc/events.md) to external services. diff --git a/docs/griptape-framework/drivers/image-generation-drivers.md b/docs/griptape-framework/drivers/image-generation-drivers.md index 95a8bf49b..75316134a 100644 --- a/docs/griptape-framework/drivers/image-generation-drivers.md +++ b/docs/griptape-framework/drivers/image-generation-drivers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview [Image Generation Drivers](../../reference/griptape/drivers/image_generation/index.md) are used by [image generation Engines](../engines/image-generation-engines.md) to build and execute API calls to image generation models. diff --git a/docs/griptape-framework/drivers/image-query-drivers.md b/docs/griptape-framework/drivers/image-query-drivers.md index 6fde89b80..04e3ebaee 100644 --- a/docs/griptape-framework/drivers/image-query-drivers.md +++ b/docs/griptape-framework/drivers/image-query-drivers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Image Query Drivers are used by [Image Query Engines](../engines/image-query-engines.md) to execute natural language queries on the contents of images. You can specify the provider and model used to query the image by providing the Engine with a particular Image Query Driver. diff --git a/docs/griptape-framework/drivers/observability-drivers.md b/docs/griptape-framework/drivers/observability-drivers.md index 8c2c5d2a5..fbe1a1319 100644 --- a/docs/griptape-framework/drivers/observability-drivers.md +++ b/docs/griptape-framework/drivers/observability-drivers.md @@ -1,4 +1,9 @@ -# Observability Drivers +--- +search: + boost: 2 +--- + +## Overview Observability Drivers are used by [Observability](../structures/observability.md) to send telemetry (metrics and traces) related to the execution of an LLM application. The telemetry can be used to monitor the application and to diagnose and troubleshoot issues. All Observability Drivers implement the following methods: @@ -6,7 +11,10 @@ Observability Drivers are used by [Observability](../structures/observability.md * `__exit__()` tears down the Driver. * `observe()` wraps all functions and methods marked with the `@observable` decorator. At a bare minimum, implementations call the wrapped function and return its result (a no-op). This enables the Driver to generate telemetry related to the invocation's call arguments, return values, exceptions, latency, etc. -## Griptape Cloud + +## Observability Drivers + +### Griptape Cloud !!! info This driver requires the `drivers-observability-griptape-cloud` [extra](../index.md#extras). @@ -34,7 +42,7 @@ with Observability(observability_driver=observability_driver): ``` -## OpenTelemetry +### OpenTelemetry !!! info This driver requires the `drivers-observability-opentelemetry` [extra](../index.md#extras). @@ -188,5 +196,3 @@ Output (only relevant because of use of `ConsoleSpanExporter`): } } ``` - - diff --git a/docs/griptape-framework/drivers/prompt-drivers.md b/docs/griptape-framework/drivers/prompt-drivers.md index a438e985e..8be1a7c3d 100644 --- a/docs/griptape-framework/drivers/prompt-drivers.md +++ b/docs/griptape-framework/drivers/prompt-drivers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Prompt Drivers are used by Griptape Structures to make API calls to the underlying LLMs. [OpenAi Chat](#openai-chat) is the default prompt driver used in all structures. diff --git a/docs/griptape-framework/drivers/sql-drivers.md b/docs/griptape-framework/drivers/sql-drivers.md index c0f8e9f99..2ca249fec 100644 --- a/docs/griptape-framework/drivers/sql-drivers.md +++ b/docs/griptape-framework/drivers/sql-drivers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview SQL drivers can be used to make SQL queries and load table schemas. They are used by the [SqlLoader](../../reference/griptape/loaders/sql_loader.md) to process data. All loaders implement the following methods: diff --git a/docs/griptape-framework/drivers/structure-run-drivers.md b/docs/griptape-framework/drivers/structure-run-drivers.md index bba3de524..5916d6e20 100644 --- a/docs/griptape-framework/drivers/structure-run-drivers.md +++ b/docs/griptape-framework/drivers/structure-run-drivers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Structure Run Drivers can be used to run Griptape Structures in a variety of runtime environments. When combined with the [Structure Run Task](../../griptape-framework/structures/tasks.md#structure-run-task) or [Structure Run Client](../../griptape-tools/official-tools/structure-run-client.md) you can create complex, multi-agent pipelines that span multiple runtime environments. diff --git a/docs/griptape-framework/drivers/text-to-speech-drivers.md b/docs/griptape-framework/drivers/text-to-speech-drivers.md index 5f1823fdc..0b27647ac 100644 --- a/docs/griptape-framework/drivers/text-to-speech-drivers.md +++ b/docs/griptape-framework/drivers/text-to-speech-drivers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview [Text to Speech Drivers](../../reference/griptape/drivers/text_to_speech/index.md) are used by [Text To Speech Engines](../engines/audio-engines.md) to build and execute API calls to audio generation models. diff --git a/docs/griptape-framework/drivers/vector-store-drivers.md b/docs/griptape-framework/drivers/vector-store-drivers.md index c1f54ab2e..d88e5fc33 100644 --- a/docs/griptape-framework/drivers/vector-store-drivers.md +++ b/docs/griptape-framework/drivers/vector-store-drivers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Griptape provides a way to build drivers for vector DBs where embeddings can be stored and queried. Every Vector Store Driver implements the following methods: diff --git a/docs/griptape-framework/drivers/web-scraper-drivers.md b/docs/griptape-framework/drivers/web-scraper-drivers.md index 8c05a3df2..afebe6622 100644 --- a/docs/griptape-framework/drivers/web-scraper-drivers.md +++ b/docs/griptape-framework/drivers/web-scraper-drivers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Web Scraper Drivers can be used to scrape text from the web. They are used by [WebLoader](../../reference/griptape/loaders/web_loader.md) to provide its functionality. All Web Scraper Drivers implement the following methods: diff --git a/docs/griptape-framework/drivers/web-search-drivers.md b/docs/griptape-framework/drivers/web-search-drivers.md index b06c8d0a5..4b8692214 100644 --- a/docs/griptape-framework/drivers/web-search-drivers.md +++ b/docs/griptape-framework/drivers/web-search-drivers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Web Search Drivers can be used to search for links from a search query. They are used by [WebSearch](../../reference/griptape/tools/web_search/tool.md) to provide its functionality. All Web Search Drivers implement the following methods: diff --git a/docs/griptape-framework/engines/audio-engines.md b/docs/griptape-framework/engines/audio-engines.md index 6494d5365..e857bf77b 100644 --- a/docs/griptape-framework/engines/audio-engines.md +++ b/docs/griptape-framework/engines/audio-engines.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview [Audio Generation Engines](../../reference/griptape/engines/audio/index.md) facilitate audio generation. Audio Generation Engines provides a `run` method that accepts the necessary inputs for its particular mode and provides the request to the configured [Driver](../drivers/text-to-speech-drivers.md). diff --git a/docs/griptape-framework/engines/extraction-engines.md b/docs/griptape-framework/engines/extraction-engines.md index 101f81ba8..496560968 100644 --- a/docs/griptape-framework/engines/extraction-engines.md +++ b/docs/griptape-framework/engines/extraction-engines.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Extraction Engines in Griptape facilitate the extraction of data from text formats such as CSV and JSON. These engines play a crucial role in the functionality of [Extraction Tasks](../../griptape-framework/structures/tasks.md). diff --git a/docs/griptape-framework/engines/image-generation-engines.md b/docs/griptape-framework/engines/image-generation-engines.md index 9d38fd197..600600060 100644 --- a/docs/griptape-framework/engines/image-generation-engines.md +++ b/docs/griptape-framework/engines/image-generation-engines.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview [Image Generation Engines](../../reference/griptape/engines/image/index.md) facilitate text-to-image and image-to-image generation. Each Engine provides a `run` method that accepts the necessary inputs for its particular mode and provides the request to the configured [Driver](../drivers/image-generation-drivers.md). diff --git a/docs/griptape-framework/engines/image-query-engines.md b/docs/griptape-framework/engines/image-query-engines.md index def6cbd5d..1db247cb7 100644 --- a/docs/griptape-framework/engines/image-query-engines.md +++ b/docs/griptape-framework/engines/image-query-engines.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Image Query Engines The [Image Query Engine](../../reference/griptape/engines/image_query/image_query_engine.md) allows you to perform natural language queries on the contents of images. You can specify the provider and model used to query the image by providing the Engine with a particular [Image Query Driver](../drivers/image-query-drivers.md). diff --git a/docs/griptape-framework/engines/rag-engines.md b/docs/griptape-framework/engines/rag-engines.md index 9d71aaa80..dc09d6de9 100644 --- a/docs/griptape-framework/engines/rag-engines.md +++ b/docs/griptape-framework/engines/rag-engines.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## RAG Engines !!! note @@ -69,4 +74,4 @@ engine = RagEngine( print( engine.process_query("what are Griptape agents?").output.to_text() ) -``` \ No newline at end of file +``` diff --git a/docs/griptape-framework/engines/summary-engines.md b/docs/griptape-framework/engines/summary-engines.md index e6960c0fb..d699a2283 100644 --- a/docs/griptape-framework/engines/summary-engines.md +++ b/docs/griptape-framework/engines/summary-engines.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Summary engines are used to summarize text and collections of [TextArtifact](../../reference/griptape/artifacts/text_artifact.md)s. diff --git a/docs/griptape-framework/misc/events.md b/docs/griptape-framework/misc/events.md index dff54ec4e..1f50fd6d0 100644 --- a/docs/griptape-framework/misc/events.md +++ b/docs/griptape-framework/misc/events.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview You can use [EventListener](../../reference/griptape/events/event_listener.md)s to listen for events during a Structure's execution. diff --git a/docs/griptape-framework/misc/tokenizers.md b/docs/griptape-framework/misc/tokenizers.md index a6df1c388..1211987a9 100644 --- a/docs/griptape-framework/misc/tokenizers.md +++ b/docs/griptape-framework/misc/tokenizers.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Tokenizers are used throughout Griptape to calculate the number of [tokens](https://learn.microsoft.com/en-us/semantic-kernel/prompt-engineering/tokens) in a piece of text. diff --git a/docs/griptape-framework/structures/agents.md b/docs/griptape-framework/structures/agents.md index 581e72082..33363198f 100644 --- a/docs/griptape-framework/structures/agents.md +++ b/docs/griptape-framework/structures/agents.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview An [Agent](../../reference/griptape/structures/agent.md) is the quickest way to get started with Griptape. diff --git a/docs/griptape-framework/structures/config.md b/docs/griptape-framework/structures/config.md index ef4bc4864..3f510eb86 100644 --- a/docs/griptape-framework/structures/config.md +++ b/docs/griptape-framework/structures/config.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview The [StructureConfig](../../reference/griptape/config/structure_config.md) class allows for the customization of Structures within Griptape, enabling specific settings such as Drivers to be defined for Tasks. diff --git a/docs/griptape-framework/structures/conversation-memory.md b/docs/griptape-framework/structures/conversation-memory.md index 1707a2ad9..19d79c702 100644 --- a/docs/griptape-framework/structures/conversation-memory.md +++ b/docs/griptape-framework/structures/conversation-memory.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview You can use Conversation Memory to give Griptape Structures the ability to keep track of the conversation across runs. All structures are created with [ConversationMemory](../../reference/griptape/memory/structure/conversation_memory.md) by default. diff --git a/docs/griptape-framework/structures/observability.md b/docs/griptape-framework/structures/observability.md index 5a9e9c51c..69af849e6 100644 --- a/docs/griptape-framework/structures/observability.md +++ b/docs/griptape-framework/structures/observability.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview The [Observability](../../reference/griptape/observability/observability.md) context manager sends telemetry (metrics and traces) for all functions and methods annotated with the `@observable` decorator to a destination of your choice. This is useful for monitoring and debugging your application. @@ -54,4 +59,4 @@ observability_driver = GriptapeCloudObservabilityDriver() with Observability(observability_driver=observability_driver): my_function() MyClass().my_method() -``` \ No newline at end of file +``` diff --git a/docs/griptape-framework/structures/pipelines.md b/docs/griptape-framework/structures/pipelines.md index dcf549995..4753ad52d 100644 --- a/docs/griptape-framework/structures/pipelines.md +++ b/docs/griptape-framework/structures/pipelines.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview A [Pipeline](../../reference/griptape/structures/pipeline.md) is very similar to an [Agent](../../reference/griptape/structures/agent.md), but allows for multiple tasks. diff --git a/docs/griptape-framework/structures/rulesets.md b/docs/griptape-framework/structures/rulesets.md index f245579b7..324973b71 100644 --- a/docs/griptape-framework/structures/rulesets.md +++ b/docs/griptape-framework/structures/rulesets.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview A [Ruleset](../../reference/griptape/rules/ruleset.md) can be used to define rules for [Structures](../structures/agents.md) and [Tasks](../structures/tasks.md). diff --git a/docs/griptape-framework/structures/task-memory.md b/docs/griptape-framework/structures/task-memory.md index 24f0c6363..ea4a787f6 100644 --- a/docs/griptape-framework/structures/task-memory.md +++ b/docs/griptape-framework/structures/task-memory.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview Task Memory is a powerful feature of Griptape that allows you to control where the data returned by [Tools](../tools/index.md) is stored. This is useful in the following scenarios: diff --git a/docs/griptape-framework/structures/tasks.md b/docs/griptape-framework/structures/tasks.md index ff5f7e5e4..6d479578b 100644 --- a/docs/griptape-framework/structures/tasks.md +++ b/docs/griptape-framework/structures/tasks.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview A [Task](../../reference/griptape/tasks/index.md) is a purpose-built abstraction for the Large Language Model (LLM). Griptape offers various types of Tasks, each suitable for specific use cases. diff --git a/docs/griptape-framework/structures/workflows.md b/docs/griptape-framework/structures/workflows.md index 9490ca1c4..55014796e 100644 --- a/docs/griptape-framework/structures/workflows.md +++ b/docs/griptape-framework/structures/workflows.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview A [Workflow](../../reference/griptape/structures/workflow.md) is a non-sequential DAG that can be used for complex concurrent scenarios with tasks having multiple inputs. diff --git a/docs/griptape-framework/tools/index.md b/docs/griptape-framework/tools/index.md index fecfd6cd7..15be7be3c 100644 --- a/docs/griptape-framework/tools/index.md +++ b/docs/griptape-framework/tools/index.md @@ -1,3 +1,8 @@ +--- +search: + boost: 2 +--- + ## Overview One of the most powerful features of Griptape is the ability to use tools that can interact with the outside world. diff --git a/mkdocs.yml b/mkdocs.yml index 5c603e4d6..911301f4e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -89,6 +89,7 @@ nav: - Conversation Memory: "griptape-framework/structures/conversation-memory.md" - Rulesets: "griptape-framework/structures/rulesets.md" - Config: "griptape-framework/structures/config.md" + - Observability: "griptape-framework/structures/observability.md" - Tools: - Overview: "griptape-framework/tools/index.md" - Building Custom Tools: "griptape-tools/custom-tools/index.md" @@ -113,6 +114,7 @@ nav: - Text to Speech Drivers: "griptape-framework/drivers/text-to-speech-drivers.md" - Audio Transcription Drivers: "griptape-framework/drivers/audio-transcription-drivers.md" - Web Search Drivers: "griptape-framework/drivers/web-search-drivers.md" + - Observability Drivers: "griptape-framework/drivers/observability-drivers.md" - Data: - Overview: "griptape-framework/data/index.md" - Artifacts: "griptape-framework/data/artifacts.md"