Skip to content

Add URI-based file data support #134

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Apr 19, 2024
Merged

Add URI-based file data support #134

merged 2 commits into from
Apr 19, 2024

Conversation

andrewheard
Copy link
Collaborator

@andrewheard andrewheard commented Apr 17, 2024

Added support for URI-based file data (in addition to existing support for data as inline bytes). Files may be uploaded using the media.upload REST API.

@andrewheard
Copy link
Collaborator Author

cc: @paulb777 @rlazo

@rlazo
Copy link

rlazo commented Apr 17, 2024

Added support for URI-based file data (in addition to existing support for data as inline bytes). Files may be uploaded using the media.upload REST API.

Open Questions:

  • URL or String for associated value type?

I'm ok with String unless strongly disliked

  • uri vs. url? -- uri in REST API

I'd go with uri out of consistency with the underlying api

@andrewheard
Copy link
Collaborator Author

(https://ai.google.dev/api/rest/v1beta/media/upload) REST API.

Open Questions:

  • URL or String for associated value type?

I'm ok with String unless strongly disliked

That sounds reasonable to me since it's also consistent with the underlying REST API.

  • uri vs. url? -- uri in REST API

I'd go with uri out of consistency with the underlying api

SGTM. Since the type is now String, I've added a uri: label on the associated value to avoid ambiguity.

@andrewheard andrewheard marked this pull request as ready for review April 17, 2024 19:53
@andrewheard andrewheard requested a review from paulb777 April 17, 2024 19:53
@github-actions github-actions bot added component:swift sdk Issue/PR related to Swift SDK status:awaiting review PR awaiting review from a maintainer labels Apr 17, 2024
@andrewheard andrewheard merged commit 5875e26 into main Apr 19, 2024
@andrewheard andrewheard deleted the ah/file-data branch April 19, 2024 15:55
@github-actions github-actions bot removed the status:awaiting review PR awaiting review from a maintainer label Apr 19, 2024
SsomsakTH pushed a commit to SsomsakTH/generative-ai-swift that referenced this pull request Jun 21, 2024
SsomsakTH pushed a commit to SsomsakTH/generative-ai-swift that referenced this pull request Jun 21, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
component:swift sdk Issue/PR related to Swift SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants