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

improve docs & error handling for image parts #1569

Merged
merged 5 commits into from
May 13, 2024
Merged

Conversation

lgrammel
Copy link
Collaborator

Summary

  • improve error handling for image message parts
  • improve prompt documentation page
  • add docs page for AI_InvalidDataContentError
  • minor docs improvements

@lgrammel lgrammel self-assigned this May 13, 2024
@lgrammel lgrammel merged commit 325ca55 into main May 13, 2024
6 checks passed
@lgrammel lgrammel deleted the lg/image-improvements branch May 13, 2024 16:21
@bernaferrari
Copy link

bernaferrari commented May 13, 2024

I think it could be smarter

What if you added "if str startsWith (base64) doNothing else add Base64

@lgrammel
Copy link
Collaborator Author

@bernaferrari I considered that. There are many variants of this, in particular considering other URLs. The result would be that there are many examples out there for all variants of this method, increasing the maintenance burden and hindering future changes.

{ type: 'text', text: 'Describe the image in detail.' },
{
type: 'image',
image: new URL(
Copy link
Contributor

Choose a reason for hiding this comment

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

the new URL() part was hard to find to get images to work.

Copy link
Contributor

Choose a reason for hiding this comment

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

was easier to find using github search than here 😅

Copy link

Choose a reason for hiding this comment

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

These changes that are different from openai standard that everywhere is used don't make me happy

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.

None yet

4 participants