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

Check for empty API_KEY in plist #71

Merged
merged 1 commit into from
Dec 15, 2023
Merged

Conversation

anupdsouza
Copy link
Contributor

Description of the change

Added a check for no api key value being present against the API_KEY entry in the plist.

Motivation

I ran into an issue where I was integrating the SDK within my own application. I copied the APIKey.swift enum file to my project & created the GenerativeAI-Info.plist file with an API_KEY key-value pair but forgot to copy my own api key against it in the plist. The app ran without producing any results for obvious reasons. I figured other users who merely run the Sample app may also run into the same issue wherein they forget to copy their own api key after creating it.

Type of change

Bug fix

Checklist

  • I have performed a self-review of my code.
  • I have added detailed comments to my code where applicable.
  • I have verified that my change does not break existing code.
  • My PR is based on the latest changes of the main branch (if unsure, please run git pull --rebase upstream main).
  • I am familiar with the Google Style Guide for the language I have coded in.
  • I have read through the Contributing Guide and signed the Contributor License Agreement.

Copy link

google-cla bot commented Dec 15, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@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 Dec 15, 2023
Copy link
Collaborator

@peterfriese peterfriese left a comment

Choose a reason for hiding this comment

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

Looking good, thanks for your contribution!

@paulb777 paulb777 merged commit 9cd7a28 into google-gemini:main Dec 15, 2023
9 checks passed
@github-actions github-actions bot removed the status:awaiting review PR awaiting review from a maintainer label Dec 15, 2023
enefry pushed a commit to enefry/generative-ai-swift that referenced this pull request Jan 10, 2024
* 'main' of https://github.com/google/generative-ai-swift:
  [Release] Increment `version` to `0.4.6` (google-gemini#86)
  Add image  adapters and tests (google-gemini#80)
  use explicit python3 (google-gemini#81)
  Add support for non-streaming APIs on macOS 11 (google-gemini#84)
  Support model names prefixed with "models/" (google-gemini#73)
  Increment version to 0.4.4 for release (google-gemini#74)
  Check for empty API_KEY in plist (google-gemini#71)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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