From 8c96e13071eac1df5cc9336ab1c3f1d07bb8c4fd Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Tue, 22 Oct 2024 13:49:44 -0400 Subject: [PATCH 1/3] Remove indentation in Vertex AI API Not Enabled Error --- packages/vertexai/src/requests/request.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/vertexai/src/requests/request.ts b/packages/vertexai/src/requests/request.ts index edb894d7f76..084ad68127a 100644 --- a/packages/vertexai/src/requests/request.ts +++ b/packages/vertexai/src/requests/request.ts @@ -166,13 +166,13 @@ export async function makeRequest( ) { throw new VertexAIError( VertexAIErrorCode.API_NOT_ENABLED, - `The Vertex AI in Firebase SDK requires the Vertex AI in Firebase - API ('firebasevertexai.googleapis.com') to be enabled in your - Firebase project. Enable this API by visiting the Firebase Console - at https://console.firebase.google.com/project/${url.apiSettings.project}/genai/ - and clicking "Get started". If you enabled this API recently, - wait a few minutes for the action to propagate to our systems and - then retry.`, + `The Vertex AI in Firebase SDK requires the Vertex AI in Firebase ` + + `API ('firebasevertexai.googleapis.com') to be enabled in your ` + + `Firebase project. Enable this API by visiting the Firebase Console ` + + `at https://console.firebase.google.com/project/${url.apiSettings.project}/genai/ ` + + `and clicking "Get started". If you enabled this API recently, ` + + `wait a few minutes for the action to propagate to our systems and ` + + `then retry.`, { status: response.status, statusText: response.statusText, From aba8c7ce29fef894526da7d02843a3cd69bb75cc Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Tue, 22 Oct 2024 14:20:36 -0400 Subject: [PATCH 2/3] Add changeset --- .changeset/six-toys-chew.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/six-toys-chew.md diff --git a/.changeset/six-toys-chew.md b/.changeset/six-toys-chew.md new file mode 100644 index 00000000000..b15e6046724 --- /dev/null +++ b/.changeset/six-toys-chew.md @@ -0,0 +1,5 @@ +--- +'@firebase/vertexai': patch +--- + +Remove indentation in VertexAI API Not Enabled error From 419d83b67403bed760dbc679c5fe6a52752d952c Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Tue, 22 Oct 2024 15:06:27 -0400 Subject: [PATCH 3/3] format --- packages/vertexai/src/requests/request.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/vertexai/src/requests/request.ts b/packages/vertexai/src/requests/request.ts index 084ad68127a..3449be17d42 100644 --- a/packages/vertexai/src/requests/request.ts +++ b/packages/vertexai/src/requests/request.ts @@ -167,12 +167,12 @@ export async function makeRequest( throw new VertexAIError( VertexAIErrorCode.API_NOT_ENABLED, `The Vertex AI in Firebase SDK requires the Vertex AI in Firebase ` + - `API ('firebasevertexai.googleapis.com') to be enabled in your ` + - `Firebase project. Enable this API by visiting the Firebase Console ` + - `at https://console.firebase.google.com/project/${url.apiSettings.project}/genai/ ` + - `and clicking "Get started". If you enabled this API recently, ` + - `wait a few minutes for the action to propagate to our systems and ` + - `then retry.`, + `API ('firebasevertexai.googleapis.com') to be enabled in your ` + + `Firebase project. Enable this API by visiting the Firebase Console ` + + `at https://console.firebase.google.com/project/${url.apiSettings.project}/genai/ ` + + `and clicking "Get started". If you enabled this API recently, ` + + `wait a few minutes for the action to propagate to our systems and ` + + `then retry.`, { status: response.status, statusText: response.statusText,