diff --git a/README.md b/README.md index 716cc7ae..0cb8a1ba 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,11 @@ To test SAP Cloud SDK for AI features locally during application development, fo The SDK parses the service key from the environment variable to interact with the AI Core service. This setup enables local testing of clients such as orchestration and OpenAI, provided that deployments for orchestration and OpenAI exist in SAP BTP. +> [!Tip] +> Ways to load environment variables might vary based on the framework you are using. +> +> For example, while the SAP Cloud SDK for AI uses the [dotenv](https://www.npmjs.com/package/dotenv) library to load environment variables, NextJS uses a [specific configuration](https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables) to load them. + ## Support, Feedback, Contribution This project is open to feature requests, bug reports and questions via [GitHub issues](https://github.com/SAP/ai-sdk-js/issues). diff --git a/packages/ai-api/README.md b/packages/ai-api/README.md index 2ed964d5..5f1b7f36 100644 --- a/packages/ai-api/README.md +++ b/packages/ai-api/README.md @@ -50,9 +50,12 @@ To ensure compatibility and manage updates effectively, we strongly recommend us - [Enable the AI Core service in SAP BTP](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/initial-setup). - Configure the project with **Node.js v20 or higher** and **native ESM** support. -> **Accessing the AI Core Service via the SDK**: -> The SDK automatically retrieves the `AI Core` service credentials from the `VCAP_SERVICES` environment variable and resolves the access token needed for authentication. -> All subsequent client requests are routed to this service endpoint. +> **Accessing the AI Core Service via the SDK** +> +> The SDK automatically retrieves the `AI Core` service credentials and resolves the access token needed for authentication. +> +> - In Cloud Foundry, it's accessed from the `VCAP_SERVICES` environment variable. +> - In Kubernetes / Kyma environments, you have to mount the service binding as a secret instead, for more information refer to [this documentation](https://www.npmjs.com/package/@sap/xsenv#usage-in-kubernetes). ## Usage diff --git a/packages/foundation-models/README.md b/packages/foundation-models/README.md index 5d234237..f269f00e 100644 --- a/packages/foundation-models/README.md +++ b/packages/foundation-models/README.md @@ -35,9 +35,12 @@ $ npm install @sap-ai-sdk/foundation-models Deployment can be set up for each model and model version, as well as a resource group. - Once a deployment is complete, access the model via the `deploymentUrl`. -> **Accessing the AI Core Service via the SDK**: -> The SDK automatically retrieves the `AI Core` service credentials from the `VCAP_SERVICES` environment variable and resolves the access token needed for authentication. -> All subsequent client requests are routed to this service endpoint. +> **Accessing the AI Core Service via the SDK** +> +> The SDK automatically retrieves the `AI Core` service credentials and resolves the access token needed for authentication. +> +> - In Cloud Foundry, it's accessed from the `VCAP_SERVICES` environment variable. +> - In Kubernetes / Kyma environments, you have to mount the service binding as a secret instead, for more information refer to [this documentation](https://www.npmjs.com/package/@sap/xsenv#usage-in-kubernetes). ## Relationship between Models and Deployment ID diff --git a/packages/langchain/README.md b/packages/langchain/README.md index 0458a2d3..691ecccf 100644 --- a/packages/langchain/README.md +++ b/packages/langchain/README.md @@ -32,15 +32,19 @@ $ npm install @sap-ai-sdk/langchain ## Prerequisites - [Enable the AI Core service in SAP BTP](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/initial-setup). +- Use the same `@langchain/core` version as the `@sap-ai-sdk/langchain` package, to see which langchain version this package is currently using, check our [package.json](./package.json). - Configure the project with **Node.js v20 or higher** and **native ESM** support. - Ensure a deployed OpenAI model is available in the SAP Generative AI Hub. - Use the [`DeploymentApi`](https://github.com/SAP/ai-sdk-js/blob/main/packages/ai-api/README.md#create-a-deployment) from `@sap-ai-sdk/ai-api` [to deploy a model](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-deployment-for-generative-ai-model-in-sap-ai-core). Alternatively, you can also create deployments using the [SAP AI Launchpad](https://help.sap.com/docs/sap-ai-core/generative-ai-hub/activate-generative-ai-hub-for-sap-ai-launchpad?locale=en-US&q=launchpad). - Once deployment is complete, access the model via the `deploymentUrl`. -> **Accessing the AI Core Service via the SDK**: -> The SDK automatically retrieves the `AI Core` service credentials from the `VCAP_SERVICES` environment variable and resolves the access token needed for authentication. -> All subsequent client requests are routed to this service endpoint. +> **Accessing the AI Core Service via the SDK** +> +> The SDK automatically retrieves the `AI Core` service credentials and resolves the access token needed for authentication. +> +> - In Cloud Foundry, it's accessed from the `VCAP_SERVICES` environment variable. +> - In Kubernetes / Kyma environments, you have to mount the service binding as a secret instead, for more information refer to [this documentation](https://www.npmjs.com/package/@sap/xsenv#usage-in-kubernetes). ## Relationship between Models and Deployment ID diff --git a/packages/orchestration/README.md b/packages/orchestration/README.md index ab39dee7..7e1a1f24 100644 --- a/packages/orchestration/README.md +++ b/packages/orchestration/README.md @@ -36,9 +36,12 @@ $ npm install @sap-ai-sdk/orchestration Alternatively, you can also create deployments using the [SAP AI Launchpad](https://help.sap.com/docs/sap-ai-core/generative-ai-hub/activate-generative-ai-hub-for-sap-ai-launchpad?locale=en-US&q=launchpad). - Once the deployment is complete, access the orchestration service via the `deploymentUrl`. -> **Accessing the AI Core Service via the SDK**: -> The SDK automatically retrieves the `AI Core` service credentials from the `VCAP_SERVICES` environment variable and resolves the access token needed for authentication. -> All subsequent client requests are routed to this service endpoint. +> **Accessing the AI Core Service via the SDK** +> +> The SDK automatically retrieves the `AI Core` service credentials and resolves the access token needed for authentication. +> +> - In Cloud Foundry, it's accessed from the `VCAP_SERVICES` environment variable. +> - In Kubernetes / Kyma environments, you have to mount the service binding as a secret instead, for more information refer to [this documentation](https://www.npmjs.com/package/@sap/xsenv#usage-in-kubernetes). ## Orchestration Service