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

README fix for AICORE_SERVICE_KEY instructions #137

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Additional methods (not recommended for production):
**2. Create `.env` file:**

- Create an `.env` file in the root directory of your application
- Add an entry `AICORE_SERVICE_KEY='<content-of-service-key>'`
- Add a **one line** entry `AICORE_SERVICE_KEY={...}` with the copied JSON
Copy link
Contributor Author

@CharlesDuboisSAP CharlesDuboisSAP Nov 4, 2024

Choose a reason for hiding this comment

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

Single quotes and multiline are not properly parsed by the Dotenv library.

Single quotes are accepted but not removed from the value. Double quotes are accepted and properly removed from the value.
I could create a PR fixing this in the Dotenv library, but we decided against it as it could incite users to also put multiline values, which is hard to create support for in the Dotenv library


<details>
<summary>Set an environment variable instead of .env</summary>
Expand Down
4 changes: 3 additions & 1 deletion sample-code/spring-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ Before you can run the sample app, you need to install the AI SDK into your loca

Next, you'll need to set up credentials for the AI Core service:

* Follow [these instructions](../../README.md#option-1-set-credentials-as-environment-variable) to configure the credentials via environment variables.
* Follow [these instructions](../../README.md#option-1-set-ai-core-credentials) to create a service key for the AI Core service.

⚠️ Put the `.env` file in the sample app directory.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a clarification for .env file location


Finally, you can start the sample app:

Expand Down