-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8925ac9
commit d1741e4
Showing
3 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
docs/griptape-framework/drivers/src/prompt_drivers_images.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from griptape.artifacts import ListArtifact, TextArtifact | ||
from griptape.drivers import OpenAiChatPromptDriver | ||
from griptape.loaders import ImageLoader | ||
|
||
driver = OpenAiChatPromptDriver(model="gpt-4o", max_tokens=256) | ||
|
||
image_artifact = ImageLoader().load("./tests/resources/mountain.jpg") | ||
text_artifact = TextArtifact("Describe the weather in the image") | ||
|
||
driver.run(ListArtifact([text_artifact, image_artifact])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters