Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/drivers headers #881

Merged
merged 2 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This driver acts as a critical bridge between audio transcription Engines and th

This capability is essential for enhancing accessibility, improving content discoverability, and automating tasks that traditionally relied on manual transcription, thereby streamlining operations and enhancing efficiency across various industries.

## Audio Transcription Drivers

### OpenAI

The [OpenAI Audio Transcription Driver](../../reference/griptape/drivers/audio_transcription/openai_audio_transcription_driver.md) utilizes OpenAI's sophisticated `whisper` model to accurately transcribe spoken audio into text. This model supports multiple languages, ensuring precise transcription across a wide range of dialects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

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).

## Conversation Memory Drivers

### Local

The [LocalConversationMemoryDriver](../../reference/griptape/drivers/memory/conversation/local_conversation_memory_driver.md) allows you to persist Conversation Memory in a local JSON file.
Expand Down
2 changes: 2 additions & 0 deletions docs/griptape-framework/drivers/image-generation-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ agent = Agent(tools=[
agent.run("Generate a watercolor painting of a dog riding a skateboard")
```

## Image Generation Drivers

### Amazon Bedrock

The [Amazon Bedrock Image Generation Driver](../../reference/griptape/drivers/image_generation/amazon_bedrock_image_generation_driver.md) provides multi-model access to image generation models hosted by Amazon Bedrock. This Driver manages API calls to the Bedrock API, while the specific Model Drivers below format the API requests and parse the responses.
Expand Down
14 changes: 8 additions & 6 deletions docs/griptape-framework/drivers/image-query-drivers.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Image Query Drivers
## Overview

Image Query Drivers are used by [Image Query Engines](../engines/query-engines.md#image) 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.

!!! info
All Image Query Drivers default to a `max_tokens` of 256. It is recommended that you set this value to correspond to the desired response length.

## Anthropic
## Image Query Drivers

### Anthropic

!!! info
To tune `max_tokens`, see [Anthropic's documentation on image tokens](https://docs.anthropic.com/claude/docs/vision#image-costs) for more information on how to relate token count to response length.
Expand Down Expand Up @@ -59,7 +61,7 @@ result = engine.run("Describe the weather in the image", [image_artifact1, image
print(result)
```

## OpenAI
### OpenAI

!!! info
While the `max_tokens` field is optional, it is recommended to set this to a value that corresponds to the desired response length. Without an explicit value, the model will default to very short responses. See [OpenAI's documentation](https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them) for more information on how to relate token count to response length.
Expand All @@ -86,7 +88,7 @@ with open("tests/resources/mountain.png", "rb") as f:
engine.run("Describe the weather in the image", [image_artifact])
```

## Azure OpenAI
### Azure OpenAI

!!! info
In order to use the `gpt-4-vision-preview` model on Azure OpenAI, the `gpt-4` model must be deployed with the version set to `vision-preview`. More information can be found in the [Azure OpenAI documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/gpt-with-vision).
Expand Down Expand Up @@ -117,11 +119,11 @@ with open("tests/resources/mountain.png", "rb") as f:
engine.run("Describe the weather in the image", [image_artifact])
```

## Amazon Bedrock
### Amazon Bedrock

The [Amazon Bedrock Image Query Driver](../../reference/griptape/drivers/image_query/amazon_bedrock_image_query_driver.md) provides multi-model access to image query models hosted by Amazon Bedrock. This Driver manages API calls to the Bedrock API, while the specific Model Drivers below format the API requests and parse the responses.

### Claude
#### Claude

The [BedrockClaudeImageQueryModelDriver](../../reference/griptape/drivers/image_query_model/bedrock_claude_image_query_model_driver.md) provides support for Claude models hosted by Bedrock.

Expand Down
8 changes: 5 additions & 3 deletions docs/griptape-framework/drivers/sql-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ SQL drivers can be used to make SQL queries and load table schemas. They are use
!!! info
More database-specific SQL drivers are coming soon.

## SQL
## SQL Drivers

### SQL

This is a basic SQL loader based on [SQLAlchemy 1.x](https://docs.sqlalchemy.org/en/14/). Here is an example of how to use it:

Expand All @@ -22,7 +24,7 @@ driver = SqlDriver(
driver.execute_query("select 'foo', 'bar';")
```

## Amazon Redshift
### Amazon Redshift

!!! info
This driver requires the `drivers-sql-redshift` [extra](../index.md#extras).
Expand All @@ -46,7 +48,7 @@ driver = AmazonRedshiftSqlDriver(
driver.execute_query("select * from people;")
```

## Snowflake
### Snowflake

!!! info
This driver requires the `drivers-sql-snowflake` [extra](../index.md#extras).
Expand Down
6 changes: 4 additions & 2 deletions docs/griptape-framework/drivers/structure-run-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
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.

## Local
## Structure Run Drivers

### Local

The [LocalStructureRunDriver](../../reference/griptape/drivers/structure_run/local_structure_run_driver.md) is used to run Griptape Structures in the same runtime environment as the code that is running the Structure.

Expand Down Expand Up @@ -53,7 +55,7 @@ joke_coordinator = Pipeline(
joke_coordinator.run("Tell me a joke")
```

## Griptape Cloud
### Griptape Cloud

The [GriptapeCloudStructureRunDriver](../../reference/griptape/drivers/structure_run/griptape_cloud_structure_run_driver.md) is used to run Griptape Structures in the Griptape Cloud.

Expand Down
2 changes: 2 additions & 0 deletions docs/griptape-framework/drivers/text-to-speech-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Provide a Driver when building an [Engine](../engines/audio-engines.md), then pass it to a [Tool](../tools/index.md) for use by an [Agent](../structures/agents.md):

## Text to Speech Drivers

### Eleven Labs

The [Eleven Labs Text to Speech Driver](../../reference/griptape/drivers/text_to_speech/elevenlabs_text_to_speech_driver.md) provides support for text-to-speech models hosted by Eleven Labs. This Driver supports configurations specific to Eleven Labs, like voice selection and output format.
Expand Down
18 changes: 10 additions & 8 deletions docs/griptape-framework/drivers/vector-store-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ Each vector driver takes a [BaseEmbeddingDriver](../../reference/griptape/driver
!!! info
More vector drivers are coming soon.

## Local
## Vector Store Drivers

### Local

The [LocalVectorStoreDriver](../../reference/griptape/drivers/vector/local_vector_store_driver.md) can be used to load and query data from memory. Here is a complete example of how the driver can be used to load a webpage into the driver and query it later:

Expand Down Expand Up @@ -47,7 +49,7 @@ print("\n\n".join(values))

```

## Pinecone
### Pinecone

!!! info
This driver requires the `drivers-vector-pinecone` [extra](../index.md#extras).
Expand Down Expand Up @@ -103,7 +105,7 @@ result = vector_store_driver.query(
)
```

## Marqo
### Marqo

!!! info
This driver requires the `drivers-vector-marqo` [extra](../index.md#extras).
Expand Down Expand Up @@ -157,7 +159,7 @@ result = vector_store.query(query="What is griptape?")
print(result)
```

## Mongodb Atlas
### Mongodb Atlas

!!! info
This driver requires the `drivers-vector-mongodb` [extra](../index.md#extras).
Expand Down Expand Up @@ -225,7 +227,7 @@ The format for creating a vector index should look similar to the following:
```
Replace `path_to_vector` with the expected field name where the vector content will be.

## Azure MongoDB
### Azure MongoDB

!!! info
This driver requires the `drivers-vector-mongodb` [extra](../index.md#extras).
Expand Down Expand Up @@ -274,7 +276,7 @@ result = vector_store.query(query="What is griptape?")
print(result)
```

## Redis
### Redis

!!! info
This driver requires the `drivers-vector-redis` [extra](../index.md#extras).
Expand Down Expand Up @@ -319,7 +321,7 @@ The format for creating a vector index should be similar to the following:
FT.CREATE idx:griptape ON hash PREFIX 1 "griptape:" SCHEMA namespace TAG vector VECTOR FLAT 6 TYPE FLOAT32 DIM 1536 DISTANCE_METRIC COSINE
```

## OpenSearch
### OpenSearch

!!! info
This driver requires the `drivers-vector-opensearch` [extra](../index.md#extras).
Expand Down Expand Up @@ -372,7 +374,7 @@ The body mappings for creating a vector index should look similar to the followi
}
```

## PGVector
### PGVector

!!! info
This driver requires the `drivers-vector-postgresql` [extra](../index.md#extras).
Expand Down
6 changes: 4 additions & 2 deletions docs/griptape-framework/drivers/web-scraper-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Web Scraper Drivers can be used to scrape text from the web. They are used by [W

* `scrape_url()` scrapes text from a website and returns a [TextArtifact](../../reference/griptape/artifacts/text_artifact.md). The format of the scrapped text is determined by the Driver.

## Markdownify
## Web Scraper Drivers

### Markdownify

!!! info
This driver requires the `drivers-web-scraper-markdownify` [extra](../index.md#extras) and the
Expand Down Expand Up @@ -64,7 +66,7 @@ agent = Agent(
agent.run("List all email addresses on griptape.ai in a flat numbered markdown list.")
```

## Trafilatura
### Trafilatura

!!! info
This driver requires the `drivers-web-scraper-trafilatura` [extra](../index.md#extras).
Expand Down
2 changes: 1 addition & 1 deletion docs/griptape-framework/engines/summary-engines.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Summary engines are used to summarize text and collections of [TextArtifact](../

## Prompt

Used to summarize texts with LLMs. You can set a custom [prompt_driver](../../reference/griptape/engines/summary/prompt_summary_engine.md#griptape.engines.summary.prompt_summary_engine.PromptSummaryEngine.prompt_driver), [template_generator](../../reference/griptape/engines/summary/prompt_summary_engine.md#griptape.engines.summary.prompt_summary_engine.PromptSummaryEngine.template_generator), and [chunker](../../reference/griptape/engines/summary/prompt_summary_engine.md#griptape.engines.summary.prompt_summary_engine.PromptSummaryEngine.chunker).
Used to summarize texts with LLMs. You can set a custom [prompt_driver](../../reference/griptape/engines/summary/prompt_summary_engine.md#griptape.engines.summary.prompt_summary_engine.PromptSummaryEngine.prompt_driver), [system_template_generator](../../reference/griptape/engines/summary/prompt_summary_engine.md#griptape.engines.summary.prompt_summary_engine.PromptSummaryEngine.system_template_generator), [user_template_generator](../../reference/griptape/engines/summary/prompt_summary_engine.md#griptape.engines.summary.prompt_summary_engine.PromptSummaryEngine.user_template_generator), and [chunker](../../reference/griptape/engines/summary/prompt_summary_engine.md#griptape.engines.summary.prompt_summary_engine.PromptSummaryEngine.chunker).

Use the [summarize_artifacts](../../reference/griptape/engines/summary/prompt_summary_engine.md#griptape.engines.summary.prompt_summary_engine.PromptSummaryEngine.summarize_artifacts) method to summarize a list of artifacts or [summarize_text](../../reference/griptape/engines/summary/base_summary_engine.md#griptape.engines.summary.base_summary_engine.BaseSummaryEngine.summarize_text) to summarize an arbitrary string.

Expand Down
Loading