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

Adding initial cloud Structure docs #1036

Closed
wants to merge 213 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
213 commits
Select commit Hold shift + click to select a range
8e04019
Feature/query engine improvements (#713)
collindutter Mar 29, 2024
d05fb3c
Cjkindel/api keys (#721)
cjkindel Apr 1, 2024
44dd2b8
Merge patch v0.24.1 back to dev (#720)
andrewfrench Apr 1, 2024
7582cf8
Improve Tool Task system prompt (#723)
collindutter Apr 1, 2024
76e7177
Output single artifact, move value to name (#724)
collindutter Apr 2, 2024
af48466
Add minItems to ToolkitTask actions schema (#725)
collindutter Apr 2, 2024
b1aaab5
Add FileManager.list_files_from_disk (#726)
vasinov Apr 2, 2024
f8a7b69
Update default API version for `AzureOpenAiImageGenerationDriver` (#731)
vachillo Apr 3, 2024
ef764c9
Improve readme (#727)
collindutter Apr 5, 2024
44b0653
Backmerge `main` to `dev` for v0.24.2 (#733)
andrewfrench Apr 8, 2024
c9edaff
Remove file reading responsibility from loaders (#737)
dylanholmes Apr 9, 2024
c403954
Feature/event listener drivers (#735)
collindutter Apr 10, 2024
f4b2af7
Fix trailing slash (#740)
collindutter Apr 10, 2024
3cac561
Add LocalFileManagerDriver (#738)
dylanholmes Apr 11, 2024
fa2f337
Add new fields to events (#742)
collindutter Apr 11, 2024
fe53d86
Remove boto3 from types (#741)
collindutter Apr 11, 2024
2cc293c
Add AmazonS3FileManagerDriver (#743)
dylanholmes Apr 12, 2024
54ef8fb
Add MediaArtifact (#520)
andrewfrench Apr 12, 2024
ed08311
Add docs to repo (#744)
collindutter Apr 16, 2024
fe9abf9
Add missing readthedocs poetry setup (#748)
collindutter Apr 16, 2024
b944728
Remove references to old docs repo (#749)
collindutter Apr 16, 2024
77ba1a7
Fix type hint for token_provider, Add missing params in `AzureOpenAiC…
vachillo Apr 17, 2024
e16f729
Add optional exception attribute to ErrorArtifact (#747)
michal-repo Apr 17, 2024
16305a0
Edit events route in GriptapeCloudEventListenerDriver (#753)
dylanholmes Apr 19, 2024
f16f421
Feature/conversation memory (#751)
collindutter Apr 23, 2024
670616f
Pull cloud url from env var (#756)
collindutter Apr 23, 2024
30d3e29
Rename GT Cloud run ID env var (#758)
zachgiordano Apr 25, 2024
f2ac9ca
Fix vector query engine exceeding token limits (#759)
collindutter Apr 26, 2024
9aa2f02
Add cloud docs API Reference (#760)
zachgiordano Apr 29, 2024
5c93b4e
Add file utils (#745)
collindutter Apr 29, 2024
c009e53
Update api-reference.md (#761)
eltociear Apr 29, 2024
88520d8
Add note to changelog regarding stability v0 deprecation (#762)
collindutter Apr 29, 2024
df8b42b
Update to pinecone@3 (#763)
collindutter Apr 30, 2024
a33324b
Add structure run tool (#764)
zachgiordano Apr 30, 2024
40735bb
Export GriptapeCloudStructureRunClient in tools __all__ (#766)
zachgiordano May 1, 2024
b2f1323
Update structure run tool example docs (#769)
zachgiordano May 2, 2024
333b4d5
Feature/better events (#768)
collindutter May 3, 2024
8584f0d
Fix docs for extras (#770)
collindutter May 3, 2024
0c87ea2
Add structure run tool/task (#767)
collindutter May 6, 2024
57a4a29
Merge branch 'main' into dev
collindutter May 6, 2024
73cc9a8
Use factory in example (#772)
collindutter May 6, 2024
a899f5a
Merge branch 'main' into dev
collindutter May 6, 2024
307ac2b
Support batched events (#777)
collindutter May 14, 2024
c39ad53
Add gpt-4o and update OpenAiStructureConfig default prompt_driver (#780)
zachgiordano May 14, 2024
6e1e84f
Update tiktoken to support GPT-4o (#783)
andrewfrench May 15, 2024
72e3022
Support case when model returns empty Actions list (#779)
andrewfrench May 15, 2024
3d4c581
Fix RedisVectorStoreDriver bugs (#782)
dylanholmes May 15, 2024
44a2c62
Text to Speech Support (#755)
andrewfrench May 15, 2024
f1a2dba
Add `RedisConversationMemoryDriver` (#787)
vachillo May 16, 2024
c9afae6
Merge main to dev (#789)
andrewfrench May 17, 2024
fcb9727
Add ruff to github code check, use local deps for pre-commit (#784)
collindutter May 17, 2024
e2f7f72
Refactor how configs work (#765)
collindutter May 20, 2024
7ed3b90
Add codecov (#794)
collindutter May 20, 2024
540e8f3
Add `AzureOpenAiStructureConfig`, default `azure_deployment` (#788)
vachillo May 20, 2024
9db5c8d
Run integration tests on push to `main` and `dev` (#795)
vachillo May 21, 2024
b0606c7
Fix hugging face prompt pipeline driver + docs (#796)
dylanholmes May 22, 2024
f7bf180
Makefile target for big install command (#797)
andrewfrench May 22, 2024
157186a
Update Makefile + process-as-code (#799)
andrewfrench May 23, 2024
7470684
Set concurrency for actions (#801)
collindutter May 23, 2024
04af7d1
Update OpenAI image query default model to GPT-4o (#802)
andrewfrench May 23, 2024
2e030bb
Fix/docs extras (#803)
collindutter May 23, 2024
3f3f8b9
Update `init=False` instances (#804)
vachillo May 24, 2024
943ce72
Use environment variables for structure runs (#808)
vachillo May 31, 2024
427df75
chore: update `attr` to `attrs` (#810)
vachillo May 31, 2024
5a0e1c3
Refactor tasks to use ListArtifact as input (#811)
collindutter May 31, 2024
9f78733
Fix type (#813)
collindutter May 31, 2024
9f19f60
Default `off_prompt=False` on `BaseTool` (#757)
collindutter Jun 3, 2024
81ec3b6
Update openai example to use gpt-4o (#817)
collindutter Jun 3, 2024
385cb62
Fix doc examples (#819)
collindutter Jun 3, 2024
ff008c0
Audio transcription support (#781)
andrewfrench Jun 4, 2024
1b1accc
Feature/pusher event driver (#821)
kyleroche Jun 4, 2024
c6cceda
Fix computer tool (#820)
collindutter Jun 4, 2024
7fe0f7d
Don't exlude extra fields (#825)
collindutter Jun 4, 2024
dc9e585
Add support for Llama 3 on Amazon SageMaker (#800)
dylanholmes Jun 4, 2024
1865b64
Fix integ tests (#827)
collindutter Jun 4, 2024
0fade64
Fix out of space issue during integration tests (#828)
collindutter Jun 4, 2024
23018b8
adding docs for griptape-cloud-knowledge-base-client (#824)
emjay07 Jun 4, 2024
3bd2adf
Merge branch 'main' into dev
collindutter Jun 4, 2024
21c17b5
Ignore computer tool due to out of space issues (#830)
collindutter Jun 4, 2024
1042211
Merge branch 'main' into dev
collindutter Jun 4, 2024
a7f83b3
Updated `HuggingFaceHubPromptDriver` to use `transformers`'s `apply_c…
collindutter Jun 5, 2024
7025db8
Updated `HuggingFacePipelinePromptDriver` to use chat features of `tr…
collindutter Jun 5, 2024
8630317
Add task relationship APIs (#822)
dylanholmes Jun 5, 2024
7a137e1
Update cohere prompt driver, add cohere embedding driver, cohere stru…
collindutter Jun 5, 2024
e167885
Update BedrockPromptDriver to use Converse API (#834)
collindutter Jun 5, 2024
8d6de30
Remove un-used header extraction (#838)
collindutter Jun 6, 2024
4e1f3b0
Remove Legacy `OpenAiChatCompletionPromptDriver` (#835)
collindutter Jun 6, 2024
30aa370
Improve error when knowledgebase is missing a description (#839)
collindutter Jun 6, 2024
5e2e1a1
Remove old tokenizer docs (#841)
collindutter Jun 7, 2024
839ffb8
Correctly Ignore TYPE_CHECKING in coverage (#845)
collindutter Jun 7, 2024
029a65d
Reduce scope of Amazon SageMaker Prompt Driver to only Jumpstart (#837)
collindutter Jun 7, 2024
fc9c976
Update `GriptapeCloudKnowledgeBaseClient` description fetching (#846)
vachillo Jun 10, 2024
9c0d368
Fix streaming not working when using deprecated Structure.stream fiel…
collindutter Jun 10, 2024
b466356
Add StructureVisualizer util (#844)
collindutter Jun 11, 2024
75c502f
Add new Workflow/Task helper methods (#842)
collindutter Jun 11, 2024
331c331
Refactor/tokenizers (#840)
collindutter Jun 11, 2024
331c643
adding a link out to sample repo for multi-agents hosted in gtc (#850)
emjay07 Jun 11, 2024
ff6ddfd
Fix `ActionSubtask` output value (#853)
vachillo Jun 11, 2024
b634598
Fix/standardize all links, enable docs strict mode (#852)
collindutter Jun 12, 2024
71c8d4d
Fix header indents (#855)
collindutter Jun 12, 2024
bfd7896
Re-order Workflow tasks on every task execution wave (#857)
cjkindel Jun 12, 2024
7c36226
Handle errors in web loader and return ErrorArtifact (#858)
zachgiordano Jun 13, 2024
e54a04b
Add structure property `output`; add `output_task.output` check (#862)
vachillo Jun 13, 2024
9b934ee
Fix `WebSearch.search` output (#854)
vachillo Jun 13, 2024
5fe8c63
Reset Tasks and set Structure args before run (#865)
collindutter Jun 14, 2024
76f5594
Split `PromptSummaryEngine` prompt stack template (#866)
vachillo Jun 14, 2024
f2342e6
Small improvements to Audio tasks/tools (#843)
andrewfrench Jun 17, 2024
53ca5b1
Validate `max_tokens`, fix tests (#868)
vachillo Jun 18, 2024
6ceadf6
Add 'self.order_tasks()' before getting 'output_task' (#873)
vachillo Jun 18, 2024
3a203ed
Feature/ollama (#847)
collindutter Jun 18, 2024
0f196f5
Add insert_tasks example (#877)
dylanholmes Jun 18, 2024
68d9dae
Don't include "v" in tag name (#879)
collindutter Jun 19, 2024
6ce2615
Merge branch 'main' into dev
collindutter Jun 19, 2024
28a8a14
Update `WebSearch` to use a driver; add drivers for Google and DuckDu…
vachillo Jun 19, 2024
73c1d51
Fix/drivers headers (#881)
collindutter Jun 19, 2024
ab82f3c
Add `ProxyWebScraperDriver` (#886)
vachillo Jun 21, 2024
cff3f79
Update `AmazonBedrockStructureConfig` with helper params (#882)
vachillo Jun 21, 2024
d5d7544
Merge branch 'main' into dev
collindutter Jun 21, 2024
535380c
Replace `VectorQueryEngine` with `RagEngine` (#860)
vasinov Jun 21, 2024
095d12f
Change GriptapeCloudKnowledgeBaseClient to use /search API (#888)
cjkindel Jun 24, 2024
9010fdc
`meta` parameter added to TextArtifact (#891)
cjkindel Jun 24, 2024
c2575f5
Handle error on vector entry not existing (#893)
cjkindel Jun 25, 2024
2df58d5
Bumping gemini to latest version (#892)
emjay07 Jun 25, 2024
80c27cb
VectorStoreClient improvements (#899)
vasinov Jun 25, 2024
22981b1
Wrap future execution with context managers (#898)
vasinov Jun 25, 2024
2a347f3
Bug Fix: Cohere prompts with no history (#900)
emjay07 Jun 25, 2024
6d08c20
Fix `StructureVisualizer.to_url()` (#903)
vachillo Jun 27, 2024
ef07002
Add `fail_fast` parameter to `Structure` (#908)
vachillo Jun 27, 2024
3858cdc
fixing bug for upserting csv artifacts (#909)
emjay07 Jun 27, 2024
b93f209
All `futures_executor` fields renamed to `futures_executor_fn` and no…
vasinov Jun 27, 2024
3ee8c35
Add `BooleanArtifact` (#905)
vachillo Jun 28, 2024
becdc1d
Add pull request template (#921)
collindutter Jul 1, 2024
1cd5588
Fix missing parent error handling in Workflow task insertion (#856)
cjkindel Jul 1, 2024
f8be8ee
Ensure Executor.shutdown() called after task submission in BaseEventL…
dylanholmes Jul 1, 2024
db9051d
`typos` to dev dependencies to catch typos in code/docs. (#923)
collindutter Jul 2, 2024
2dcfe2d
Refactor prompt stack (#861)
collindutter Jul 2, 2024
cfb6e9f
Merge branch 'main' into dev
collindutter Jul 2, 2024
07e2a1c
Add support for Qdrant VectorDB (#928)
vachillo Jul 2, 2024
ef46d1e
Update contributing guidelines (#927)
collindutter Jul 2, 2024
7487441
Fix integration tests; Update `PromptTask` input validation (#931)
vachillo Jul 2, 2024
de2315c
Bump pydantic,urllib3,requests (#933)
vachillo Jul 3, 2024
89b69bc
Use custom discord invite link (#932)
cjkindel Jul 3, 2024
1f09acb
`RagContext` and other `RagEngine` improvements (#930)
vasinov Jul 3, 2024
83a16ac
Update `StructureVisualizer` (#936)
vachillo Jul 3, 2024
d6cf531
Update pyright, fix new pyright errors (#934)
collindutter Jul 3, 2024
c16f3f4
Fix changelog (#938)
collindutter Jul 3, 2024
c785aba
DynamoDB sort key (#917)
datashaman Jul 5, 2024
3e5bd03
Update ruff linter rules according to documentation (#940)
collindutter Jul 5, 2024
731c3bb
`FootnotePromptResponseRagModule`, `TextLoaderRetrievalRagModule`, an…
vasinov Jul 8, 2024
bb158ea
Update certifi (#944)
zachgiordano Jul 8, 2024
c9b92ea
Fix azure streaming (#946)
collindutter Jul 9, 2024
01792c0
Merge branch 'main' into dev
collindutter Jul 9, 2024
4ef133f
Remove duplicate info from changelog (#952)
cjkindel Jul 10, 2024
c20617a
Add Ollama Embedding Driver (#953)
collindutter Jul 10, 2024
d987f1a
Merge branch 'main' into dev
collindutter Jul 10, 2024
8fa35a5
Feature/native functions (#867)
collindutter Jul 10, 2024
0389725
Enable flake8 type check (#960)
collindutter Jul 11, 2024
160a4ef
Enable ruff pydocstyle rules (#959)
collindutter Jul 11, 2024
2056f0e
Add ruff rule for complex code paths (#951)
collindutter Jul 11, 2024
627081e
Add docs for OpenAI compatible services (#962)
collindutter Jul 11, 2024
023f0a9
Merge branch 'main' into dev
collindutter Jul 11, 2024
be9ce34
Native Tool Fixes (#963)
collindutter Jul 11, 2024
afb8cea
Catch tool errors (#965)
collindutter Jul 12, 2024
fe1e991
Add isort ruff rule (#967)
collindutter Jul 12, 2024
9fb4dd9
GriptapeCloudVectorStoreDriver (#885)
cjkindel Jul 12, 2024
3bf5876
Add ruff rule for pygrep-hooks (#966)
collindutter Jul 12, 2024
b8f1128
Merge branch 'main' into dev
collindutter Jul 12, 2024
0a8e178
Fix: Qdrant query count not optional (#972)
cjkindel Jul 13, 2024
e4f8d6f
Add flake8-future-annotations ruff rule (#973)
collindutter Jul 15, 2024
5edfae9
Add flake8-commas ruff rule (#974)
collindutter Jul 15, 2024
9371aab
Enable pycodestyle-warnings ruff rule (#978)
collindutter Jul 15, 2024
71ba852
updating docs to use 35-turbo instead of 35-turbo-16k (#980)
emjay07 Jul 15, 2024
2ee57a6
Enable flake8-comprehensions ruff rule (#977)
collindutter Jul 15, 2024
67a913b
Fully enable flake8-tidy-imports, flake8-print, mccabe (#976)
collindutter Jul 15, 2024
5c4b3a8
Add flake8-annotations ruff rule (#975)
collindutter Jul 15, 2024
b99a828
Add flake8-boolean-trap ruff rule (#985)
collindutter Jul 16, 2024
974a3cb
Run ruff on entire project (#986)
collindutter Jul 16, 2024
f514475
Fix docs header (#979)
collindutter Jul 16, 2024
71a499d
Remove unnecessary dependencies in extras (#989)
collindutter Jul 16, 2024
7c13601
Add default for GriptapeCloudEventListenerDriver.api_key (#990)
dylanholmes Jul 16, 2024
8026409
Fix Windows-specific issues (#992)
collindutter Jul 17, 2024
7d263b9
Improve native tool name check (#968)
collindutter Jul 17, 2024
33469ef
Add observability (#991)
dylanholmes Jul 17, 2024
2c86a25
Add pep8-naming ruff rule (#993)
collindutter Jul 17, 2024
362fac0
Add generic artifact (#983)
collindutter Jul 18, 2024
728ade3
Add More Ruff (#996)
collindutter Jul 18, 2024
331a36b
Fix cohere link (#994)
collindutter Jul 18, 2024
4dc5ae0
Migrate to sqlalchemy 2, make sqlalchemy an optional dependency (#1000)
collindutter Jul 18, 2024
40959cd
Datadog observability driver (#998)
cjkindel Jul 19, 2024
384c78f
Update marqo dependency (#1001)
collindutter Jul 19, 2024
3767c86
Add flake8-logging and flake8-logging-format ruff rules (#999)
collindutter Jul 22, 2024
d451653
Add era ruff rule (#1002)
collindutter Jul 22, 2024
16742ca
Docs Search Improvements (#1004)
collindutter Jul 22, 2024
929e51e
Pin all dependencies using to minor version (#1007)
collindutter Jul 23, 2024
1f690c6
Add EventsMixin (#984)
collindutter Jul 23, 2024
e0581f8
Document accessing Structure output (#1010)
collindutter Jul 23, 2024
c45d3ed
Fix Integration Tests (#1011)
collindutter Jul 23, 2024
19a1ec4
Fix/base install (#1009)
collindutter Jul 23, 2024
bd486f8
Fix/extras naming (#1008)
collindutter Jul 23, 2024
dc3d135
Add furb ruff rule (#1014)
collindutter Jul 24, 2024
535316c
Refactor CsvRowArtifact to inherit from BaseTextArtifact (#1013)
collindutter Jul 24, 2024
e1977ce
Improve performance of image generation tools (#1019)
andrewfrench Jul 25, 2024
9f9ac91
Stable Diffusion 3 local support (#1018)
andrewfrench Jul 29, 2024
a8b98a4
Fix openai function calling messages (#1026)
collindutter Jul 29, 2024
231275d
Add native function calling support to Ollama Prompt Driver (#1027)
collindutter Jul 29, 2024
c1e7f8d
Update issue template (#1029)
vachillo Jul 30, 2024
a296398
Merge branch 'main' into dev
collindutter Jul 30, 2024
47212cf
Clean Up Changelog (#1032)
collindutter Jul 30, 2024
3cb1fe7
Add DataStax Astra DB vector store driver (#1034)
collindutter Jul 31, 2024
a97ef14
Adding initial cloud Structure docs
zachgiordano Jul 31, 2024
66da467
Updated based on feedback
zachgiordano Aug 1, 2024
0fde001
Add additional param support to WebSearch (#1015)
collindutter Aug 2, 2024
f7bd273
Merge branch 'dev' into zach/cloud-structure-docs
collindutter Aug 2, 2024
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
6 changes: 1 addition & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ assignees: ''
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
A minimal, reproducible code example.

**Expected behavior**
A clear and concise description of what you expected to happen.
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docs-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ jobs:
ZENROWS_API_KEY: ${{ secrets.INTEG_ZENROWS_API_KEY }}
QDRANT_CLUSTER_ENDPOINT: ${{ secrets.INTEG_QDRANT_CLUSTER_ENDPOINT }}
QDRANT_CLUSTER_API_KEY: ${{ secrets.INTEG_QDRANT_CLUSTER_API_KEY }}
ASTRA_DB_API_ENDPOINT: ${{ secrets.INTEG_ASTRA_DB_API_ENDPOINT }}
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.INTEG_ASTRA_DB_APPLICATION_TOKEN }}
services:
postgres:
image: ankane/pgvector:v0.5.0
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Added
- `AstraDbVectorStoreDriver` to support DataStax Astra DB as a vector store.
- Ability to set custom schema properties on Tool Activities via `extra_schema_properties`.

## [0.29.0] - 2024-07-30

### Added
Expand All @@ -22,6 +26,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `@observable` decorator for selecting which functions/methods to provide observability for.
- `GenericArtifact` for storing any data.
- `BaseTextArtifact` for text-based Artifacts to subclass.
- `HuggingFacePipelineImageGenerationDriver` for generating images locally with HuggingFace pipelines.
- `BaseImageGenerationPipelineDriver` as the base class for drivers interfacing with HuggingFace image generation pipelines.
- `StableDiffusion3ImageGenerationPipelineDriver` for local text-to-image generation using a Stable Diffusion 3 pipeline.
- `StableDiffusion3Img2ImgImageGenerationPipelineDriver` for local image-to-image generation using a Stable Diffusion 3 pipeline.
- `StableDiffusion3ControlNetImageGenerationPipelineDriver` for local ControlNet image generation using a Stable Diffusion 3 pipeline.
- Optional `params` field to `WebSearch`'s `search` schema that the LLM can be steered into using.

### Changed
- **BREAKING**: `BaseVectorStoreDriver.upsert_text_artifacts` optional arguments are now keyword-only arguments.
Expand All @@ -41,6 +51,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **BREAKING**: Renamed `drivers-vector-postgresql` extra to `drivers-vector-pgvector`.
- **BREAKING**: Update `marqo` dependency to `^3.7.0`.
- **BREAKING**: Removed `drivers-sql-postgresql` extra. Use `drivers-sql` extra and install necessary drivers (i.e. `psycopg2`) separately.
- **BREAKING**: `api_key` and `search_id` are now required fields in `GoogleWebSearchDriver`.
- **BREAKING**: `web_search_driver` is now required fields in the `WebSearch` Tool.
- `GoogleWebSearchDriver` and `DuckDuckGoWebSearchDriver` now use `kwargs` passed to the `run` method.
- Removed unnecessary `sqlalchemy-redshift` dependency in `drivers-sql-amazon-redshift` extra.
- Removed unnecessary `transformers` dependency in `drivers-prompt-huggingface` extra.
- Removed unnecessary `huggingface-hub` dependency in `drivers-prompt-huggingface-pipeline` extra.
Expand Down
78 changes: 78 additions & 0 deletions docs/examples/query-webpage-astra-db.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
The following example script ingests a Web page (a blog post),
stores its chunked contents on Astra DB through the Astra DB vector store driver,
and finally runs a RAG process to answer a question specific to the topic of the
Web page.

This script requires that a vector collection has been created in the Astra database
(with name `"griptape_test_collection"` and vector dimension matching the embedding being used, i.e. 1536 in this case).

_Note:_ Besides the [Astra DB](../griptape-framework/drivers/vector-store-drivers.md#astra-db) extra,
this example requires the `drivers-web-scraper-trafilatura`
Griptape extra to be installed as well.


```python
import os

from griptape.drivers import (
AstraDbVectorStoreDriver,
OpenAiChatPromptDriver,
OpenAiEmbeddingDriver,
)
from griptape.engines.rag import RagEngine
from griptape.engines.rag.modules import (
PromptResponseRagModule,
VectorStoreRetrievalRagModule,
)
from griptape.engines.rag.stages import ResponseRagStage, RetrievalRagStage
from griptape.loaders import WebLoader
from griptape.structures import Agent
from griptape.tools import RagClient, TaskMemoryClient


namespace = "datastax_blog"
input_blogpost = (
"www.datastax.com/blog/indexing-all-of-wikipedia-on-a-laptop"
)

vector_store_driver = AstraDbVectorStoreDriver(
embedding_driver=OpenAiEmbeddingDriver(),
api_endpoint=os.environ["ASTRA_DB_API_ENDPOINT"],
token=os.environ["ASTRA_DB_APPLICATION_TOKEN"],
collection_name="griptape_test_collection",
astra_db_namespace=os.environ.get("ASTRA_DB_KEYSPACE"),
)

engine = RagEngine(
retrieval_stage=RetrievalRagStage(
retrieval_modules=[
VectorStoreRetrievalRagModule(
vector_store_driver=vector_store_driver,
query_params={
"count": 2,
"namespace": namespace,
},
)
]
),
response_stage=ResponseRagStage(
response_module=PromptResponseRagModule(
prompt_driver=OpenAiChatPromptDriver(model="gpt-4o")
)
)
)

vector_store_driver.upsert_text_artifacts(
{namespace: WebLoader(max_tokens=256).load(input_blogpost)}
)

vector_store_tool = RagClient(
description="A DataStax blog post",
rag_engine=engine,
)
agent = Agent(tools=[vector_store_tool, TaskMemoryClient(off_prompt=False)])
agent.run(
"What engine made possible to index such an amount of data, "
"and what kind of tuning was required?"
)
```
4 changes: 3 additions & 1 deletion docs/griptape-cloud/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Griptape Cloud

Griptape Cloud is a managed platform for running AI-powered agents, pipelines, and workflows.
Griptape Cloud provides managed services for your AI app stack. Deploy and scale end-to-end solutions, from LLM-powered data prep and retrieval to AI agents, pipelines and workflows.

To get started with AI Structures in the Cloud, check out the [managed-structure-template](https://github.com/griptape-ai/managed-structure-template) or deploy one of the [griptape-sample-structures](https://github.com/griptape-ai/griptape-sample-structures/tree/main).
56 changes: 56 additions & 0 deletions docs/griptape-cloud/structures/structure-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## Overview

Structure repositories require a configuration file which informs Griptape Cloud of your Managed Structure's dependencies and how it needs to build and run.

## Structure Config File Schema

The schema for the configuration file is as follows:

```yaml
version: 1.0
runtime: python3
runtime_version: 3.11
build:
pre_build_install_script: scripts/my-pre-build-install-script.sh
post_build_install_script: scripts/my-post-build-install-script.sh
requirements_file: requirements.txt
cache_build_dependencies:
enabled: false
watched_files:
- requirements.txt
- scripts/my-pre-build-install-script.sh
- scripts/my-post-build-install-script.sh
run:
main_file: structure.py
```

### Configuration Fields

#### version

The Structure Config schema version number.

#### runtime

The runtime environment to use for the Structure.

#### runtime_version

The specific version of the runtime environment for the Structure.

#### build (OPTIONAL)

The build-time configuration for the Structure.

* **pre_build_install_script** - The path to your pre_build_install_script, for running during the Structure build prior to dependency installation. This path is relative to the structure configuration file. Or absolute from the repository root if a forward slash is used: `/my-pre-build-install-script.sh`.
* **post_build_install_script** - The path to your post_build_install_script, for running during the Structure build after dependency installation. This path is relative to the structure configuration file. Or absolute from the repository root if a forward slash is used: `/my-post-build-install-script.sh`.
* **requirements_file** - The path to your Structure's requirements.txt file.
* **cache_build_dependencies** - Defines the configuration for caching build dependencies in order to speed up Deployments
* **enabled** - Defines whether the build dependency caching is on or off
* **watched_files** - Defines the particular files that will trigger cache invalidation, resulting in a full rebuild of the Structure and dependencies

#### run (REQUIRED)

The run-time configuration for the Structure.

* **main_file** - Specifies the path to the entry point file of the Managed Structure. This path is relative to the structure_config.yaml. Or absolute from the repository root if a forward slash is used: `/structure.py`.
46 changes: 46 additions & 0 deletions docs/griptape-framework/drivers/vector-store-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,3 +482,49 @@ values = [r.to_artifact().value for r in results]

print("\n\n".join(values))
```

### Astra DB

!!! info
This Driver requires the `drivers-vector-astra-db` [extra](../index.md#extras).

The AstraDbVectorStoreDriver supports [DataStax Astra DB](https://www.datastax.com/products/datastax-astra).

The following example shows how to store vector entries and query the information using the driver:

```python
import os
from griptape.drivers import AstraDbVectorStoreDriver, OpenAiEmbeddingDriver
from griptape.loaders import WebLoader

# Astra DB secrets and connection parameters
api_endpoint = os.environ["ASTRA_DB_API_ENDPOINT"]
token = os.environ["ASTRA_DB_APPLICATION_TOKEN"]
astra_db_namespace = os.environ.get("ASTRA_DB_KEYSPACE") # optional

# Initialize an Embedding Driver.
embedding_driver = OpenAiEmbeddingDriver(api_key=os.environ["OPENAI_API_KEY"])

vector_store_driver = AstraDbVectorStoreDriver(
embedding_driver=embedding_driver,
api_endpoint=api_endpoint,
token=token,
collection_name="griptape_test_collection",
astra_db_namespace=astra_db_namespace, # optional
)

# Load Artifacts from the web
artifacts = WebLoader().load("https://www.griptape.ai")

# Upsert Artifacts into the Vector Store Driver
[
vector_store_driver.upsert_text_artifact(a, namespace="griptape")
for a in artifacts
]

results = vector_store_driver.query(query="What is griptape?")

values = [r.to_artifact().value for r in results]

print("\n\n".join(values))
```
33 changes: 33 additions & 0 deletions docs/griptape-tools/official-tools/web-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,36 @@ agent.run("Tell me how photosynthesis works")
in the atmosphere and forms the basis of the food
chain.
```

Extra schema properties can be added to the Tool to allow for more customization if the Driver supports it.
In this example, we add a `sort` property to the `search` Activity which will be added as a [Google custom search query parameter](https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list).

```python
import os
import schema
from griptape.structures import Agent
from griptape.drivers import GoogleWebSearchDriver
from griptape.tools import WebSearch


agent = Agent(
tools=[
WebSearch(
web_search_driver=GoogleWebSearchDriver(
api_key=os.environ["GOOGLE_API_KEY"],
search_id=os.environ["GOOGLE_API_SEARCH_ID"],
),
extra_schema_properties={
"search": {
schema.Literal(
"sort",
description="Date range to search within. Format: date:r:YYYYMMDD:YYYYMMDD",
): str
}
},
)
],
)

agent.run("Search for articles about the history of the internet from 1990 to 2000")
```
2 changes: 2 additions & 0 deletions griptape/drivers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
from .vector.azure_mongodb_vector_store_driver import AzureMongoDbVectorStoreDriver
from .vector.dummy_vector_store_driver import DummyVectorStoreDriver
from .vector.qdrant_vector_store_driver import QdrantVectorStoreDriver
from .vector.astradb_vector_store_driver import AstraDbVectorStoreDriver
from .vector.griptape_cloud_knowledge_base_vector_store_driver import GriptapeCloudKnowledgeBaseVectorStoreDriver

from .sql.base_sql_driver import BaseSqlDriver
Expand Down Expand Up @@ -171,6 +172,7 @@
"AmazonOpenSearchVectorStoreDriver",
"PgVectorVectorStoreDriver",
"QdrantVectorStoreDriver",
"AstraDbVectorStoreDriver",
"DummyVectorStoreDriver",
"GriptapeCloudKnowledgeBaseVectorStoreDriver",
"BaseSqlDriver",
Expand Down
Loading
Loading