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

[WIP] TextGrad Vision #41

Merged
merged 16 commits into from
Jul 7, 2024
Merged

[WIP] TextGrad Vision #41

merged 16 commits into from
Jul 7, 2024

Conversation

mertyg
Copy link
Member

@mertyg mertyg commented Jul 5, 2024

TextGrad vision integration! Still WIP.

  • Let's add a better example notebook
  • Let's add more docs
  • Let's zoom into image types and whether there are failure cases @vinid
  • Are we happy with how we are handling multimodal vs not? It seems brittle for now, there must be a better way than the current
def generate(self, content: Union[str, List[Union[str, bytes]]], system_prompt=None, **kwargs):
        if isinstance(content, str):
            return self._generate_text(content, system_prompt=system_prompt, **kwargs)

        elif isinstance(content, list):
            if (not self.is_multimodal):
                raise NotImplementedError("Multimodal generation is only supported for GPT-4 models.")

            return self._generate_multimodal(content, system_prompt=system_prompt, **kwargs)

@mertyg mertyg added the enhancement New feature or request label Jul 5, 2024
@mertyg mertyg requested a review from vinid July 5, 2024 00:21
@mertyg mertyg self-assigned this Jul 5, 2024
@mertyg mertyg merged commit d56d1c1 into main Jul 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants