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

OpenAI Vision image query functionality #625

Merged
merged 7 commits into from
Feb 13, 2024

Conversation

andrewfrench
Copy link
Member

@andrewfrench andrewfrench commented Jan 30, 2024

This PR introduces image query functionality using the OpenAI Vision model.

@andrewfrench andrewfrench changed the title Support for Image to Text workflows OpenAI Vision image query functionality Feb 6, 2024
@andrewfrench andrewfrench force-pushed the french/240130_image-to-text branch from 68193b2 to 28dc699 Compare February 7, 2024 00:56
@andrewfrench andrewfrench marked this pull request as ready for review February 7, 2024 01:00
@andrewfrench andrewfrench requested review from emjay07, collindutter and a team February 7, 2024 01:00
@collindutter collindutter force-pushed the french/240130_image-to-text branch from 9036b22 to a6e7b0d Compare February 7, 2024 17:30
Copy link
Member

@collindutter collindutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice work! Nothing major in feedback.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated
@@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `AzureMongoDbVectorStoreDriver` for using CosmosDB with MongoDB vCore API.
- `vector_path` field on `MongoDbAtlasVectorStoreDriver`.
- `LeonardoImageGenerationDriver` supports image to image generation.
- `OpenAiVisionImageQueryDriver` to support queries on images using OpenAI's Vision model.
- `ImageQueryClient` allowing an agent to make queries on images on disk or in memory.
- Image Query engine and task.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalize engine and task


@define
class ImageQueryTask(BaseTask):
image_query_engine: ImageQueryEngine = field(kw_only=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May want to merge in #591 first so that we can do something similar to this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll wait for #591 so we can do this and add the driver to the OpenAI config as well.

griptape/tasks/image_query_task.py Outdated Show resolved Hide resolved
griptape/tasks/image_query_task.py Show resolved Hide resolved
griptape/tasks/image_query_task.py Outdated Show resolved Hide resolved
griptape/tools/image_query_client/tool.py Outdated Show resolved Hide resolved
@andrewfrench andrewfrench force-pushed the french/240130_image-to-text branch from a6e7b0d to b4ce30d Compare February 8, 2024 00:38
collindutter
collindutter previously approved these changes Feb 12, 2024
Copy link
Member

@collindutter collindutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks great. Up to you whether you'd like to wait until #591 is merged in first.

emjay07
emjay07 previously approved these changes Feb 12, 2024
@collindutter
Copy link
Member

collindutter commented Feb 12, 2024

@andrewfrench #591 went in, let me know if you have any questions on how to integrate here.

@andrewfrench andrewfrench dismissed stale reviews from emjay07 and collindutter via 57fd01c February 13, 2024 17:41
@andrewfrench andrewfrench force-pushed the french/240130_image-to-text branch from 28095c5 to 57fd01c Compare February 13, 2024 17:41
griptape/config/openai_structure_config.py Outdated Show resolved Hide resolved
griptape/tasks/image_query_task.py Show resolved Hide resolved
@andrewfrench andrewfrench merged commit a5bd70e into dev Feb 13, 2024
6 checks passed
@andrewfrench andrewfrench deleted the french/240130_image-to-text branch February 13, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants