diff --git a/common/api-review/vertexai-preview.api.md b/common/api-review/vertexai-preview.api.md index 7626ff37478..2f771b2c360 100644 --- a/common/api-review/vertexai-preview.api.md +++ b/common/api-review/vertexai-preview.api.md @@ -14,7 +14,7 @@ export class ArraySchema extends Schema { constructor(schemaParams: SchemaParams, items: TypedSchema); // (undocumented) items: TypedSchema; - // (undocumented) + // @internal (undocumented) toJSON(): SchemaRequest; } @@ -491,7 +491,7 @@ export class ObjectSchema extends Schema { properties: { [k: string]: TypedSchema; }; - // (undocumented) + // @internal (undocumented) toJSON(): SchemaRequest; } @@ -593,6 +593,7 @@ export abstract class Schema implements SchemaInterface { }): ObjectSchema; // (undocumented) static string(stringParams?: SchemaParams): StringSchema; + // @internal toJSON(): SchemaRequest; type: SchemaType; } @@ -664,7 +665,7 @@ export class StringSchema extends Schema { constructor(schemaParams?: SchemaParams, enumValues?: string[]); // (undocumented) enum?: string[]; - // (undocumented) + // @internal (undocumented) toJSON(): SchemaRequest; } diff --git a/docs-devsite/_toc.yaml b/docs-devsite/_toc.yaml deleted file mode 100644 index 3a04923f8de..00000000000 --- a/docs-devsite/_toc.yaml +++ /dev/null @@ -1,559 +0,0 @@ -toc: - - title: firebase - path: /docs/reference/js/index - - title: analytics - path: /docs/reference/js/analytics.md - section: - - title: Analytics - path: /docs/reference/js/analytics.analytics.md - - title: AnalyticsCallOptions - path: /docs/reference/js/analytics.analyticscalloptions.md - - title: AnalyticsSettings - path: /docs/reference/js/analytics.analyticssettings.md - - title: ConsentSettings - path: /docs/reference/js/analytics.consentsettings.md - - title: ControlParams - path: /docs/reference/js/analytics.controlparams.md - - title: CustomParams - path: /docs/reference/js/analytics.customparams.md - - title: EventParams - path: /docs/reference/js/analytics.eventparams.md - - title: GtagConfigParams - path: /docs/reference/js/analytics.gtagconfigparams.md - - title: Item - path: /docs/reference/js/analytics.item.md - - title: Promotion - path: /docs/reference/js/analytics.promotion.md - - title: SettingsOptions - path: /docs/reference/js/analytics.settingsoptions.md - - title: app - path: /docs/reference/js/app.md - section: - - title: FirebaseApp - path: /docs/reference/js/app.firebaseapp.md - - title: FirebaseAppSettings - path: /docs/reference/js/app.firebaseappsettings.md - - title: FirebaseOptions - path: /docs/reference/js/app.firebaseoptions.md - - title: FirebaseServerApp - path: /docs/reference/js/app.firebaseserverapp.md - - title: FirebaseServerAppSettings - path: /docs/reference/js/app.firebaseserverappsettings.md - - title: app-check - path: /docs/reference/js/app-check.md - section: - - title: AppCheck - path: /docs/reference/js/app-check.appcheck.md - - title: AppCheckOptions - path: /docs/reference/js/app-check.appcheckoptions.md - - title: AppCheckToken - path: /docs/reference/js/app-check.appchecktoken.md - - title: AppCheckTokenResult - path: /docs/reference/js/app-check.appchecktokenresult.md - - title: CustomProvider - path: /docs/reference/js/app-check.customprovider.md - - title: CustomProviderOptions - path: /docs/reference/js/app-check.customprovideroptions.md - - title: ReCaptchaEnterpriseProvider - path: /docs/reference/js/app-check.recaptchaenterpriseprovider.md - - title: ReCaptchaV3Provider - path: /docs/reference/js/app-check.recaptchav3provider.md - - title: auth - path: /docs/reference/js/auth.md - section: - - title: ActionCodeInfo - path: /docs/reference/js/auth.actioncodeinfo.md - - title: ActionCodeSettings - path: /docs/reference/js/auth.actioncodesettings.md - - title: ActionCodeURL - path: /docs/reference/js/auth.actioncodeurl.md - - title: AdditionalUserInfo - path: /docs/reference/js/auth.additionaluserinfo.md - - title: ApplicationVerifier - path: /docs/reference/js/auth.applicationverifier.md - - title: Auth - path: /docs/reference/js/auth.auth.md - - title: AuthCredential - path: /docs/reference/js/auth.authcredential.md - - title: AuthError - path: /docs/reference/js/auth.autherror.md - - title: AuthErrorMap - path: /docs/reference/js/auth.autherrormap.md - - title: AuthProvider - path: /docs/reference/js/auth.authprovider.md - - title: AuthSettings - path: /docs/reference/js/auth.authsettings.md - - title: Config - path: /docs/reference/js/auth.config.md - - title: ConfirmationResult - path: /docs/reference/js/auth.confirmationresult.md - - title: Dependencies - path: /docs/reference/js/auth.dependencies.md - - title: EmailAuthCredential - path: /docs/reference/js/auth.emailauthcredential.md - - title: EmailAuthProvider - path: /docs/reference/js/auth.emailauthprovider.md - - title: EmulatorConfig - path: /docs/reference/js/auth.emulatorconfig.md - - title: FacebookAuthProvider - path: /docs/reference/js/auth.facebookauthprovider.md - - title: GithubAuthProvider - path: /docs/reference/js/auth.githubauthprovider.md - - title: GoogleAuthProvider - path: /docs/reference/js/auth.googleauthprovider.md - - title: IdTokenResult - path: /docs/reference/js/auth.idtokenresult.md - - title: MultiFactorAssertion - path: /docs/reference/js/auth.multifactorassertion.md - - title: MultiFactorError - path: /docs/reference/js/auth.multifactorerror.md - - title: MultiFactorInfo - path: /docs/reference/js/auth.multifactorinfo.md - - title: MultiFactorResolver - path: /docs/reference/js/auth.multifactorresolver.md - - title: MultiFactorSession - path: /docs/reference/js/auth.multifactorsession.md - - title: MultiFactorUser - path: /docs/reference/js/auth.multifactoruser.md - - title: OAuthCredential - path: /docs/reference/js/auth.oauthcredential.md - - title: OAuthCredentialOptions - path: /docs/reference/js/auth.oauthcredentialoptions.md - - title: OAuthProvider - path: /docs/reference/js/auth.oauthprovider.md - - title: ParsedToken - path: /docs/reference/js/auth.parsedtoken.md - - title: PasswordPolicy - path: /docs/reference/js/auth.passwordpolicy.md - - title: PasswordValidationStatus - path: /docs/reference/js/auth.passwordvalidationstatus.md - - title: Persistence - path: /docs/reference/js/auth.persistence.md - - title: PhoneAuthCredential - path: /docs/reference/js/auth.phoneauthcredential.md - - title: PhoneAuthProvider - path: /docs/reference/js/auth.phoneauthprovider.md - - title: PhoneMultiFactorAssertion - path: /docs/reference/js/auth.phonemultifactorassertion.md - - title: PhoneMultiFactorEnrollInfoOptions - path: /docs/reference/js/auth.phonemultifactorenrollinfooptions.md - - title: PhoneMultiFactorGenerator - path: /docs/reference/js/auth.phonemultifactorgenerator.md - - title: PhoneMultiFactorInfo - path: /docs/reference/js/auth.phonemultifactorinfo.md - - title: PhoneMultiFactorSignInInfoOptions - path: /docs/reference/js/auth.phonemultifactorsignininfooptions.md - - title: PhoneSingleFactorInfoOptions - path: /docs/reference/js/auth.phonesinglefactorinfooptions.md - - title: PopupRedirectResolver - path: /docs/reference/js/auth.popupredirectresolver.md - - title: ReactNativeAsyncStorage - path: /docs/reference/js/auth.reactnativeasyncstorage.md - - title: RecaptchaParameters - path: /docs/reference/js/auth.recaptchaparameters.md - - title: RecaptchaVerifier - path: /docs/reference/js/auth.recaptchaverifier.md - - title: SAMLAuthProvider - path: /docs/reference/js/auth.samlauthprovider.md - - title: TotpMultiFactorAssertion - path: /docs/reference/js/auth.totpmultifactorassertion.md - - title: TotpMultiFactorGenerator - path: /docs/reference/js/auth.totpmultifactorgenerator.md - - title: TotpMultiFactorInfo - path: /docs/reference/js/auth.totpmultifactorinfo.md - - title: TotpSecret - path: /docs/reference/js/auth.totpsecret.md - - title: TwitterAuthProvider - path: /docs/reference/js/auth.twitterauthprovider.md - - title: User - path: /docs/reference/js/auth.user.md - - title: UserCredential - path: /docs/reference/js/auth.usercredential.md - - title: UserInfo - path: /docs/reference/js/auth.userinfo.md - - title: UserMetadata - path: /docs/reference/js/auth.usermetadata.md - - title: database - path: /docs/reference/js/database.md - section: - - title: Database - path: /docs/reference/js/database.database.md - - title: DatabaseReference - path: /docs/reference/js/database.databasereference.md - - title: DataSnapshot - path: /docs/reference/js/database.datasnapshot.md - - title: IteratedDataSnapshot - path: /docs/reference/js/database.iterateddatasnapshot.md - - title: ListenOptions - path: /docs/reference/js/database.listenoptions.md - - title: OnDisconnect - path: /docs/reference/js/database.ondisconnect.md - - title: Query - path: /docs/reference/js/database.query.md - - title: QueryConstraint - path: /docs/reference/js/database.queryconstraint.md - - title: ThenableReference - path: /docs/reference/js/database.thenablereference.md - - title: TransactionOptions - path: /docs/reference/js/database.transactionoptions.md - - title: TransactionResult - path: /docs/reference/js/database.transactionresult.md - - title: firestore - path: /docs/reference/js/firestore_.md - section: - - title: AggregateField - path: /docs/reference/js/firestore_.aggregatefield.md - - title: AggregateQuerySnapshot - path: /docs/reference/js/firestore_.aggregatequerysnapshot.md - - title: AggregateSpec - path: /docs/reference/js/firestore_.aggregatespec.md - - title: Bytes - path: /docs/reference/js/firestore_.bytes.md - - title: CollectionReference - path: /docs/reference/js/firestore_.collectionreference.md - - title: DocumentChange - path: /docs/reference/js/firestore_.documentchange.md - - title: DocumentData - path: /docs/reference/js/firestore_.documentdata.md - - title: DocumentReference - path: /docs/reference/js/firestore_.documentreference.md - - title: DocumentSnapshot - path: /docs/reference/js/firestore_.documentsnapshot.md - - title: ExperimentalLongPollingOptions - path: /docs/reference/js/firestore_.experimentallongpollingoptions.md - - title: FieldPath - path: /docs/reference/js/firestore_.fieldpath.md - - title: FieldValue - path: /docs/reference/js/firestore_.fieldvalue.md - - title: Firestore - path: /docs/reference/js/firestore_.firestore.md - - title: FirestoreDataConverter - path: /docs/reference/js/firestore_.firestoredataconverter.md - - title: FirestoreError - path: /docs/reference/js/firestore_.firestoreerror.md - - title: FirestoreSettings - path: /docs/reference/js/firestore_.firestoresettings.md - - title: GeoPoint - path: /docs/reference/js/firestore_.geopoint.md - - title: Index - path: /docs/reference/js/firestore_.index.md - - title: IndexConfiguration - path: /docs/reference/js/firestore_.indexconfiguration.md - - title: IndexField - path: /docs/reference/js/firestore_.indexfield.md - - title: LoadBundleTask - path: /docs/reference/js/firestore_.loadbundletask.md - - title: LoadBundleTaskProgress - path: /docs/reference/js/firestore_.loadbundletaskprogress.md - - title: MemoryCacheSettings - path: /docs/reference/js/firestore_.memorycachesettings.md - - title: MemoryEagerGarbageCollector - path: /docs/reference/js/firestore_.memoryeagergarbagecollector.md - - title: MemoryLocalCache - path: /docs/reference/js/firestore_.memorylocalcache.md - - title: MemoryLruGarbageCollector - path: /docs/reference/js/firestore_.memorylrugarbagecollector.md - - title: PersistenceSettings - path: /docs/reference/js/firestore_.persistencesettings.md - - title: PersistentCacheIndexManager - path: /docs/reference/js/firestore_.persistentcacheindexmanager.md - - title: PersistentCacheSettings - path: /docs/reference/js/firestore_.persistentcachesettings.md - - title: PersistentLocalCache - path: /docs/reference/js/firestore_.persistentlocalcache.md - - title: PersistentMultipleTabManager - path: /docs/reference/js/firestore_.persistentmultipletabmanager.md - - title: PersistentSingleTabManager - path: /docs/reference/js/firestore_.persistentsingletabmanager.md - - title: PersistentSingleTabManagerSettings - path: /docs/reference/js/firestore_.persistentsingletabmanagersettings.md - - title: Query - path: /docs/reference/js/firestore_.query.md - - title: QueryCompositeFilterConstraint - path: /docs/reference/js/firestore_.querycompositefilterconstraint.md - - title: QueryConstraint - path: /docs/reference/js/firestore_.queryconstraint.md - - title: QueryDocumentSnapshot - path: /docs/reference/js/firestore_.querydocumentsnapshot.md - - title: QueryEndAtConstraint - path: /docs/reference/js/firestore_.queryendatconstraint.md - - title: QueryFieldFilterConstraint - path: /docs/reference/js/firestore_.queryfieldfilterconstraint.md - - title: QueryLimitConstraint - path: /docs/reference/js/firestore_.querylimitconstraint.md - - title: QueryOrderByConstraint - path: /docs/reference/js/firestore_.queryorderbyconstraint.md - - title: QuerySnapshot - path: /docs/reference/js/firestore_.querysnapshot.md - - title: QueryStartAtConstraint - path: /docs/reference/js/firestore_.querystartatconstraint.md - - title: SnapshotListenOptions - path: /docs/reference/js/firestore_.snapshotlistenoptions.md - - title: SnapshotMetadata - path: /docs/reference/js/firestore_.snapshotmetadata.md - - title: SnapshotOptions - path: /docs/reference/js/firestore_.snapshotoptions.md - - title: Timestamp - path: /docs/reference/js/firestore_.timestamp.md - - title: Transaction - path: /docs/reference/js/firestore_.transaction.md - - title: TransactionOptions - path: /docs/reference/js/firestore_.transactionoptions.md - - title: Unsubscribe - path: /docs/reference/js/firestore_.unsubscribe.md - - title: VectorValue - path: /docs/reference/js/firestore_.vectorvalue.md - - title: WriteBatch - path: /docs/reference/js/firestore_.writebatch.md - - title: firestore/lite - path: /docs/reference/js/firestore_lite.md - section: - - title: AggregateField - path: /docs/reference/js/firestore_lite.aggregatefield.md - - title: AggregateQuerySnapshot - path: /docs/reference/js/firestore_lite.aggregatequerysnapshot.md - - title: AggregateSpec - path: /docs/reference/js/firestore_lite.aggregatespec.md - - title: Bytes - path: /docs/reference/js/firestore_lite.bytes.md - - title: CollectionReference - path: /docs/reference/js/firestore_lite.collectionreference.md - - title: DocumentData - path: /docs/reference/js/firestore_lite.documentdata.md - - title: DocumentReference - path: /docs/reference/js/firestore_lite.documentreference.md - - title: DocumentSnapshot - path: /docs/reference/js/firestore_lite.documentsnapshot.md - - title: FieldPath - path: /docs/reference/js/firestore_lite.fieldpath.md - - title: FieldValue - path: /docs/reference/js/firestore_lite.fieldvalue.md - - title: Firestore - path: /docs/reference/js/firestore_lite.firestore.md - - title: FirestoreDataConverter - path: /docs/reference/js/firestore_lite.firestoredataconverter.md - - title: FirestoreError - path: /docs/reference/js/firestore_lite.firestoreerror.md - - title: GeoPoint - path: /docs/reference/js/firestore_lite.geopoint.md - - title: Query - path: /docs/reference/js/firestore_lite.query.md - - title: QueryCompositeFilterConstraint - path: /docs/reference/js/firestore_lite.querycompositefilterconstraint.md - - title: QueryConstraint - path: /docs/reference/js/firestore_lite.queryconstraint.md - - title: QueryDocumentSnapshot - path: /docs/reference/js/firestore_lite.querydocumentsnapshot.md - - title: QueryEndAtConstraint - path: /docs/reference/js/firestore_lite.queryendatconstraint.md - - title: QueryFieldFilterConstraint - path: /docs/reference/js/firestore_lite.queryfieldfilterconstraint.md - - title: QueryLimitConstraint - path: /docs/reference/js/firestore_lite.querylimitconstraint.md - - title: QueryOrderByConstraint - path: /docs/reference/js/firestore_lite.queryorderbyconstraint.md - - title: QuerySnapshot - path: /docs/reference/js/firestore_lite.querysnapshot.md - - title: QueryStartAtConstraint - path: /docs/reference/js/firestore_lite.querystartatconstraint.md - - title: Settings - path: /docs/reference/js/firestore_lite.settings.md - - title: Timestamp - path: /docs/reference/js/firestore_lite.timestamp.md - - title: Transaction - path: /docs/reference/js/firestore_lite.transaction.md - - title: TransactionOptions - path: /docs/reference/js/firestore_lite.transactionoptions.md - - title: VectorValue - path: /docs/reference/js/firestore_lite.vectorvalue.md - - title: WriteBatch - path: /docs/reference/js/firestore_lite.writebatch.md - - title: functions - path: /docs/reference/js/functions.md - section: - - title: Functions - path: /docs/reference/js/functions.functions.md - - title: FunctionsError - path: /docs/reference/js/functions.functionserror.md - - title: HttpsCallableOptions - path: /docs/reference/js/functions.httpscallableoptions.md - - title: HttpsCallableResult - path: /docs/reference/js/functions.httpscallableresult.md - - title: installations - path: /docs/reference/js/installations.md - section: - - title: Installations - path: /docs/reference/js/installations.installations.md - - title: messaging - path: /docs/reference/js/messaging_.md - section: - - title: FcmOptions - path: /docs/reference/js/messaging_.fcmoptions.md - - title: GetTokenOptions - path: /docs/reference/js/messaging_.gettokenoptions.md - - title: MessagePayload - path: /docs/reference/js/messaging_.messagepayload.md - - title: Messaging - path: /docs/reference/js/messaging_.messaging.md - - title: NotificationPayload - path: /docs/reference/js/messaging_.notificationpayload.md - - title: messaging/sw - path: /docs/reference/js/messaging_sw.md - section: - - title: FcmOptions - path: /docs/reference/js/messaging_sw.fcmoptions.md - - title: GetTokenOptions - path: /docs/reference/js/messaging_sw.gettokenoptions.md - - title: MessagePayload - path: /docs/reference/js/messaging_sw.messagepayload.md - - title: Messaging - path: /docs/reference/js/messaging_sw.messaging.md - - title: NotificationPayload - path: /docs/reference/js/messaging_sw.notificationpayload.md - - title: performance - path: /docs/reference/js/performance.md - section: - - title: FirebasePerformance - path: /docs/reference/js/performance.firebaseperformance.md - - title: PerformanceSettings - path: /docs/reference/js/performance.performancesettings.md - - title: PerformanceTrace - path: /docs/reference/js/performance.performancetrace.md - - title: remote-config - path: /docs/reference/js/remote-config.md - section: - - title: RemoteConfig - path: /docs/reference/js/remote-config.remoteconfig.md - - title: RemoteConfigSettings - path: /docs/reference/js/remote-config.remoteconfigsettings.md - - title: Value - path: /docs/reference/js/remote-config.value.md - - title: storage - path: /docs/reference/js/storage.md - section: - - title: FirebaseStorage - path: /docs/reference/js/storage.firebasestorage.md - - title: FullMetadata - path: /docs/reference/js/storage.fullmetadata.md - - title: ListOptions - path: /docs/reference/js/storage.listoptions.md - - title: ListResult - path: /docs/reference/js/storage.listresult.md - - title: SettableMetadata - path: /docs/reference/js/storage.settablemetadata.md - - title: StorageError - path: /docs/reference/js/storage.storageerror.md - - title: StorageObserver - path: /docs/reference/js/storage.storageobserver.md - - title: StorageReference - path: /docs/reference/js/storage.storagereference.md - - title: UploadMetadata - path: /docs/reference/js/storage.uploadmetadata.md - - title: UploadResult - path: /docs/reference/js/storage.uploadresult.md - - title: UploadTask - path: /docs/reference/js/storage.uploadtask.md - - title: UploadTaskSnapshot - path: /docs/reference/js/storage.uploadtasksnapshot.md - - title: vertexai-preview - path: /docs/reference/js/vertexai-preview.md - section: - - title: BaseParams - path: /docs/reference/js/vertexai-preview.baseparams.md - - title: ChatSession - path: /docs/reference/js/vertexai-preview.chatsession.md - - title: Citation - path: /docs/reference/js/vertexai-preview.citation.md - - title: CitationMetadata - path: /docs/reference/js/vertexai-preview.citationmetadata.md - - title: Content - path: /docs/reference/js/vertexai-preview.content.md - - title: CountTokensRequest - path: /docs/reference/js/vertexai-preview.counttokensrequest.md - - title: CountTokensResponse - path: /docs/reference/js/vertexai-preview.counttokensresponse.md - - title: CustomErrorData - path: /docs/reference/js/vertexai-preview.customerrordata.md - - title: Date_2 - path: /docs/reference/js/vertexai-preview.date_2.md - - title: EnhancedGenerateContentResponse - path: /docs/reference/js/vertexai-preview.enhancedgeneratecontentresponse.md - - title: ErrorDetails - path: /docs/reference/js/vertexai-preview.errordetails.md - - title: FileData - path: /docs/reference/js/vertexai-preview.filedata.md - - title: FileDataPart - path: /docs/reference/js/vertexai-preview.filedatapart.md - - title: FunctionCall - path: /docs/reference/js/vertexai-preview.functioncall.md - - title: FunctionCallingConfig - path: /docs/reference/js/vertexai-preview.functioncallingconfig.md - - title: FunctionCallPart - path: /docs/reference/js/vertexai-preview.functioncallpart.md - - title: FunctionDeclaration - path: /docs/reference/js/vertexai-preview.functiondeclaration.md - - title: FunctionDeclarationSchema - path: /docs/reference/js/vertexai-preview.functiondeclarationschema.md - - title: FunctionDeclarationSchemaProperty - path: >- - /docs/reference/js/vertexai-preview.functiondeclarationschemaproperty.md - - title: FunctionDeclarationsTool - path: /docs/reference/js/vertexai-preview.functiondeclarationstool.md - - title: FunctionResponse - path: /docs/reference/js/vertexai-preview.functionresponse.md - - title: FunctionResponsePart - path: /docs/reference/js/vertexai-preview.functionresponsepart.md - - title: GenerateContentCandidate - path: /docs/reference/js/vertexai-preview.generatecontentcandidate.md - - title: GenerateContentRequest - path: /docs/reference/js/vertexai-preview.generatecontentrequest.md - - title: GenerateContentResponse - path: /docs/reference/js/vertexai-preview.generatecontentresponse.md - - title: GenerateContentResult - path: /docs/reference/js/vertexai-preview.generatecontentresult.md - - title: GenerateContentStreamResult - path: /docs/reference/js/vertexai-preview.generatecontentstreamresult.md - - title: GenerationConfig - path: /docs/reference/js/vertexai-preview.generationconfig.md - - title: GenerativeContentBlob - path: /docs/reference/js/vertexai-preview.generativecontentblob.md - - title: GenerativeModel - path: /docs/reference/js/vertexai-preview.generativemodel.md - - title: GroundingAttribution - path: /docs/reference/js/vertexai-preview.groundingattribution.md - - title: GroundingMetadata - path: /docs/reference/js/vertexai-preview.groundingmetadata.md - - title: InlineDataPart - path: /docs/reference/js/vertexai-preview.inlinedatapart.md - - title: ModelParams - path: /docs/reference/js/vertexai-preview.modelparams.md - - title: PromptFeedback - path: /docs/reference/js/vertexai-preview.promptfeedback.md - - title: RequestOptions - path: /docs/reference/js/vertexai-preview.requestoptions.md - - title: RetrievedContextAttribution - path: /docs/reference/js/vertexai-preview.retrievedcontextattribution.md - - title: SafetyRating - path: /docs/reference/js/vertexai-preview.safetyrating.md - - title: SafetySetting - path: /docs/reference/js/vertexai-preview.safetysetting.md - - title: Segment - path: /docs/reference/js/vertexai-preview.segment.md - - title: StartChatParams - path: /docs/reference/js/vertexai-preview.startchatparams.md - - title: TextPart - path: /docs/reference/js/vertexai-preview.textpart.md - - title: ToolConfig - path: /docs/reference/js/vertexai-preview.toolconfig.md - - title: UsageMetadata - path: /docs/reference/js/vertexai-preview.usagemetadata.md - - title: VertexAI - path: /docs/reference/js/vertexai-preview.vertexai.md - - title: VertexAIError - path: /docs/reference/js/vertexai-preview.vertexaierror.md - - title: VertexAIOptions - path: /docs/reference/js/vertexai-preview.vertexaioptions.md - - title: VideoMetadata - path: /docs/reference/js/vertexai-preview.videometadata.md - - title: WebAttribution - path: /docs/reference/js/vertexai-preview.webattribution.md diff --git a/docs-devsite/vertexai-preview.arrayschema.md b/docs-devsite/vertexai-preview.arrayschema.md new file mode 100644 index 00000000000..a9e76e651af --- /dev/null +++ b/docs-devsite/vertexai-preview.arrayschema.md @@ -0,0 +1,57 @@ +Project: /docs/reference/js/_project.yaml +Book: /docs/reference/_book.yaml +page_type: reference + +{% comment %} +DO NOT EDIT THIS FILE! +This is generated by the JS SDK team, and any local changes will be +overwritten. Changes should be made in the source code at +https://github.com/firebase/firebase-js-sdk +{% endcomment %} + +# ArraySchema class +Schema class for "array" types. The `items` param should refer to the type of item that can be a member of the array. + +Signature: + +```typescript +export declare class ArraySchema extends Schema +``` +Extends: [Schema](./vertexai-preview.schema.md#schema_class) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(schemaParams, items)](./vertexai-preview.arrayschema.md#arrayschemaconstructor) | | Constructs a new instance of the ArraySchema class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [items](./vertexai-preview.arrayschema.md#arrayschemaitems) | | [TypedSchema](./vertexai-preview.md#typedschema) | | + +## ArraySchema.(constructor) + +Constructs a new instance of the `ArraySchema` class + +Signature: + +```typescript +constructor(schemaParams: SchemaParams, items: TypedSchema); +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| schemaParams | [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) | | +| items | [TypedSchema](./vertexai-preview.md#typedschema) | | + +## ArraySchema.items + +Signature: + +```typescript +items: TypedSchema; +``` diff --git a/docs-devsite/vertexai-preview.booleanschema.md b/docs-devsite/vertexai-preview.booleanschema.md new file mode 100644 index 00000000000..f85a2a7f2bf --- /dev/null +++ b/docs-devsite/vertexai-preview.booleanschema.md @@ -0,0 +1,43 @@ +Project: /docs/reference/js/_project.yaml +Book: /docs/reference/_book.yaml +page_type: reference + +{% comment %} +DO NOT EDIT THIS FILE! +This is generated by the JS SDK team, and any local changes will be +overwritten. Changes should be made in the source code at +https://github.com/firebase/firebase-js-sdk +{% endcomment %} + +# BooleanSchema class +Schema class for "boolean" types. + +Signature: + +```typescript +export declare class BooleanSchema extends Schema +``` +Extends: [Schema](./vertexai-preview.schema.md#schema_class) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(schemaParams)](./vertexai-preview.booleanschema.md#booleanschemaconstructor) | | Constructs a new instance of the BooleanSchema class | + +## BooleanSchema.(constructor) + +Constructs a new instance of the `BooleanSchema` class + +Signature: + +```typescript +constructor(schemaParams?: SchemaParams); +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| schemaParams | [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) | | + diff --git a/docs-devsite/vertexai-preview.functiondeclaration.md b/docs-devsite/vertexai-preview.functiondeclaration.md index e178c7e8bc3..4c0a959193c 100644 --- a/docs-devsite/vertexai-preview.functiondeclaration.md +++ b/docs-devsite/vertexai-preview.functiondeclaration.md @@ -24,7 +24,7 @@ export declare interface FunctionDeclaration | --- | --- | --- | | [description](./vertexai-preview.functiondeclaration.md#functiondeclarationdescription) | string | Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. | | [name](./vertexai-preview.functiondeclaration.md#functiondeclarationname) | string | The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a max length of 64. | -| [parameters](./vertexai-preview.functiondeclaration.md#functiondeclarationparameters) | [FunctionDeclarationSchema](./vertexai-preview.functiondeclarationschema.md#functiondeclarationschema_interface) | Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. Parameter names are case-sensitive. For a function with no parameters, this can be left unset. | +| [parameters](./vertexai-preview.functiondeclaration.md#functiondeclarationparameters) | [ObjectSchemaInterface](./vertexai-preview.objectschemainterface.md#objectschemainterface_interface) | Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. Parameter names are case-sensitive. For a function with no parameters, this can be left unset. | ## FunctionDeclaration.description @@ -53,5 +53,5 @@ Optional. Describes the parameters to this function in JSON Schema Object format Signature: ```typescript -parameters?: FunctionDeclarationSchema; +parameters?: ObjectSchemaInterface; ``` diff --git a/docs-devsite/vertexai-preview.functiondeclarationschema.md b/docs-devsite/vertexai-preview.functiondeclarationschema.md deleted file mode 100644 index 7d0e5809d41..00000000000 --- a/docs-devsite/vertexai-preview.functiondeclarationschema.md +++ /dev/null @@ -1,70 +0,0 @@ -Project: /docs/reference/js/_project.yaml -Book: /docs/reference/_book.yaml -page_type: reference - -{% comment %} -DO NOT EDIT THIS FILE! -This is generated by the JS SDK team, and any local changes will be -overwritten. Changes should be made in the source code at -https://github.com/firebase/firebase-js-sdk -{% endcomment %} - -# FunctionDeclarationSchema interface -Schema for parameters passed to [FunctionDeclaration.parameters](./vertexai-preview.functiondeclaration.md#functiondeclarationparameters). - -Signature: - -```typescript -export interface FunctionDeclarationSchema -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [description](./vertexai-preview.functiondeclarationschema.md#functiondeclarationschemadescription) | string | Optional. Description of the parameter. | -| [properties](./vertexai-preview.functiondeclarationschema.md#functiondeclarationschemaproperties) | { \[k: string\]: [FunctionDeclarationSchemaProperty](./vertexai-preview.functiondeclarationschemaproperty.md#functiondeclarationschemaproperty_interface); } | The format of the parameter. | -| [required](./vertexai-preview.functiondeclarationschema.md#functiondeclarationschemarequired) | string\[\] | Optional. Array of required parameters. | -| [type](./vertexai-preview.functiondeclarationschema.md#functiondeclarationschematype) | [FunctionDeclarationSchemaType](./vertexai-preview.md#functiondeclarationschematype) | The type of the parameter. | - -## FunctionDeclarationSchema.description - -Optional. Description of the parameter. - -Signature: - -```typescript -description?: string; -``` - -## FunctionDeclarationSchema.properties - -The format of the parameter. - -Signature: - -```typescript -properties: { - [k: string]: FunctionDeclarationSchemaProperty; - }; -``` - -## FunctionDeclarationSchema.required - -Optional. Array of required parameters. - -Signature: - -```typescript -required?: string[]; -``` - -## FunctionDeclarationSchema.type - -The type of the parameter. - -Signature: - -```typescript -type: FunctionDeclarationSchemaType; -``` diff --git a/docs-devsite/vertexai-preview.functiondeclarationschemaproperty.md b/docs-devsite/vertexai-preview.functiondeclarationschemaproperty.md deleted file mode 100644 index ac2e1262dd0..00000000000 --- a/docs-devsite/vertexai-preview.functiondeclarationschemaproperty.md +++ /dev/null @@ -1,125 +0,0 @@ -Project: /docs/reference/js/_project.yaml -Book: /docs/reference/_book.yaml -page_type: reference - -{% comment %} -DO NOT EDIT THIS FILE! -This is generated by the JS SDK team, and any local changes will be -overwritten. Changes should be made in the source code at -https://github.com/firebase/firebase-js-sdk -{% endcomment %} - -# FunctionDeclarationSchemaProperty interface -Schema is used to define the format of input/output data. Represents a select subset of an OpenAPI 3.0 schema object. More fields may be added in the future as needed. - -Signature: - -```typescript -export interface FunctionDeclarationSchemaProperty -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [description](./vertexai-preview.functiondeclarationschemaproperty.md#functiondeclarationschemapropertydescription) | string | Optional. The description of the property. | -| [enum](./vertexai-preview.functiondeclarationschemaproperty.md#functiondeclarationschemapropertyenum) | string\[\] | Optional. The enum of the property. | -| [example](./vertexai-preview.functiondeclarationschemaproperty.md#functiondeclarationschemapropertyexample) | unknown | Optional. The example of the property. | -| [format](./vertexai-preview.functiondeclarationschemaproperty.md#functiondeclarationschemapropertyformat) | string | Optional. The format of the property. | -| [items](./vertexai-preview.functiondeclarationschemaproperty.md#functiondeclarationschemapropertyitems) | [FunctionDeclarationSchema](./vertexai-preview.functiondeclarationschema.md#functiondeclarationschema_interface) | Optional. The items of the property. [FunctionDeclarationSchema](./vertexai-preview.functiondeclarationschema.md#functiondeclarationschema_interface) | -| [nullable](./vertexai-preview.functiondeclarationschemaproperty.md#functiondeclarationschemapropertynullable) | boolean | Optional. Whether the property is nullable. | -| [properties](./vertexai-preview.functiondeclarationschemaproperty.md#functiondeclarationschemapropertyproperties) | { \[k: string\]: [FunctionDeclarationSchema](./vertexai-preview.functiondeclarationschema.md#functiondeclarationschema_interface); } | Optional. Map of [FunctionDeclarationSchema](./vertexai-preview.functiondeclarationschema.md#functiondeclarationschema_interface). | -| [required](./vertexai-preview.functiondeclarationschemaproperty.md#functiondeclarationschemapropertyrequired) | string\[\] | Optional. Array of required property. | -| [type](./vertexai-preview.functiondeclarationschemaproperty.md#functiondeclarationschemapropertytype) | [FunctionDeclarationSchemaType](./vertexai-preview.md#functiondeclarationschematype) | Optional. The type of the property. [FunctionDeclarationSchemaType](./vertexai-preview.md#functiondeclarationschematype). | - -## FunctionDeclarationSchemaProperty.description - -Optional. The description of the property. - -Signature: - -```typescript -description?: string; -``` - -## FunctionDeclarationSchemaProperty.enum - -Optional. The enum of the property. - -Signature: - -```typescript -enum?: string[]; -``` - -## FunctionDeclarationSchemaProperty.example - -Optional. The example of the property. - -Signature: - -```typescript -example?: unknown; -``` - -## FunctionDeclarationSchemaProperty.format - -Optional. The format of the property. - -Signature: - -```typescript -format?: string; -``` - -## FunctionDeclarationSchemaProperty.items - -Optional. The items of the property. [FunctionDeclarationSchema](./vertexai-preview.functiondeclarationschema.md#functiondeclarationschema_interface) - -Signature: - -```typescript -items?: FunctionDeclarationSchema; -``` - -## FunctionDeclarationSchemaProperty.nullable - -Optional. Whether the property is nullable. - -Signature: - -```typescript -nullable?: boolean; -``` - -## FunctionDeclarationSchemaProperty.properties - -Optional. Map of [FunctionDeclarationSchema](./vertexai-preview.functiondeclarationschema.md#functiondeclarationschema_interface). - -Signature: - -```typescript -properties?: { - [k: string]: FunctionDeclarationSchema; - }; -``` - -## FunctionDeclarationSchemaProperty.required - -Optional. Array of required property. - -Signature: - -```typescript -required?: string[]; -``` - -## FunctionDeclarationSchemaProperty.type - -Optional. The type of the property. [FunctionDeclarationSchemaType](./vertexai-preview.md#functiondeclarationschematype). - -Signature: - -```typescript -type?: FunctionDeclarationSchemaType; -``` diff --git a/docs-devsite/vertexai-preview.generationconfig.md b/docs-devsite/vertexai-preview.generationconfig.md index b14dfea053b..d9f5777f3b2 100644 --- a/docs-devsite/vertexai-preview.generationconfig.md +++ b/docs-devsite/vertexai-preview.generationconfig.md @@ -26,7 +26,8 @@ export interface GenerationConfig | [frequencyPenalty](./vertexai-preview.generationconfig.md#generationconfigfrequencypenalty) | number | | | [maxOutputTokens](./vertexai-preview.generationconfig.md#generationconfigmaxoutputtokens) | number | | | [presencePenalty](./vertexai-preview.generationconfig.md#generationconfigpresencepenalty) | number | | -| [responseMimeType](./vertexai-preview.generationconfig.md#generationconfigresponsemimetype) | string | Output response mimetype of the generated candidate text. Supported mimetypes are text/plain (default, text output) and application/json (JSON response in the candidates). The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. | +| [responseMimeType](./vertexai-preview.generationconfig.md#generationconfigresponsemimetype) | string | Output response MIME type of the generated candidate text. Supported MIME types are text/plain (default, text output) and application/json (JSON response in the candidates). | +| [responseSchema](./vertexai-preview.generationconfig.md#generationconfigresponseschema) | [TypedSchema](./vertexai-preview.md#typedschema) \| [SchemaRequest](./vertexai-preview.schemarequest.md#schemarequest_interface) | Output response schema of the generated candidate text. This value can be a class generated with a [Schema](./vertexai-preview.schema.md#schema_class) static method like Schema.string() or Schema.object() or it can be a plain JS object matching the [SchemaRequest](./vertexai-preview.schemarequest.md#schemarequest_interface) interface.
Note: This only applies when the specified responseMIMEType supports a schema; currently this is limited to application/json. | | [stopSequences](./vertexai-preview.generationconfig.md#generationconfigstopsequences) | string\[\] | | | [temperature](./vertexai-preview.generationconfig.md#generationconfigtemperature) | number | | | [topK](./vertexai-preview.generationconfig.md#generationconfigtopk) | number | | @@ -66,7 +67,7 @@ presencePenalty?: number; ## GenerationConfig.responseMimeType -Output response mimetype of the generated candidate text. Supported mimetypes are `text/plain` (default, text output) and `application/json` (JSON response in the candidates). The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. +Output response MIME type of the generated candidate text. Supported MIME types are `text/plain` (default, text output) and `application/json` (JSON response in the candidates). Signature: @@ -74,6 +75,16 @@ Output response mimetype of the generated candidate text. Supported mimetypes ar responseMimeType?: string; ``` +## GenerationConfig.responseSchema + +Output response schema of the generated candidate text. This value can be a class generated with a [Schema](./vertexai-preview.schema.md#schema_class) static method like `Schema.string()` or `Schema.object()` or it can be a plain JS object matching the [SchemaRequest](./vertexai-preview.schemarequest.md#schemarequest_interface) interface.
Note: This only applies when the specified `responseMIMEType` supports a schema; currently this is limited to `application/json`. + +Signature: + +```typescript +responseSchema?: TypedSchema | SchemaRequest; +``` + ## GenerationConfig.stopSequences Signature: diff --git a/docs-devsite/vertexai-preview.integerschema.md b/docs-devsite/vertexai-preview.integerschema.md new file mode 100644 index 00000000000..5b683e8d3e0 --- /dev/null +++ b/docs-devsite/vertexai-preview.integerschema.md @@ -0,0 +1,43 @@ +Project: /docs/reference/js/_project.yaml +Book: /docs/reference/_book.yaml +page_type: reference + +{% comment %} +DO NOT EDIT THIS FILE! +This is generated by the JS SDK team, and any local changes will be +overwritten. Changes should be made in the source code at +https://github.com/firebase/firebase-js-sdk +{% endcomment %} + +# IntegerSchema class +Schema class for "integer" types. + +Signature: + +```typescript +export declare class IntegerSchema extends Schema +``` +Extends: [Schema](./vertexai-preview.schema.md#schema_class) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(schemaParams)](./vertexai-preview.integerschema.md#integerschemaconstructor) | | Constructs a new instance of the IntegerSchema class | + +## IntegerSchema.(constructor) + +Constructs a new instance of the `IntegerSchema` class + +Signature: + +```typescript +constructor(schemaParams?: SchemaParams); +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| schemaParams | [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) | | + diff --git a/docs-devsite/vertexai-preview.md b/docs-devsite/vertexai-preview.md index 27829c8ad2e..5790baaded4 100644 --- a/docs-devsite/vertexai-preview.md +++ b/docs-devsite/vertexai-preview.md @@ -25,8 +25,15 @@ The Vertex AI in Firebase Web SDK. | Class | Description | | --- | --- | +| [ArraySchema](./vertexai-preview.arrayschema.md#arrayschema_class) | Schema class for "array" types. The items param should refer to the type of item that can be a member of the array. | +| [BooleanSchema](./vertexai-preview.booleanschema.md#booleanschema_class) | Schema class for "boolean" types. | | [ChatSession](./vertexai-preview.chatsession.md#chatsession_class) | ChatSession class that enables sending chat messages and stores history of sent and received messages so far. | | [GenerativeModel](./vertexai-preview.generativemodel.md#generativemodel_class) | Class for generative model APIs. | +| [IntegerSchema](./vertexai-preview.integerschema.md#integerschema_class) | Schema class for "integer" types. | +| [NumberSchema](./vertexai-preview.numberschema.md#numberschema_class) | Schema class for "number" types. | +| [ObjectSchema](./vertexai-preview.objectschema.md#objectschema_class) | Schema class for "object" types. The properties param must be a map of Schema. | +| [Schema](./vertexai-preview.schema.md#schema_class) | Parent class encompassing all Schema types, with static methods that allow building specific Schema types. This class can be converted with JSON.stringify() into a JSON string accepted by Vertex AI REST endpoints. (This string conversion is automatically done when calling SDK methods.) | +| [StringSchema](./vertexai-preview.stringschema.md#stringschema_class) | Schema class for "string" types. Can be used with or without enum values. | | [VertexAIError](./vertexai-preview.vertexaierror.md#vertexaierror_class) | Error class for the Vertex AI in Firebase SDK. | ## Enumerations @@ -36,12 +43,12 @@ The Vertex AI in Firebase Web SDK. | [BlockReason](./vertexai-preview.md#blockreason) | Reason that a prompt was blocked. | | [FinishReason](./vertexai-preview.md#finishreason) | Reason that a candidate finished. | | [FunctionCallingMode](./vertexai-preview.md#functioncallingmode) | | -| [FunctionDeclarationSchemaType](./vertexai-preview.md#functiondeclarationschematype) | Contains the list of OpenAPI data types as defined by https://swagger.io/docs/specification/data-models/data-types/ | | [HarmBlockMethod](./vertexai-preview.md#harmblockmethod) | | | [HarmBlockThreshold](./vertexai-preview.md#harmblockthreshold) | Threshold above which a prompt or candidate will be blocked. | | [HarmCategory](./vertexai-preview.md#harmcategory) | Harm categories that would cause prompts or candidates to be blocked. | | [HarmProbability](./vertexai-preview.md#harmprobability) | Probability that a prompt or candidate matches a harm category. | | [HarmSeverity](./vertexai-preview.md#harmseverity) | Harm severity levels. | +| [SchemaType](./vertexai-preview.md#schematype) | Contains the list of OpenAPI data types as defined by the [OpenAPI specification](https://swagger.io/docs/specification/data-models/data-types/) | | [VertexAIErrorCode](./vertexai-preview.md#vertexaierrorcode) | Standardized error codes that [VertexAIError](./vertexai-preview.vertexaierror.md#vertexaierror_class) can have. | ## Interfaces @@ -64,8 +71,6 @@ The Vertex AI in Firebase Web SDK. | [FunctionCallingConfig](./vertexai-preview.functioncallingconfig.md#functioncallingconfig_interface) | | | [FunctionCallPart](./vertexai-preview.functioncallpart.md#functioncallpart_interface) | Content part interface if the part represents a [FunctionCall](./vertexai-preview.functioncall.md#functioncall_interface). | | [FunctionDeclaration](./vertexai-preview.functiondeclaration.md#functiondeclaration_interface) | Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client. | -| [FunctionDeclarationSchema](./vertexai-preview.functiondeclarationschema.md#functiondeclarationschema_interface) | Schema for parameters passed to [FunctionDeclaration.parameters](./vertexai-preview.functiondeclaration.md#functiondeclarationparameters). | -| [FunctionDeclarationSchemaProperty](./vertexai-preview.functiondeclarationschemaproperty.md#functiondeclarationschemaproperty_interface) | Schema is used to define the format of input/output data. Represents a select subset of an OpenAPI 3.0 schema object. More fields may be added in the future as needed. | | [FunctionDeclarationsTool](./vertexai-preview.functiondeclarationstool.md#functiondeclarationstool_interface) | A FunctionDeclarationsTool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. | | [FunctionResponse](./vertexai-preview.functionresponse.md#functionresponse_interface) | The result output from a [FunctionCall](./vertexai-preview.functioncall.md#functioncall_interface) that contains a string representing the [FunctionDeclaration.name](./vertexai-preview.functiondeclaration.md#functiondeclarationname) and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall](./vertexai-preview.functioncall.md#functioncall_interface) made based on model prediction. | | [FunctionResponsePart](./vertexai-preview.functionresponsepart.md#functionresponsepart_interface) | Content part interface if the part represents [FunctionResponse](./vertexai-preview.functionresponse.md#functionresponse_interface). | @@ -80,11 +85,16 @@ The Vertex AI in Firebase Web SDK. | [GroundingMetadata](./vertexai-preview.groundingmetadata.md#groundingmetadata_interface) | Metadata returned to client when grounding is enabled. | | [InlineDataPart](./vertexai-preview.inlinedatapart.md#inlinedatapart_interface) | Content part interface if the part represents an image. | | [ModelParams](./vertexai-preview.modelparams.md#modelparams_interface) | Params passed to [getGenerativeModel()](./vertexai-preview.md#getgenerativemodel_e3037c9). | +| [ObjectSchemaInterface](./vertexai-preview.objectschemainterface.md#objectschemainterface_interface) | Interface for [ObjectSchema](./vertexai-preview.objectschema.md#objectschema_class) class. | | [PromptFeedback](./vertexai-preview.promptfeedback.md#promptfeedback_interface) | If the prompt was blocked, this will be populated with blockReason and the relevant safetyRatings. | | [RequestOptions](./vertexai-preview.requestoptions.md#requestoptions_interface) | Params passed to [getGenerativeModel()](./vertexai-preview.md#getgenerativemodel_e3037c9). | | [RetrievedContextAttribution](./vertexai-preview.retrievedcontextattribution.md#retrievedcontextattribution_interface) | | | [SafetyRating](./vertexai-preview.safetyrating.md#safetyrating_interface) | A safety rating associated with a [GenerateContentCandidate](./vertexai-preview.generatecontentcandidate.md#generatecontentcandidate_interface) | | [SafetySetting](./vertexai-preview.safetysetting.md#safetysetting_interface) | Safety setting that can be sent as part of request parameters. | +| [SchemaInterface](./vertexai-preview.schemainterface.md#schemainterface_interface) | Interface for [Schema](./vertexai-preview.schema.md#schema_class) class. | +| [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) | Params passed to [Schema](./vertexai-preview.schema.md#schema_class) static methods to create specific [Schema](./vertexai-preview.schema.md#schema_class) classes. | +| [SchemaRequest](./vertexai-preview.schemarequest.md#schemarequest_interface) | Final format for [Schema](./vertexai-preview.schema.md#schema_class) params passed to backend requests. | +| [SchemaShared](./vertexai-preview.schemashared.md#schemashared_interface) | Basic [Schema](./vertexai-preview.schema.md#schema_class) properties shared across several Schema-related types. | | [Segment](./vertexai-preview.segment.md#segment_interface) | | | [StartChatParams](./vertexai-preview.startchatparams.md#startchatparams_interface) | Params for [GenerativeModel.startChat()](./vertexai-preview.generativemodel.md#generativemodelstartchat). | | [TextPart](./vertexai-preview.textpart.md#textpart_interface) | Content part interface if the part represents a text string. | @@ -108,6 +118,7 @@ The Vertex AI in Firebase Web SDK. | [Part](./vertexai-preview.md#part) | Content part - includes text, image/video, or function call/response part types. | | [Role](./vertexai-preview.md#role) | Role is the producer of the content. | | [Tool](./vertexai-preview.md#tool) | Defines a tool that model can call to access external knowledge. | +| [TypedSchema](./vertexai-preview.md#typedschema) | A type that includes all specific Schema types. | ## function(app, ...) @@ -196,6 +207,16 @@ Defines a tool that model can call to access external knowledge. export declare type Tool = FunctionDeclarationsTool; ``` +## TypedSchema + +A type that includes all specific Schema types. + +Signature: + +```typescript +export declare type TypedSchema = IntegerSchema | NumberSchema | StringSchema | BooleanSchema | ObjectSchema | ArraySchema; +``` + ## BlockReason Reason that a prompt was blocked. @@ -253,27 +274,6 @@ export declare enum FunctionCallingMode | MODE\_UNSPECIFIED | "MODE_UNSPECIFIED" | | | NONE | "NONE" | | -## FunctionDeclarationSchemaType - -Contains the list of OpenAPI data types as defined by https://swagger.io/docs/specification/data-models/data-types/ - -Signature: - -```typescript -export declare enum FunctionDeclarationSchemaType -``` - -## Enumeration Members - -| Member | Value | Description | -| --- | --- | --- | -| ARRAY | "ARRAY" | Array type. | -| BOOLEAN | "BOOLEAN" | Boolean type. | -| INTEGER | "INTEGER" | Integer type. | -| NUMBER | "NUMBER" | Number type. | -| OBJECT | "OBJECT" | Object type. | -| STRING | "STRING" | String type. | - ## HarmBlockMethod @@ -371,6 +371,27 @@ export declare enum HarmSeverity | HARM\_SEVERITY\_NEGLIGIBLE | "HARM_SEVERITY_NEGLIGIBLE" | | | HARM\_SEVERITY\_UNSPECIFIED | "HARM_SEVERITY_UNSPECIFIED" | | +## SchemaType + +Contains the list of OpenAPI data types as defined by the [OpenAPI specification](https://swagger.io/docs/specification/data-models/data-types/) + +Signature: + +```typescript +export declare enum SchemaType +``` + +## Enumeration Members + +| Member | Value | Description | +| --- | --- | --- | +| ARRAY | "array" | Array type. | +| BOOLEAN | "boolean" | Boolean type. | +| INTEGER | "integer" | Integer type. | +| NUMBER | "number" | Number type. | +| OBJECT | "object" | Object type. | +| STRING | "string" | String type. | + ## VertexAIErrorCode Standardized error codes that [VertexAIError](./vertexai-preview.vertexaierror.md#vertexaierror_class) can have. @@ -388,6 +409,7 @@ export declare const enum VertexAIErrorCode | ERROR | "error" | A generic error occurred. | | FETCH\_ERROR | "fetch-error" | An error occurred while performing a fetch. | | INVALID\_CONTENT | "invalid-content" | An error associated with a Content object. | +| INVALID\_SCHEMA | "invalid-schema" | An error due to invalid Schema input. | | NO\_API\_KEY | "no-api-key" | An error occurred due to a missing Firebase API key. | | NO\_MODEL | "no-model" | An error occurred due to a model name not being specified during initialization. | | NO\_PROJECT\_ID | "no-project-id" | An error occurred due to a missing project ID. | diff --git a/docs-devsite/vertexai-preview.numberschema.md b/docs-devsite/vertexai-preview.numberschema.md new file mode 100644 index 00000000000..5470ab42c54 --- /dev/null +++ b/docs-devsite/vertexai-preview.numberschema.md @@ -0,0 +1,43 @@ +Project: /docs/reference/js/_project.yaml +Book: /docs/reference/_book.yaml +page_type: reference + +{% comment %} +DO NOT EDIT THIS FILE! +This is generated by the JS SDK team, and any local changes will be +overwritten. Changes should be made in the source code at +https://github.com/firebase/firebase-js-sdk +{% endcomment %} + +# NumberSchema class +Schema class for "number" types. + +Signature: + +```typescript +export declare class NumberSchema extends Schema +``` +Extends: [Schema](./vertexai-preview.schema.md#schema_class) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(schemaParams)](./vertexai-preview.numberschema.md#numberschemaconstructor) | | Constructs a new instance of the NumberSchema class | + +## NumberSchema.(constructor) + +Constructs a new instance of the `NumberSchema` class + +Signature: + +```typescript +constructor(schemaParams?: SchemaParams); +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| schemaParams | [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) | | + diff --git a/docs-devsite/vertexai-preview.objectschema.md b/docs-devsite/vertexai-preview.objectschema.md new file mode 100644 index 00000000000..c1287955597 --- /dev/null +++ b/docs-devsite/vertexai-preview.objectschema.md @@ -0,0 +1,71 @@ +Project: /docs/reference/js/_project.yaml +Book: /docs/reference/_book.yaml +page_type: reference + +{% comment %} +DO NOT EDIT THIS FILE! +This is generated by the JS SDK team, and any local changes will be +overwritten. Changes should be made in the source code at +https://github.com/firebase/firebase-js-sdk +{% endcomment %} + +# ObjectSchema class +Schema class for "object" types. The `properties` param must be a map of Schema. + +Signature: + +```typescript +export declare class ObjectSchema extends Schema +``` +Extends: [Schema](./vertexai-preview.schema.md#schema_class) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(schemaParams, properties, optionalProperties)](./vertexai-preview.objectschema.md#objectschemaconstructor) | | Constructs a new instance of the ObjectSchema class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [optionalProperties](./vertexai-preview.objectschema.md#objectschemaoptionalproperties) | | string\[\] | | +| [properties](./vertexai-preview.objectschema.md#objectschemaproperties) | | { \[k: string\]: [TypedSchema](./vertexai-preview.md#typedschema); } | | + +## ObjectSchema.(constructor) + +Constructs a new instance of the `ObjectSchema` class + +Signature: + +```typescript +constructor(schemaParams: SchemaParams, properties: { + [k: string]: TypedSchema; + }, optionalProperties?: string[]); +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| schemaParams | [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) | | +| properties | { \[k: string\]: [TypedSchema](./vertexai-preview.md#typedschema); } | | +| optionalProperties | string\[\] | | + +## ObjectSchema.optionalProperties + +Signature: + +```typescript +optionalProperties: string[]; +``` + +## ObjectSchema.properties + +Signature: + +```typescript +properties: { + [k: string]: TypedSchema; + }; +``` diff --git a/docs-devsite/vertexai-preview.objectschemainterface.md b/docs-devsite/vertexai-preview.objectschemainterface.md new file mode 100644 index 00000000000..4bc9ebfc3d1 --- /dev/null +++ b/docs-devsite/vertexai-preview.objectschemainterface.md @@ -0,0 +1,43 @@ +Project: /docs/reference/js/_project.yaml +Book: /docs/reference/_book.yaml +page_type: reference + +{% comment %} +DO NOT EDIT THIS FILE! +This is generated by the JS SDK team, and any local changes will be +overwritten. Changes should be made in the source code at +https://github.com/firebase/firebase-js-sdk +{% endcomment %} + +# ObjectSchemaInterface interface +Interface for [ObjectSchema](./vertexai-preview.objectschema.md#objectschema_class) class. + +Signature: + +```typescript +export interface ObjectSchemaInterface extends SchemaInterface +``` +Extends: [SchemaInterface](./vertexai-preview.schemainterface.md#schemainterface_interface) + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [optionalProperties](./vertexai-preview.objectschemainterface.md#objectschemainterfaceoptionalproperties) | string\[\] | | +| [type](./vertexai-preview.objectschemainterface.md#objectschemainterfacetype) | [SchemaType.OBJECT](./vertexai-preview.md#schematypeobject_enummember) | | + +## ObjectSchemaInterface.optionalProperties + +Signature: + +```typescript +optionalProperties?: string[]; +``` + +## ObjectSchemaInterface.type + +Signature: + +```typescript +type: SchemaType.OBJECT; +``` diff --git a/docs-devsite/vertexai-preview.schema.md b/docs-devsite/vertexai-preview.schema.md new file mode 100644 index 00000000000..25c3fc5e067 --- /dev/null +++ b/docs-devsite/vertexai-preview.schema.md @@ -0,0 +1,250 @@ +Project: /docs/reference/js/_project.yaml +Book: /docs/reference/_book.yaml +page_type: reference + +{% comment %} +DO NOT EDIT THIS FILE! +This is generated by the JS SDK team, and any local changes will be +overwritten. Changes should be made in the source code at +https://github.com/firebase/firebase-js-sdk +{% endcomment %} + +# Schema class +Parent class encompassing all Schema types, with static methods that allow building specific Schema types. This class can be converted with `JSON.stringify()` into a JSON string accepted by Vertex AI REST endpoints. (This string conversion is automatically done when calling SDK methods.) + +Signature: + +```typescript +export declare abstract class Schema implements SchemaInterface +``` +Implements: [SchemaInterface](./vertexai-preview.schemainterface.md#schemainterface_interface) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(schemaParams)](./vertexai-preview.schema.md#schemaconstructor) | | Constructs a new instance of the Schema class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [description](./vertexai-preview.schema.md#schemadescription) | | string | Optional. The description of the property. | +| [example](./vertexai-preview.schema.md#schemaexample) | | unknown | Optional. The example of the property. | +| [format](./vertexai-preview.schema.md#schemaformat) | | string | Optional. The format of the property. Supported formats:
| +| [nullable](./vertexai-preview.schema.md#schemanullable) | | boolean | Optional. Whether the property is nullable. Defaults to false. | +| [type](./vertexai-preview.schema.md#schematype) | | [SchemaType](./vertexai-preview.md#schematype) | Optional. The type of the property. [SchemaType](./vertexai-preview.md#schematype). | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [array(arrayParams)](./vertexai-preview.schema.md#schemaarray) | static | | +| [boolean(booleanParams)](./vertexai-preview.schema.md#schemaboolean) | static | | +| [enumString(stringParams)](./vertexai-preview.schema.md#schemaenumstring) | static | | +| [integer(integerParams)](./vertexai-preview.schema.md#schemainteger) | static | | +| [number(numberParams)](./vertexai-preview.schema.md#schemanumber) | static | | +| [object(objectParams)](./vertexai-preview.schema.md#schemaobject) | static | | +| [string(stringParams)](./vertexai-preview.schema.md#schemastring) | static | | + +## Schema.(constructor) + +Constructs a new instance of the `Schema` class + +Signature: + +```typescript +constructor(schemaParams: SchemaInterface); +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| schemaParams | [SchemaInterface](./vertexai-preview.schemainterface.md#schemainterface_interface) | | + +## Schema.description + +Optional. The description of the property. + +Signature: + +```typescript +description?: string; +``` + +## Schema.example + +Optional. The example of the property. + +Signature: + +```typescript +example?: unknown; +``` + +## Schema.format + +Optional. The format of the property. Supported formats:
+ +Signature: + +```typescript +format?: string; +``` + +## Schema.nullable + +Optional. Whether the property is nullable. Defaults to false. + +Signature: + +```typescript +nullable: boolean; +``` + +## Schema.type + +Optional. The type of the property. [SchemaType](./vertexai-preview.md#schematype). + +Signature: + +```typescript +type: SchemaType; +``` + +## Schema.array() + +Signature: + +```typescript +static array(arrayParams: SchemaParams & { + items: Schema; + }): ArraySchema; +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| arrayParams | [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) & { items: [Schema](./vertexai-preview.schema.md#schema_class); } | | + +Returns: + +[ArraySchema](./vertexai-preview.arrayschema.md#arrayschema_class) + +## Schema.boolean() + +Signature: + +```typescript +static boolean(booleanParams?: SchemaParams): BooleanSchema; +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| booleanParams | [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) | | + +Returns: + +[BooleanSchema](./vertexai-preview.booleanschema.md#booleanschema_class) + +## Schema.enumString() + +Signature: + +```typescript +static enumString(stringParams: SchemaParams & { + enum: string[]; + }): StringSchema; +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| stringParams | [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) & { enum: string\[\]; } | | + +Returns: + +[StringSchema](./vertexai-preview.stringschema.md#stringschema_class) + +## Schema.integer() + +Signature: + +```typescript +static integer(integerParams?: SchemaParams): IntegerSchema; +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| integerParams | [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) | | + +Returns: + +[IntegerSchema](./vertexai-preview.integerschema.md#integerschema_class) + +## Schema.number() + +Signature: + +```typescript +static number(numberParams?: SchemaParams): NumberSchema; +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| numberParams | [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) | | + +Returns: + +[NumberSchema](./vertexai-preview.numberschema.md#numberschema_class) + +## Schema.object() + +Signature: + +```typescript +static object(objectParams: SchemaParams & { + properties: { + [k: string]: Schema; + }; + optionalProperties?: string[]; + }): ObjectSchema; +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| objectParams | [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) & { properties: { \[k: string\]: [Schema](./vertexai-preview.schema.md#schema_class); }; optionalProperties?: string\[\]; } | | + +Returns: + +[ObjectSchema](./vertexai-preview.objectschema.md#objectschema_class) + +## Schema.string() + +Signature: + +```typescript +static string(stringParams?: SchemaParams): StringSchema; +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| stringParams | [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) | | + +Returns: + +[StringSchema](./vertexai-preview.stringschema.md#stringschema_class) + diff --git a/docs-devsite/vertexai-preview.schemainterface.md b/docs-devsite/vertexai-preview.schemainterface.md new file mode 100644 index 00000000000..306493e4097 --- /dev/null +++ b/docs-devsite/vertexai-preview.schemainterface.md @@ -0,0 +1,36 @@ +Project: /docs/reference/js/_project.yaml +Book: /docs/reference/_book.yaml +page_type: reference + +{% comment %} +DO NOT EDIT THIS FILE! +This is generated by the JS SDK team, and any local changes will be +overwritten. Changes should be made in the source code at +https://github.com/firebase/firebase-js-sdk +{% endcomment %} + +# SchemaInterface interface +Interface for [Schema](./vertexai-preview.schema.md#schema_class) class. + +Signature: + +```typescript +export interface SchemaInterface extends SchemaShared +``` +Extends: [SchemaShared](./vertexai-preview.schemashared.md#schemashared_interface)<[SchemaInterface](./vertexai-preview.schemainterface.md#schemainterface_interface)> + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [type](./vertexai-preview.schemainterface.md#schemainterfacetype) | [SchemaType](./vertexai-preview.md#schematype) | The type of the property. [SchemaType](./vertexai-preview.md#schematype). | + +## SchemaInterface.type + +The type of the property. [SchemaType](./vertexai-preview.md#schematype). + +Signature: + +```typescript +type: SchemaType; +``` diff --git a/docs-devsite/vertexai-preview.schemaparams.md b/docs-devsite/vertexai-preview.schemaparams.md new file mode 100644 index 00000000000..d57b88c803d --- /dev/null +++ b/docs-devsite/vertexai-preview.schemaparams.md @@ -0,0 +1,21 @@ +Project: /docs/reference/js/_project.yaml +Book: /docs/reference/_book.yaml +page_type: reference + +{% comment %} +DO NOT EDIT THIS FILE! +This is generated by the JS SDK team, and any local changes will be +overwritten. Changes should be made in the source code at +https://github.com/firebase/firebase-js-sdk +{% endcomment %} + +# SchemaParams interface +Params passed to [Schema](./vertexai-preview.schema.md#schema_class) static methods to create specific [Schema](./vertexai-preview.schema.md#schema_class) classes. + +Signature: + +```typescript +export interface SchemaParams extends SchemaShared +``` +Extends: [SchemaShared](./vertexai-preview.schemashared.md#schemashared_interface)<[SchemaInterface](./vertexai-preview.schemainterface.md#schemainterface_interface)> + diff --git a/docs-devsite/vertexai-preview.schemarequest.md b/docs-devsite/vertexai-preview.schemarequest.md new file mode 100644 index 00000000000..e011cfb29b6 --- /dev/null +++ b/docs-devsite/vertexai-preview.schemarequest.md @@ -0,0 +1,47 @@ +Project: /docs/reference/js/_project.yaml +Book: /docs/reference/_book.yaml +page_type: reference + +{% comment %} +DO NOT EDIT THIS FILE! +This is generated by the JS SDK team, and any local changes will be +overwritten. Changes should be made in the source code at +https://github.com/firebase/firebase-js-sdk +{% endcomment %} + +# SchemaRequest interface +Final format for [Schema](./vertexai-preview.schema.md#schema_class) params passed to backend requests. + +Signature: + +```typescript +export interface SchemaRequest extends SchemaShared +``` +Extends: [SchemaShared](./vertexai-preview.schemashared.md#schemashared_interface)<[SchemaRequest](./vertexai-preview.schemarequest.md#schemarequest_interface)> + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [required](./vertexai-preview.schemarequest.md#schemarequestrequired) | string\[\] | Optional. Array of required property. | +| [type](./vertexai-preview.schemarequest.md#schemarequesttype) | [SchemaType](./vertexai-preview.md#schematype) | The type of the property. [SchemaType](./vertexai-preview.md#schematype). | + +## SchemaRequest.required + +Optional. Array of required property. + +Signature: + +```typescript +required?: string[]; +``` + +## SchemaRequest.type + +The type of the property. [SchemaType](./vertexai-preview.md#schematype). + +Signature: + +```typescript +type: SchemaType; +``` diff --git a/docs-devsite/vertexai-preview.schemashared.md b/docs-devsite/vertexai-preview.schemashared.md new file mode 100644 index 00000000000..43063b3f1fc --- /dev/null +++ b/docs-devsite/vertexai-preview.schemashared.md @@ -0,0 +1,103 @@ +Project: /docs/reference/js/_project.yaml +Book: /docs/reference/_book.yaml +page_type: reference + +{% comment %} +DO NOT EDIT THIS FILE! +This is generated by the JS SDK team, and any local changes will be +overwritten. Changes should be made in the source code at +https://github.com/firebase/firebase-js-sdk +{% endcomment %} + +# SchemaShared interface +Basic [Schema](./vertexai-preview.schema.md#schema_class) properties shared across several Schema-related types. + +Signature: + +```typescript +export interface SchemaShared +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [description](./vertexai-preview.schemashared.md#schemashareddescription) | string | Optional. The description of the property. | +| [enum](./vertexai-preview.schemashared.md#schemasharedenum) | string\[\] | Optional. The enum of the property. | +| [example](./vertexai-preview.schemashared.md#schemasharedexample) | unknown | Optional. The example of the property. | +| [format](./vertexai-preview.schemashared.md#schemasharedformat) | string | Optional. The format of the property. | +| [items](./vertexai-preview.schemashared.md#schemashareditems) | T | Optional. The items of the property. | +| [nullable](./vertexai-preview.schemashared.md#schemasharednullable) | boolean | Optional. Whether the property is nullable. | +| [properties](./vertexai-preview.schemashared.md#schemasharedproperties) | { \[k: string\]: T; } | Optional. Map of Schemas. | + +## SchemaShared.description + +Optional. The description of the property. + +Signature: + +```typescript +description?: string; +``` + +## SchemaShared.enum + +Optional. The enum of the property. + +Signature: + +```typescript +enum?: string[]; +``` + +## SchemaShared.example + +Optional. The example of the property. + +Signature: + +```typescript +example?: unknown; +``` + +## SchemaShared.format + +Optional. The format of the property. + +Signature: + +```typescript +format?: string; +``` + +## SchemaShared.items + +Optional. The items of the property. + +Signature: + +```typescript +items?: T; +``` + +## SchemaShared.nullable + +Optional. Whether the property is nullable. + +Signature: + +```typescript +nullable?: boolean; +``` + +## SchemaShared.properties + +Optional. Map of Schemas. + +Signature: + +```typescript +properties?: { + [k: string]: T; + }; +``` diff --git a/docs-devsite/vertexai-preview.stringschema.md b/docs-devsite/vertexai-preview.stringschema.md new file mode 100644 index 00000000000..4701b90838a --- /dev/null +++ b/docs-devsite/vertexai-preview.stringschema.md @@ -0,0 +1,57 @@ +Project: /docs/reference/js/_project.yaml +Book: /docs/reference/_book.yaml +page_type: reference + +{% comment %} +DO NOT EDIT THIS FILE! +This is generated by the JS SDK team, and any local changes will be +overwritten. Changes should be made in the source code at +https://github.com/firebase/firebase-js-sdk +{% endcomment %} + +# StringSchema class +Schema class for "string" types. Can be used with or without enum values. + +Signature: + +```typescript +export declare class StringSchema extends Schema +``` +Extends: [Schema](./vertexai-preview.schema.md#schema_class) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(schemaParams, enumValues)](./vertexai-preview.stringschema.md#stringschemaconstructor) | | Constructs a new instance of the StringSchema class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [enum](./vertexai-preview.stringschema.md#stringschemaenum) | | string\[\] | | + +## StringSchema.(constructor) + +Constructs a new instance of the `StringSchema` class + +Signature: + +```typescript +constructor(schemaParams?: SchemaParams, enumValues?: string[]); +``` + +#### Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| schemaParams | [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) | | +| enumValues | string\[\] | | + +## StringSchema.enum + +Signature: + +```typescript +enum?: string[]; +``` diff --git a/docs-devsite/vertexai-preview.vertexaierror.md b/docs-devsite/vertexai-preview.vertexaierror.md index 8ad434d0988..7659d6aa21c 100644 --- a/docs-devsite/vertexai-preview.vertexaierror.md +++ b/docs-devsite/vertexai-preview.vertexaierror.md @@ -31,7 +31,6 @@ export declare class VertexAIError extends FirebaseError | --- | --- | --- | --- | | [code](./vertexai-preview.vertexaierror.md#vertexaierrorcode) | | [VertexAIErrorCode](./vertexai-preview.md#vertexaierrorcode) | | | [customErrorData](./vertexai-preview.vertexaierror.md#vertexaierrorcustomerrordata) | | [CustomErrorData](./vertexai-preview.customerrordata.md#customerrordata_interface) \| undefined | | -| [message](./vertexai-preview.vertexaierror.md#vertexaierrormessage) | | string | | ## VertexAIError.(constructor) @@ -66,11 +65,3 @@ readonly code: VertexAIErrorCode; ```typescript readonly customErrorData?: CustomErrorData | undefined; ``` - -## VertexAIError.message - -Signature: - -```typescript -readonly message: string; -``` diff --git a/packages/vertexai/src/requests/schema-builder.ts b/packages/vertexai/src/requests/schema-builder.ts index 0d85e51022d..8a36aaa8997 100644 --- a/packages/vertexai/src/requests/schema-builder.ts +++ b/packages/vertexai/src/requests/schema-builder.ts @@ -28,7 +28,7 @@ import { /** * Parent class encompassing all Schema types, with static methods that * allow building specific Schema types. This class can be converted with - * JSON.stringify() into a JSON string accepted by Vertex REST endpoints. + * `JSON.stringify()` into a JSON string accepted by Vertex AI REST endpoints. * (This string conversion is automatically done when calling SDK methods.) * @public */ @@ -39,10 +39,12 @@ export abstract class Schema implements SchemaInterface { */ type: SchemaType; /** Optional. The format of the property. - * Supported formats: - * for NUMBER type: "float", "double" - * for INTEGER type: "int32", "int64" - * for STRING type: "email", "byte", etc + * Supported formats:
+ *
    + *
  • for NUMBER type: "float", "double"
  • + *
  • for INTEGER type: "int32", "int64"
  • + *
  • for STRING type: "email", "byte", etc
  • + *
*/ format?: string; /** Optional. The description of the property. */ @@ -72,6 +74,7 @@ export abstract class Schema implements SchemaInterface { /** * Defines how this Schema should be serialized as JSON. * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#tojson_behavior + * @internal */ toJSON(): SchemaRequest { const obj: { type: SchemaType; [key: string]: unknown } = { @@ -198,6 +201,9 @@ export class StringSchema extends Schema { this.enum = enumValues; } + /** + * @internal + */ toJSON(): SchemaRequest { const obj = super.toJSON(); if (this.enum) { @@ -221,6 +227,9 @@ export class ArraySchema extends Schema { }); } + /** + * @internal + */ toJSON(): SchemaRequest { const obj = super.toJSON(); obj.items = this.items.toJSON(); @@ -247,6 +256,9 @@ export class ObjectSchema extends Schema { }); } + /** + * @internal + */ toJSON(): SchemaRequest { const obj = super.toJSON(); obj.properties = { ...this.properties }; diff --git a/packages/vertexai/src/types/requests.ts b/packages/vertexai/src/types/requests.ts index dadce412e62..335e7e7dc72 100644 --- a/packages/vertexai/src/types/requests.ts +++ b/packages/vertexai/src/types/requests.ts @@ -80,8 +80,8 @@ export interface GenerationConfig { presencePenalty?: number; frequencyPenalty?: number; /** - * Output response mimetype of the generated candidate text. - * Supported mimetypes are `text/plain` (default, text output) and `application/json` + * Output response MIME type of the generated candidate text. + * Supported MIME types are `text/plain` (default, text output) and `application/json` * (JSON response in the candidates). */ responseMimeType?: string; @@ -90,7 +90,7 @@ export interface GenerationConfig { * value can be a class generated with a {@link Schema} static method * like `Schema.string()` or `Schema.object()` or it can be a plain * JS object matching the {@link SchemaRequest} interface. - * Note: This only applies when the specified `responseMIMEType` supports a schema; currently + *
Note: This only applies when the specified `responseMIMEType` supports a schema; currently * this is limited to `application/json`. */ responseSchema?: TypedSchema | SchemaRequest; diff --git a/packages/vertexai/src/types/schema.ts b/packages/vertexai/src/types/schema.ts index 4ece04801a5..7b8f34d89d6 100644 --- a/packages/vertexai/src/types/schema.ts +++ b/packages/vertexai/src/types/schema.ts @@ -17,7 +17,8 @@ /** * Contains the list of OpenAPI data types - * as defined by https://swagger.io/docs/specification/data-models/data-types/ + * as defined by the + * {@link https://swagger.io/docs/specification/data-models/data-types/ | OpenAPI specification} * @public */ export enum SchemaType { @@ -36,7 +37,7 @@ export enum SchemaType { } /** - * Basic `Schema` properties shared across several Schema-related + * Basic {@link Schema} properties shared across several Schema-related * types. * @public */ @@ -61,13 +62,14 @@ export interface SchemaShared { } /** - * User-facing params passed to specific Schema static methods. + * Params passed to {@link Schema} static methods to create specific + * {@link Schema} classes. * @public */ export interface SchemaParams extends SchemaShared {} /** - * Final format for Schema params passed to backend requests. + * Final format for {@link Schema} params passed to backend requests. * @public */ export interface SchemaRequest extends SchemaShared { @@ -81,7 +83,7 @@ export interface SchemaRequest extends SchemaShared { } /** - * Interface for Schema class. + * Interface for {@link Schema} class. * @public */ export interface SchemaInterface extends SchemaShared { @@ -93,7 +95,7 @@ export interface SchemaInterface extends SchemaShared { } /** - * Interface for ObjectSchema class. + * Interface for {@link ObjectSchema} class. * @public */ export interface ObjectSchemaInterface extends SchemaInterface {