Skip to content

Commit

Permalink
doc integ test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cjkindel committed Jul 12, 2024
1 parent 6bc8e42 commit 3165299
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions docs/griptape-framework/drivers/vector-store-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ from griptape.drivers import GriptapeCloudKnowledgeBaseVectorStoreDriver


# Initialize environment variables
gt_cloud_api_key = os.environ["GT_CLOUD_API_KEY"]
gt_cloud_knowledge_base_id = os.environ["GT_CLOUD_KNOWLEDGE_BASE_ID"]
gt_cloud_api_key = os.environ["GRIPTAPE_CLOUD_API_KEY"]
gt_cloud_knowledge_base_id = os.environ["GRIPTAPE_CLOUD_KB_ID"]

vector_store_driver = GriptapeCloudKnowledgeBaseVectorStoreDriver(api_key=gt_cloud_api_key, knowledge_base_id=gt_cloud_knowledge_base_id)

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

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

Expand Down Expand Up @@ -124,12 +124,16 @@ vector_store_driver = PineconeVectorStoreDriver(

load_data(vector_store_driver)

result = vector_store_driver.query(
results = vector_store_driver.query(
"fruit",
count=3,
filter={"price": {"$lte": 15}, "rating": {"$gte": 4}},
namespace="supermarket-products",
)

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

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

### Marqo
Expand Down Expand Up @@ -171,7 +175,7 @@ vector_store_driver.upsert_text_artifacts(
}
)

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

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

Expand Down Expand Up @@ -223,7 +227,7 @@ vector_store_driver.upsert_text_artifacts(
}
)

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

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

Expand Down Expand Up @@ -294,7 +298,7 @@ vector_store_driver.upsert_text_artifacts(
}
)

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

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

Expand Down Expand Up @@ -337,7 +341,7 @@ vector_store_driver.upsert_text_artifacts(
}
)

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

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

Expand Down Expand Up @@ -384,7 +388,7 @@ vector_store_driver.upsert_text_artifacts(
}
)

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

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

Expand Down Expand Up @@ -446,7 +450,7 @@ vector_store_driver.upsert_text_artifacts(
}
)

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

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

Expand Down Expand Up @@ -511,7 +515,7 @@ vector_store_driver.upsert_vector(
content=artifacts[0].value
)

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

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

Expand Down

0 comments on commit 3165299

Please sign in to comment.