Skip to content
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
4 changes: 2 additions & 2 deletions src/machine-learning/machine-learning-api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import * as utils from '../utils/index';
import * as validator from '../utils/validator';
import { FirebaseApp } from '../firebase-app';

const ML_V1BETA1_API = 'https://mlkit.googleapis.com/v1beta1';
const ML_V1BETA2_API = 'https://firebaseml.googleapis.com/v1beta2';
const FIREBASE_VERSION_HEADER = {
'X-Firebase-Client': 'fire-admin-node/<XXX_SDK_VERSION_XXX>',
};
Expand Down Expand Up @@ -253,7 +253,7 @@ export class MachineLearningApiClient {
private getUrl(): Promise<string> {
return this.getProjectIdPrefix()
.then((projectIdPrefix) => {
return `${ML_V1BETA1_API}/${this.projectIdPrefix}`;
return `${ML_V1BETA2_API}/${this.projectIdPrefix}`;
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const expect = chai.expect;

describe('MachineLearningApiClient', () => {

const BASE_URL = 'https://mlkit.googleapis.com/v1beta1';
const BASE_URL = 'https://firebaseml.googleapis.com/v1beta2';

const MODEL_ID = '1234567';
const MODEL_RESPONSE = {
Expand Down