Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Add URI-based file data support#134

Merged
andrewheard merged 2 commits into
mainfrom
ah/file-data
Apr 19, 2024
Merged

Add URI-based file data support#134
andrewheard merged 2 commits into
mainfrom
ah/file-data

Conversation

@andrewheard
Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

cc: @paulb777 @rlazo

@rlazo
Copy link
Copy Markdown

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
Copy Markdown
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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