Skip to content

Commit

Permalink
Add caution note to READMEs (#133)
Browse files Browse the repository at this point in the history
Add a note warning against leaking API keys with billing enabled in
client side applications.
Add to both the top-level README for this repository, as well as the
README published with the package and rendered on the pub site.

Drop `-wip` suffix from version to prepare for publish.
  • Loading branch information
natebosch authored Apr 26, 2024
1 parent 7002664 commit c8ad2ea
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
The Google Generative AI SDK for Dart allows developers to use state-of-the-art
Large Language Models (LLMs) to build language applications.

> [!CAUTION]
> **Using the Google AI SDK for Dart (Flutter) to call the Google AI Gemini API
> directly from your app is recommended for prototyping only.** If you plan to
> enable billing, we strongly recommend that you use the SDK to call the Google
> AI Gemini API only server-side to keep your API key safe. You risk potentially
> exposing your API key to malicious actors if you embed your API key directly
> in your mobile or web app or fetch it remotely at runtime.
## Getting Started

### API keys
Expand Down
3 changes: 2 additions & 1 deletion pkgs/google_generative_ai/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.3.2-wip
## 0.3.2

- Use API version `v1beta` by default.
- Add note to README warning about leaking API keys.

## 0.3.1

Expand Down
8 changes: 8 additions & 0 deletions pkgs/google_generative_ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ applications. This SDK supports use cases like:
- Build multi-turn conversations (chat)
- Embedding

> [!CAUTION]
> **Using the Google AI SDK for Dart (Flutter) to call the Google AI Gemini API
> directly from your app is recommended for prototyping only.** If you plan to
> enable billing, we strongly recommend that you use the SDK to call the Google
> AI Gemini API only server-side to keep your API key safe. You risk potentially
> exposing your API key to malicious actors if you embed your API key directly
> in your mobile or web app or fetch it remotely at runtime.
## Getting started

### Get an API key
Expand Down
2 changes: 1 addition & 1 deletion pkgs/google_generative_ai/lib/src/version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.

const packageVersion = '0.3.2-wip';
const packageVersion = '0.3.2';
2 changes: 1 addition & 1 deletion pkgs/google_generative_ai/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: google_generative_ai
# Update `lib/version.dart` when changing version.
version: 0.3.2-wip
version: 0.3.2
description: >-
The Google AI Dart SDK enables developers to use Google's state-of-the-art
generative AI models (like Gemini).
Expand Down

0 comments on commit c8ad2ea

Please sign in to comment.