Skip to content

Commit 06425e4

Browse files
remote unnecessary log message
1 parent e0ac7e7 commit 06425e4

4 files changed

Lines changed: 5 additions & 12 deletions

File tree

src/datacustomcode/einstein_platform_client.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@
3030

3131
class EinsteinPlatformClient:
3232
EINSTEIN_PLATFORM_URL = "https://api.salesforce.com/einstein/platform/v1"
33-
EINSTEIN_WARNING_MESSAGE = (
34-
"If your code uses Einstein APIs, make sure you have "
35-
'configured the SDK to use "client_credentials" auth type. '
36-
"Refer to https://developer.salesforce.com/docs/ai/agentforce/"
37-
"guide/agent-api-get-started.html#create-a-salesforce-app "
38-
"to create your external client app."
39-
)
4033

4134
def __init__(
4235
self,

src/datacustomcode/einstein_predictions/impl/default.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ def predict(self, request: PredictionRequest) -> PredictionResponse:
9595
if not response.ok and not response.text:
9696
error_msg = (
9797
f"Einstein Prediction request failed: {api_url} - "
98-
f"{response.status_code} {response.reason}. "
99-
f"{self.EINSTEIN_WARNING_MESSAGE}"
98+
f"{response.status_code} {response.reason}"
10099
)
101100
logger.error(error_msg)
102101
except requests.exceptions.RequestException as e:

src/datacustomcode/llm_gateway/default.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ def generate_text(self, request: GenerateTextRequest) -> GenerateTextResponse:
6262
if not response.ok and not response.text:
6363
error_msg = (
6464
f"Generate text request failed: {api_url} - "
65-
f"{response.status_code} {response.reason}. "
66-
f"{self.EINSTEIN_WARNING_MESSAGE}"
65+
f"{response.status_code} {response.reason}"
6766
)
6867
logger.error(error_msg)
6968
except requests.exceptions.RequestException as e:

src/datacustomcode/templates/function/payload/entrypoint.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ def function(request: dict, runtime: Runtime) -> dict:
9090

9191
"""
9292
You can use your AI models configured in Salesforce
93-
to generate texts or predict an outcome
93+
to generate texts or predict an outcome.
94+
First configure an external client app before using these AI APIs
95+
https://developer.salesforce.com/docs/ai/agentforce/guide/agent-api-get-started.html#create-a-salesforce-app"
9496
"""
9597
# generate_text(runtime)
9698
# make_einstein_prediction(runtime)

0 commit comments

Comments
 (0)