import {z} from 'zod' export type GoogleCloudAiplatformV1AudioTranscriptionConfigLanguageAuto = Record; export type GoogleCloudAiplatformV1AudioTranscriptionConfigLanguageHints = {languageCodes?: Array | undefined}; export type GoogleCloudAiplatformV1AudioTranscriptionConfig = {adaptationPhrases?: Array | undefined, customVocabulary?: Array | undefined, diarization?: boolean | undefined, languageAuto?: GoogleCloudAiplatformV1AudioTranscriptionConfigLanguageAuto | undefined, languageCodes?: Array | undefined, languageHints?: GoogleCloudAiplatformV1AudioTranscriptionConfigLanguageHints | undefined, mode?: ('MODE_UNSPECIFIED' | 'VERBATIM' | 'SMART') | undefined, sourceText?: string | undefined, wordTimestamp?: boolean | undefined}; export type GoogleCloudAiplatformV1ImageConfigImageOutputOptions = {compressionQuality?: number | undefined, mimeType?: string | undefined}; export type GoogleCloudAiplatformV1ImageConfig = {aspectRatio?: string | undefined, imageOutputOptions?: GoogleCloudAiplatformV1ImageConfigImageOutputOptions | undefined, imageSize?: string | undefined, personGeneration?: ('PERSON_GENERATION_UNSPECIFIED' | 'ALLOW_ALL' | 'ALLOW_ADULT' | 'ALLOW_NONE') | undefined, prominentPeople?: ('PROMINENT_PEOPLE_UNSPECIFIED' | 'ALLOW_PROMINENT_PEOPLE' | 'BLOCK_PROMINENT_PEOPLE') | undefined}; export type GoogleCloudAiplatformV1AudioResponseFormat = {bitRate?: number | undefined, delivery?: ('DELIVERY_UNSPECIFIED' | 'INLINE' | 'URI') | undefined, mimeType?: ('MIME_TYPE_UNSPECIFIED' | 'AUDIO_MP3' | 'AUDIO_OGG_OPUS' | 'AUDIO_L16' | 'AUDIO_WAV' | 'AUDIO_ALAW' | 'AUDIO_MULAW') | undefined, sampleRate?: number | undefined}; export type GoogleCloudAiplatformV1ImageResponseFormat = {aspectRatio?: ('ASPECT_RATIO_UNSPECIFIED' | 'ASPECT_RATIO_ONE_BY_ONE' | 'ASPECT_RATIO_TWO_BY_THREE' | 'ASPECT_RATIO_THREE_BY_TWO' | 'ASPECT_RATIO_THREE_BY_FOUR' | 'ASPECT_RATIO_FOUR_BY_THREE' | 'ASPECT_RATIO_FOUR_BY_FIVE' | 'ASPECT_RATIO_FIVE_BY_FOUR' | 'ASPECT_RATIO_NINE_BY_SIXTEEN' | 'ASPECT_RATIO_SIXTEEN_BY_NINE' | 'ASPECT_RATIO_TWENTY_ONE_BY_NINE' | 'ASPECT_RATIO_ONE_BY_EIGHT' | 'ASPECT_RATIO_EIGHT_BY_ONE' | 'ASPECT_RATIO_ONE_BY_FOUR' | 'ASPECT_RATIO_FOUR_BY_ONE') | undefined, delivery?: ('DELIVERY_UNSPECIFIED' | 'INLINE' | 'URI') | undefined, imageSize?: ('IMAGE_SIZE_UNSPECIFIED' | 'IMAGE_SIZE_FIVE_TWELVE' | 'IMAGE_SIZE_ONE_K' | 'IMAGE_SIZE_TWO_K' | 'IMAGE_SIZE_FOUR_K') | undefined, mimeType?: ('MIME_TYPE_UNSPECIFIED' | 'IMAGE_JPEG') | undefined}; export type GoogleCloudAiplatformV1TextResponseFormat = {mimeType?: ('MIME_TYPE_UNSPECIFIED' | 'APPLICATION_JSON' | 'TEXT_PLAIN') | undefined, schema: unknown}; export type GoogleCloudAiplatformV1VideoResponseFormat = {aspectRatio?: ('ASPECT_RATIO_UNSPECIFIED' | 'ASPECT_RATIO_SIXTEEN_BY_NINE' | 'ASPECT_RATIO_NINE_BY_SIXTEEN') | undefined, delivery?: ('DELIVERY_UNSPECIFIED' | 'INLINE' | 'URI') | undefined, duration?: unknown | undefined, gcsUri?: string | undefined, resolution?: string | undefined}; export type GoogleCloudAiplatformV1ResponseFormat = {audio?: GoogleCloudAiplatformV1AudioResponseFormat | undefined, image?: GoogleCloudAiplatformV1ImageResponseFormat | undefined, text?: GoogleCloudAiplatformV1TextResponseFormat | undefined, video?: GoogleCloudAiplatformV1VideoResponseFormat | undefined}; export type GoogleCloudAiplatformV1Schema = {additionalProperties: unknown, anyOf?: Array | undefined, default: unknown, defs?: {[key: string]: GoogleCloudAiplatformV1Schema} | undefined, description?: string | undefined, enum?: Array | undefined, example: unknown, format?: string | undefined, items?: GoogleCloudAiplatformV1Schema | undefined, maxItems?: unknown | undefined, maxLength?: unknown | undefined, maxProperties?: unknown | undefined, maximum?: number | undefined, minItems?: unknown | undefined, minLength?: unknown | undefined, minProperties?: unknown | undefined, minimum?: number | undefined, nullable?: boolean | undefined, pattern?: string | undefined, properties?: {[key: string]: GoogleCloudAiplatformV1Schema} | undefined, propertyOrdering?: Array | undefined, ref?: string | undefined, required?: Array | undefined, title?: string | undefined, type?: ('TYPE_UNSPECIFIED' | 'STRING' | 'NUMBER' | 'INTEGER' | 'BOOLEAN' | 'ARRAY' | 'OBJECT' | 'NULL') | undefined}; export type GoogleCloudAiplatformV1GenerationConfigRoutingConfigAutoRoutingMode = {modelRoutingPreference?: ('UNKNOWN' | 'PRIORITIZE_QUALITY' | 'BALANCED' | 'PRIORITIZE_COST') | undefined}; export type GoogleCloudAiplatformV1GenerationConfigRoutingConfigManualRoutingMode = {modelName?: string | undefined}; export type GoogleCloudAiplatformV1GenerationConfigRoutingConfig = {autoMode?: GoogleCloudAiplatformV1GenerationConfigRoutingConfigAutoRoutingMode | undefined, manualMode?: GoogleCloudAiplatformV1GenerationConfigRoutingConfigManualRoutingMode | undefined}; export type GoogleCloudAiplatformV1PrebuiltVoiceConfig = {voiceName?: string | undefined}; export type GoogleCloudAiplatformV1ReplicatedVoiceConfig = {mimeType?: string | undefined, voiceSampleAudio?: string | undefined}; export type GoogleCloudAiplatformV1VoiceConfig = {prebuiltVoiceConfig?: GoogleCloudAiplatformV1PrebuiltVoiceConfig | undefined, replicatedVoiceConfig?: GoogleCloudAiplatformV1ReplicatedVoiceConfig | undefined, voice?: string | undefined}; export type GoogleCloudAiplatformV1SpeakerVoiceConfig = {speaker?: string | undefined, voiceConfig?: GoogleCloudAiplatformV1VoiceConfig | undefined}; export type GoogleCloudAiplatformV1MultiSpeakerVoiceConfig = {speakerVoiceConfigs?: Array | undefined}; export type GoogleCloudAiplatformV1SpeechConfig = {languageCode?: string | undefined, multiSpeakerVoiceConfig?: GoogleCloudAiplatformV1MultiSpeakerVoiceConfig | undefined, voiceConfig?: GoogleCloudAiplatformV1VoiceConfig | undefined}; export type GoogleCloudAiplatformV1GenerationConfigThinkingConfig = {includeThoughts?: boolean | undefined, thinkingBudget?: number | undefined, thinkingLevel?: ('THINKING_LEVEL_UNSPECIFIED' | 'LOW' | 'MEDIUM' | 'HIGH' | 'MINIMAL') | undefined}; export type GoogleCloudAiplatformV1TranslationConfig = {echoTargetLanguage?: boolean | undefined, targetLanguageCode?: string | undefined}; export type GoogleCloudAiplatformV1GenerationConfig = {audioTimestamp?: boolean | undefined, audioTranscriptionConfig?: GoogleCloudAiplatformV1AudioTranscriptionConfig | undefined, candidateCount?: number | undefined, enableAffectiveDialog?: boolean | undefined, frequencyPenalty?: number | undefined, imageConfig?: GoogleCloudAiplatformV1ImageConfig | undefined, logprobs?: number | undefined, maxOutputTokens?: number | undefined, mediaResolution?: ('MEDIA_RESOLUTION_UNSPECIFIED' | 'MEDIA_RESOLUTION_LOW' | 'MEDIA_RESOLUTION_MEDIUM' | 'MEDIA_RESOLUTION_HIGH') | undefined, presencePenalty?: number | undefined, responseFormat?: Array | undefined, responseJsonSchema: unknown, responseLogprobs?: boolean | undefined, responseMimeType?: string | undefined, responseModalities?: (Array<'MODALITY_UNSPECIFIED' | 'TEXT' | 'IMAGE' | 'AUDIO' | 'VIDEO'>) | undefined, responseSchema?: GoogleCloudAiplatformV1Schema | undefined, routingConfig?: GoogleCloudAiplatformV1GenerationConfigRoutingConfig | undefined, seed?: number | undefined, speechConfig?: GoogleCloudAiplatformV1SpeechConfig | undefined, stopSequences?: Array | undefined, temperature?: number | undefined, thinkingConfig?: GoogleCloudAiplatformV1GenerationConfigThinkingConfig | undefined, topK?: number | undefined, topP?: number | undefined, translationConfig?: GoogleCloudAiplatformV1TranslationConfig | undefined}; export type GoogleCloudAiplatformV1AutoraterConfig = {autoraterModel?: string | undefined, flipEnabled?: boolean | undefined, generationConfig?: GoogleCloudAiplatformV1GenerationConfig | undefined, samplingCount?: number | undefined}; export type GoogleCloudAiplatformV1BleuInstance = {prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1BleuSpec = {useEffectiveOrder?: boolean | undefined}; export type GoogleCloudAiplatformV1BleuInput = {instances?: Array | undefined, metricSpec?: GoogleCloudAiplatformV1BleuSpec | undefined}; export type GoogleCloudAiplatformV1CoherenceInstance = {prediction?: string | undefined}; export type GoogleCloudAiplatformV1CoherenceSpec = {version?: number | undefined}; export type GoogleCloudAiplatformV1CoherenceInput = {instance?: GoogleCloudAiplatformV1CoherenceInstance | undefined, metricSpec?: GoogleCloudAiplatformV1CoherenceSpec | undefined}; export type GoogleCloudAiplatformV1CometInstance = {prediction?: string | undefined, reference?: string | undefined, source?: string | undefined}; export type GoogleCloudAiplatformV1CometSpec = {sourceLanguage?: string | undefined, targetLanguage?: string | undefined, version?: ('COMET_VERSION_UNSPECIFIED' | 'COMET_22_SRC_REF') | undefined}; export type GoogleCloudAiplatformV1CometInput = {instance?: GoogleCloudAiplatformV1CometInstance | undefined, metricSpec?: GoogleCloudAiplatformV1CometSpec | undefined}; export type GoogleCloudAiplatformV1ExactMatchInstance = {prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1ExactMatchSpec = Record; export type GoogleCloudAiplatformV1ExactMatchInput = {instances?: Array | undefined, metricSpec?: GoogleCloudAiplatformV1ExactMatchSpec | undefined}; export type GoogleCloudAiplatformV1FluencyInstance = {prediction?: string | undefined}; export type GoogleCloudAiplatformV1FluencySpec = {version?: number | undefined}; export type GoogleCloudAiplatformV1FluencyInput = {instance?: GoogleCloudAiplatformV1FluencyInstance | undefined, metricSpec?: GoogleCloudAiplatformV1FluencySpec | undefined}; export type GoogleCloudAiplatformV1FulfillmentInstance = {instruction?: string | undefined, prediction?: string | undefined}; export type GoogleCloudAiplatformV1FulfillmentSpec = {version?: number | undefined}; export type GoogleCloudAiplatformV1FulfillmentInput = {instance?: GoogleCloudAiplatformV1FulfillmentInstance | undefined, metricSpec?: GoogleCloudAiplatformV1FulfillmentSpec | undefined}; export type GoogleCloudAiplatformV1GroundednessInstance = {context?: string | undefined, prediction?: string | undefined}; export type GoogleCloudAiplatformV1GroundednessSpec = {version?: number | undefined}; export type GoogleCloudAiplatformV1GroundednessInput = {instance?: GoogleCloudAiplatformV1GroundednessInstance | undefined, metricSpec?: GoogleCloudAiplatformV1GroundednessSpec | undefined}; export type GoogleCloudAiplatformV1AudioTranscriptionWordInfo = {endOffset?: unknown | undefined, startOffset?: unknown | undefined, word?: string | undefined}; export type GoogleCloudAiplatformV1AudioTranscription = {speakerLabel?: string | undefined, text?: string | undefined, words?: Array | undefined}; export type GoogleCloudAiplatformV1CodeExecutionResult = {id?: string | undefined, outcome?: ('OUTCOME_UNSPECIFIED' | 'OUTCOME_OK' | 'OUTCOME_FAILED' | 'OUTCOME_DEADLINE_EXCEEDED') | undefined, output?: string | undefined}; export type GoogleCloudAiplatformV1ExecutableCode = {code?: string | undefined, id?: string | undefined, language?: ('LANGUAGE_UNSPECIFIED' | 'PYTHON') | undefined}; export type GoogleCloudAiplatformV1FileData = {displayName?: string | undefined, fileUri?: string | undefined, mimeType?: string | undefined}; export type GoogleCloudAiplatformV1PartialArg = {boolValue?: boolean | undefined, jsonPath?: string | undefined, nullValue?: 'NULL_VALUE' | undefined, numberValue?: number | undefined, stringValue?: string | undefined, willContinue?: boolean | undefined}; export type GoogleCloudAiplatformV1FunctionCall = {args?: {[key: string]: unknown} | undefined, id?: string | undefined, name?: string | undefined, partialArgs?: Array | undefined, willContinue?: boolean | undefined}; export type GoogleCloudAiplatformV1FunctionResponseFileData = {displayName?: string | undefined, fileUri?: string | undefined, mimeType?: string | undefined}; export type GoogleCloudAiplatformV1FunctionResponseBlob = {data?: string | undefined, displayName?: string | undefined, mimeType?: string | undefined}; export type GoogleCloudAiplatformV1FunctionResponsePart = {fileData?: GoogleCloudAiplatformV1FunctionResponseFileData | undefined, inlineData?: GoogleCloudAiplatformV1FunctionResponseBlob | undefined}; export type GoogleCloudAiplatformV1FunctionResponse = {id?: string | undefined, name?: string | undefined, parts?: Array | undefined, response?: {[key: string]: unknown} | undefined, scheduling?: ('SCHEDULING_UNSPECIFIED' | 'SILENT' | 'WHEN_IDLE' | 'INTERRUPT') | undefined}; export type GoogleCloudAiplatformV1Blob = {data?: string | undefined, displayName?: string | undefined, mimeType?: string | undefined}; export type GoogleCloudAiplatformV1PartMediaResolution = {level?: ('MEDIA_RESOLUTION_UNSPECIFIED' | 'MEDIA_RESOLUTION_LOW' | 'MEDIA_RESOLUTION_MEDIUM' | 'MEDIA_RESOLUTION_HIGH' | 'MEDIA_RESOLUTION_ULTRA_HIGH') | undefined}; export type GoogleCloudAiplatformV1SpeechMetadata = {speaker?: string | undefined, style?: string | undefined}; export type GoogleCloudAiplatformV1VideoMetadata = {endOffset?: unknown | undefined, fps?: number | undefined, startOffset?: unknown | undefined}; export type GoogleCloudAiplatformV1Part = {audioTranscription?: GoogleCloudAiplatformV1AudioTranscription | undefined, codeExecutionResult?: GoogleCloudAiplatformV1CodeExecutionResult | undefined, executableCode?: GoogleCloudAiplatformV1ExecutableCode | undefined, fileData?: GoogleCloudAiplatformV1FileData | undefined, functionCall?: GoogleCloudAiplatformV1FunctionCall | undefined, functionResponse?: GoogleCloudAiplatformV1FunctionResponse | undefined, inlineData?: GoogleCloudAiplatformV1Blob | undefined, mediaResolution?: GoogleCloudAiplatformV1PartMediaResolution | undefined, speechMetadata?: GoogleCloudAiplatformV1SpeechMetadata | undefined, text?: string | undefined, thought?: boolean | undefined, thoughtSignature?: string | undefined, videoMetadata?: GoogleCloudAiplatformV1VideoMetadata | undefined}; export type GoogleCloudAiplatformV1Content = {parts?: Array | undefined, role?: string | undefined}; export type GoogleCloudAiplatformV1EvaluationInstanceInstanceDataContents = {contents?: Array | undefined}; export type GoogleCloudAiplatformV1EvaluationInstanceInstanceData = {contents?: GoogleCloudAiplatformV1EvaluationInstanceInstanceDataContents | undefined, text?: string | undefined}; export type GoogleCloudAiplatformV1ToolCodeExecution = Record; export type GoogleCloudAiplatformV1ToolComputerUse = {disabledSafetyPolicies?: (Array<'SAFETY_POLICY_UNSPECIFIED' | 'FINANCIAL_TRANSACTIONS' | 'SENSITIVE_DATA_MODIFICATION' | 'COMMUNICATION_TOOL' | 'ACCOUNT_CREATION' | 'DATA_MODIFICATION' | 'USER_CONSENT_MANAGEMENT' | 'LEGAL_TERMS_AND_AGREEMENTS'>) | undefined, enablePromptInjectionDetection?: boolean | undefined, environment?: ('ENVIRONMENT_UNSPECIFIED' | 'ENVIRONMENT_BROWSER' | 'ENVIRONMENT_MOBILE' | 'ENVIRONMENT_DESKTOP') | undefined, excludedPredefinedFunctions?: Array | undefined}; export type GoogleCloudAiplatformV1EnterpriseWebSearch = {blockingConfidence?: ('PHISH_BLOCK_THRESHOLD_UNSPECIFIED' | 'BLOCK_LOW_AND_ABOVE' | 'BLOCK_MEDIUM_AND_ABOVE' | 'BLOCK_HIGH_AND_ABOVE' | 'BLOCK_HIGHER_AND_ABOVE' | 'BLOCK_VERY_HIGH_AND_ABOVE' | 'BLOCK_ONLY_EXTREMELY_HIGH') | undefined, excludeDomains?: Array | undefined}; export type GoogleCloudAiplatformV1ToolExaAiSearch = {apiKey?: string | undefined, customConfigs?: {[key: string]: unknown} | undefined}; export type GoogleCloudAiplatformV1FunctionDeclaration = {behavior?: ('UNSPECIFIED' | 'BLOCKING' | 'NON_BLOCKING') | undefined, description?: string | undefined, name?: string | undefined, parameters?: GoogleCloudAiplatformV1Schema | undefined, parametersJsonSchema: unknown, response?: GoogleCloudAiplatformV1Schema | undefined, responseJsonSchema: unknown}; export type GoogleCloudAiplatformV1GoogleMapsPlaces = Record; export type GoogleCloudAiplatformV1GoogleMapsRouting = Record; export type GoogleCloudAiplatformV1GoogleMapsGroundingTypes = {places?: GoogleCloudAiplatformV1GoogleMapsPlaces | undefined, routing?: GoogleCloudAiplatformV1GoogleMapsRouting | undefined}; export type GoogleCloudAiplatformV1GoogleMaps = {enableWidget?: boolean | undefined, groundingTypes?: GoogleCloudAiplatformV1GoogleMapsGroundingTypes | undefined}; export type GoogleCloudAiplatformV1ToolGoogleSearchImageSearch = Record; export type GoogleCloudAiplatformV1ToolGoogleSearchWebSearch = Record; export type GoogleCloudAiplatformV1ToolGoogleSearchSearchTypes = {imageSearch?: GoogleCloudAiplatformV1ToolGoogleSearchImageSearch | undefined, webSearch?: GoogleCloudAiplatformV1ToolGoogleSearchWebSearch | undefined}; export type GoogleCloudAiplatformV1ToolGoogleSearch = {blockingConfidence?: ('PHISH_BLOCK_THRESHOLD_UNSPECIFIED' | 'BLOCK_LOW_AND_ABOVE' | 'BLOCK_MEDIUM_AND_ABOVE' | 'BLOCK_HIGH_AND_ABOVE' | 'BLOCK_HIGHER_AND_ABOVE' | 'BLOCK_VERY_HIGH_AND_ABOVE' | 'BLOCK_ONLY_EXTREMELY_HIGH') | undefined, excludeDomains?: Array | undefined, searchTypes?: GoogleCloudAiplatformV1ToolGoogleSearchSearchTypes | undefined}; export type GoogleCloudAiplatformV1DynamicRetrievalConfig = {dynamicThreshold?: number | undefined, mode?: ('MODE_UNSPECIFIED' | 'MODE_DYNAMIC') | undefined}; export type GoogleCloudAiplatformV1GoogleSearchRetrieval = {dynamicRetrievalConfig?: GoogleCloudAiplatformV1DynamicRetrievalConfig | undefined}; export type GoogleCloudAiplatformV1ToolParallelAiSearch = {apiKey?: string | undefined, customConfigs?: {[key: string]: unknown} | undefined, enableDataRetention?: boolean | undefined, enableZeroDataRetention?: boolean | undefined}; export type GoogleCloudAiplatformV1ApiAuthApiKeyConfig = {apiKeySecretVersion?: string | undefined, apiKeyString?: string | undefined}; export type GoogleCloudAiplatformV1ApiAuth = {apiKeyConfig?: GoogleCloudAiplatformV1ApiAuthApiKeyConfig | undefined}; export type GoogleCloudAiplatformV1AuthConfigApiKeyConfig = {apiKeySecret?: string | undefined, apiKeyString?: string | undefined, httpElementLocation?: ('HTTP_IN_UNSPECIFIED' | 'HTTP_IN_QUERY' | 'HTTP_IN_HEADER' | 'HTTP_IN_PATH' | 'HTTP_IN_BODY' | 'HTTP_IN_COOKIE') | undefined, name?: string | undefined}; export type GoogleCloudAiplatformV1AuthConfigGoogleServiceAccountConfig = {serviceAccount?: string | undefined}; export type GoogleCloudAiplatformV1AuthConfigHttpBasicAuthConfig = {credentialSecret?: string | undefined}; export type GoogleCloudAiplatformV1AuthConfigOauthConfig = {accessToken?: string | undefined, serviceAccount?: string | undefined}; export type GoogleCloudAiplatformV1AuthConfigOidcConfig = {idToken?: string | undefined, serviceAccount?: string | undefined}; export type GoogleCloudAiplatformV1AuthConfig = {apiKeyConfig?: GoogleCloudAiplatformV1AuthConfigApiKeyConfig | undefined, authType?: ('AUTH_TYPE_UNSPECIFIED' | 'NO_AUTH' | 'API_KEY_AUTH' | 'HTTP_BASIC_AUTH' | 'GOOGLE_SERVICE_ACCOUNT_AUTH' | 'OAUTH' | 'OIDC_AUTH') | undefined, googleServiceAccountConfig?: GoogleCloudAiplatformV1AuthConfigGoogleServiceAccountConfig | undefined, httpBasicAuthConfig?: GoogleCloudAiplatformV1AuthConfigHttpBasicAuthConfig | undefined, oauthConfig?: GoogleCloudAiplatformV1AuthConfigOauthConfig | undefined, oidcConfig?: GoogleCloudAiplatformV1AuthConfigOidcConfig | undefined}; export type GoogleCloudAiplatformV1ExternalApiElasticSearchParams = {index?: string | undefined, numHits?: number | undefined, searchTemplate?: string | undefined}; export type GoogleCloudAiplatformV1ExternalApiSimpleSearchParams = Record; export type GoogleCloudAiplatformV1ExternalApi = {apiAuth?: GoogleCloudAiplatformV1ApiAuth | undefined, apiSpec?: ('API_SPEC_UNSPECIFIED' | 'SIMPLE_SEARCH' | 'ELASTIC_SEARCH') | undefined, authConfig?: GoogleCloudAiplatformV1AuthConfig | undefined, elasticSearchParams?: GoogleCloudAiplatformV1ExternalApiElasticSearchParams | undefined, endpoint?: string | undefined, simpleSearchParams?: GoogleCloudAiplatformV1ExternalApiSimpleSearchParams | undefined}; export type GoogleCloudAiplatformV1VertexAISearchDataStoreSpec = {dataStore?: string | undefined, filter?: string | undefined}; export type GoogleCloudAiplatformV1VertexAISearch = {dataStoreSpecs?: Array | undefined, datastore?: string | undefined, engine?: string | undefined, filter?: string | undefined, maxResults?: number | undefined}; export type GoogleCloudAiplatformV1VertexRagStoreRagResource = {ragCorpus?: string | undefined, ragFileIds?: Array | undefined}; export type GoogleCloudAiplatformV1RagRetrievalConfigFilter = {metadataFilter?: string | undefined, vectorDistanceThreshold?: number | undefined, vectorSimilarityThreshold?: number | undefined}; export type GoogleCloudAiplatformV1RagRetrievalConfigRankingLlmRanker = {modelName?: string | undefined}; export type GoogleCloudAiplatformV1RagRetrievalConfigRankingRankService = {modelName?: string | undefined}; export type GoogleCloudAiplatformV1RagRetrievalConfigRanking = {llmRanker?: GoogleCloudAiplatformV1RagRetrievalConfigRankingLlmRanker | undefined, rankService?: GoogleCloudAiplatformV1RagRetrievalConfigRankingRankService | undefined}; export type GoogleCloudAiplatformV1RagRetrievalConfig = {filter?: GoogleCloudAiplatformV1RagRetrievalConfigFilter | undefined, ranking?: GoogleCloudAiplatformV1RagRetrievalConfigRanking | undefined, topK?: number | undefined}; export type GoogleCloudAiplatformV1VertexRagStore = {ragResources?: Array | undefined, ragRetrievalConfig?: GoogleCloudAiplatformV1RagRetrievalConfig | undefined, similarityTopK?: number | undefined, vectorDistanceThreshold?: number | undefined}; export type GoogleCloudAiplatformV1Retrieval = {disableAttribution?: boolean | undefined, externalApi?: GoogleCloudAiplatformV1ExternalApi | undefined, vertexAiSearch?: GoogleCloudAiplatformV1VertexAISearch | undefined, vertexRagStore?: GoogleCloudAiplatformV1VertexRagStore | undefined}; export type GoogleCloudAiplatformV1UrlContext = Record; export type GoogleCloudAiplatformV1Tool = {codeExecution?: GoogleCloudAiplatformV1ToolCodeExecution | undefined, computerUse?: GoogleCloudAiplatformV1ToolComputerUse | undefined, enterpriseWebSearch?: GoogleCloudAiplatformV1EnterpriseWebSearch | undefined, exaAiSearch?: GoogleCloudAiplatformV1ToolExaAiSearch | undefined, functionDeclarations?: Array | undefined, googleMaps?: GoogleCloudAiplatformV1GoogleMaps | undefined, googleSearch?: GoogleCloudAiplatformV1ToolGoogleSearch | undefined, googleSearchRetrieval?: GoogleCloudAiplatformV1GoogleSearchRetrieval | undefined, parallelAiSearch?: GoogleCloudAiplatformV1ToolParallelAiSearch | undefined, retrieval?: GoogleCloudAiplatformV1Retrieval | undefined, urlContext?: GoogleCloudAiplatformV1UrlContext | undefined}; export type GoogleCloudAiplatformV1EvaluationInstanceDeprecatedAgentConfigTools = {tool?: Array | undefined}; export type GoogleCloudAiplatformV1EvaluationInstanceDeprecatedAgentConfig = {agentId?: string | undefined, agentType?: string | undefined, description?: string | undefined, developerInstruction?: GoogleCloudAiplatformV1EvaluationInstanceInstanceData | undefined, subAgents?: Array | undefined, tools?: GoogleCloudAiplatformV1EvaluationInstanceDeprecatedAgentConfigTools | undefined, toolsText?: string | undefined}; export type GoogleCloudAiplatformV1EvaluationInstanceDeprecatedAgentDataEvents = {event?: Array | undefined}; export type GoogleCloudAiplatformV1EvaluationInstanceDeprecatedAgentDataTools = {tool?: Array | undefined}; export type GoogleCloudAiplatformV1EvaluationInstanceDeprecatedAgentDataAgentEvent = {activeTools?: Array | undefined, author?: string | undefined, content?: GoogleCloudAiplatformV1Content | undefined, eventTime?: unknown | undefined, stateDelta?: {[key: string]: unknown} | undefined}; export type GoogleCloudAiplatformV1EvaluationInstanceDeprecatedAgentDataConversationTurn = {events?: Array | undefined, turnId?: string | undefined, turnIndex?: number | undefined}; export type GoogleCloudAiplatformV1EvaluationInstanceDeprecatedAgentData = {agentConfig?: GoogleCloudAiplatformV1EvaluationInstanceDeprecatedAgentConfig | undefined, agents?: {[key: string]: GoogleCloudAiplatformV1EvaluationInstanceDeprecatedAgentConfig} | undefined, developerInstruction?: GoogleCloudAiplatformV1EvaluationInstanceInstanceData | undefined, events?: GoogleCloudAiplatformV1EvaluationInstanceDeprecatedAgentDataEvents | undefined, tools?: GoogleCloudAiplatformV1EvaluationInstanceDeprecatedAgentDataTools | undefined, toolsText?: string | undefined, turns?: Array | undefined}; export type GoogleCloudAiplatformV1AgentConfig = {agentId?: string | undefined, agentType?: string | undefined, description?: string | undefined, instruction?: string | undefined, subAgents?: Array | undefined, tools?: Array | undefined}; export type GoogleCloudAiplatformV1AgentEvent = {activeTools?: Array | undefined, author?: string | undefined, content?: GoogleCloudAiplatformV1Content | undefined, eventTime?: unknown | undefined, stateDelta?: {[key: string]: unknown} | undefined}; export type GoogleCloudAiplatformV1ConversationTurn = {events?: Array | undefined, turnId?: string | undefined, turnIndex?: number | undefined}; export type GoogleCloudAiplatformV1AgentData = {agents?: {[key: string]: GoogleCloudAiplatformV1AgentConfig} | undefined, turns?: Array | undefined}; export type GoogleCloudAiplatformV1GeminiAgentConfig = {geminiAgent?: string | undefined}; export type GoogleCloudAiplatformV1EvaluationInstanceInteractionsDataSource = {geminiAgentConfig?: GoogleCloudAiplatformV1GeminiAgentConfig | undefined, interaction?: string | undefined}; export type GoogleCloudAiplatformV1EvaluationInstanceMapInstance = {mapInstance?: {[key: string]: GoogleCloudAiplatformV1EvaluationInstanceInstanceData} | undefined}; export type GoogleCloudAiplatformV1RubricContentProperty = {description?: string | undefined}; export type GoogleCloudAiplatformV1RubricContent = {property?: GoogleCloudAiplatformV1RubricContentProperty | undefined}; export type GoogleCloudAiplatformV1Rubric = {content?: GoogleCloudAiplatformV1RubricContent | undefined, importance?: ('IMPORTANCE_UNSPECIFIED' | 'HIGH' | 'MEDIUM' | 'LOW') | undefined, rubricId?: string | undefined, type?: string | undefined}; export type GoogleCloudAiplatformV1RubricGroup = {displayName?: string | undefined, groupId?: string | undefined, rubrics?: Array | undefined}; export type GoogleCloudAiplatformV1EvaluationInstance = {agentData?: GoogleCloudAiplatformV1EvaluationInstanceDeprecatedAgentData | undefined, agentEvalData?: GoogleCloudAiplatformV1AgentData | undefined, interactionsDataSource?: GoogleCloudAiplatformV1EvaluationInstanceInteractionsDataSource | undefined, otherData?: GoogleCloudAiplatformV1EvaluationInstanceMapInstance | undefined, prompt?: GoogleCloudAiplatformV1EvaluationInstanceInstanceData | undefined, reference?: GoogleCloudAiplatformV1EvaluationInstanceInstanceData | undefined, response?: GoogleCloudAiplatformV1EvaluationInstanceInstanceData | undefined, rubricGroups?: {[key: string]: GoogleCloudAiplatformV1RubricGroup} | undefined}; export type GoogleCloudAiplatformV1ComputationBasedMetricSpec = {parameters?: {[key: string]: unknown} | undefined, type?: ('COMPUTATION_BASED_METRIC_TYPE_UNSPECIFIED' | 'EXACT_MATCH' | 'BLEU' | 'ROUGE') | undefined}; export type GoogleCloudAiplatformV1CustomCodeExecutionSpec = {evaluationFunction?: string | undefined}; export type GoogleCloudAiplatformV1PredefinedMetricSpec = {metricSpecName?: string | undefined, metricSpecParameters?: {[key: string]: unknown} | undefined}; export type GoogleCloudAiplatformV1EvaluationParserConfigCustomCodeParserConfig = {parsingFunction?: string | undefined}; export type GoogleCloudAiplatformV1EvaluationParserConfig = {customCodeParserConfig?: GoogleCloudAiplatformV1EvaluationParserConfigCustomCodeParserConfig | undefined}; export type GoogleCloudAiplatformV1RubricGenerationSpec = {modelConfig?: GoogleCloudAiplatformV1AutoraterConfig | undefined, promptTemplate?: string | undefined, rubricContentType?: ('RUBRIC_CONTENT_TYPE_UNSPECIFIED' | 'PROPERTY' | 'NL_QUESTION_ANSWER' | 'PYTHON_CODE_ASSERTION') | undefined, rubricTypeOntology?: Array | undefined}; export type GoogleCloudAiplatformV1LLMBasedMetricSpec = {additionalConfig?: {[key: string]: unknown} | undefined, judgeAutoraterConfig?: GoogleCloudAiplatformV1AutoraterConfig | undefined, metricPromptTemplate?: string | undefined, predefinedRubricGenerationSpec?: GoogleCloudAiplatformV1PredefinedMetricSpec | undefined, resultParserConfig?: GoogleCloudAiplatformV1EvaluationParserConfig | undefined, rubricGenerationSpec?: GoogleCloudAiplatformV1RubricGenerationSpec | undefined, rubricGroupKey?: string | undefined, systemInstruction?: string | undefined}; export type GoogleCloudAiplatformV1MetricMetadataScoreRange = {description?: string | undefined, max?: number | undefined, min?: number | undefined, step?: number | undefined}; export type GoogleCloudAiplatformV1MetricMetadata = {otherMetadata?: {[key: string]: unknown} | undefined, scoreRange?: GoogleCloudAiplatformV1MetricMetadataScoreRange | undefined, title?: string | undefined}; export type GoogleCloudAiplatformV1CustomOutputFormatConfig = {returnRawOutput?: boolean | undefined}; export type GoogleCloudAiplatformV1PairwiseMetricSpec = {baselineResponseFieldName?: string | undefined, candidateResponseFieldName?: string | undefined, customOutputFormatConfig?: GoogleCloudAiplatformV1CustomOutputFormatConfig | undefined, metricPromptTemplate?: string | undefined, systemInstruction?: string | undefined}; export type GoogleCloudAiplatformV1PointwiseMetricSpec = {customOutputFormatConfig?: GoogleCloudAiplatformV1CustomOutputFormatConfig | undefined, metricPromptTemplate?: string | undefined, systemInstruction?: string | undefined}; export type GoogleCloudAiplatformV1RougeSpec = {rougeType?: string | undefined, splitSummaries?: boolean | undefined, useStemmer?: boolean | undefined}; export type GoogleCloudAiplatformV1Metric = {aggregationMetrics?: (Array<'AGGREGATION_METRIC_UNSPECIFIED' | 'AVERAGE' | 'MODE' | 'STANDARD_DEVIATION' | 'VARIANCE' | 'MINIMUM' | 'MAXIMUM' | 'MEDIAN' | 'PERCENTILE_P90' | 'PERCENTILE_P95' | 'PERCENTILE_P99'>) | undefined, bleuSpec?: GoogleCloudAiplatformV1BleuSpec | undefined, computationBasedMetricSpec?: GoogleCloudAiplatformV1ComputationBasedMetricSpec | undefined, customCodeExecutionSpec?: GoogleCloudAiplatformV1CustomCodeExecutionSpec | undefined, exactMatchSpec?: GoogleCloudAiplatformV1ExactMatchSpec | undefined, llmBasedMetricSpec?: GoogleCloudAiplatformV1LLMBasedMetricSpec | undefined, metadata?: GoogleCloudAiplatformV1MetricMetadata | undefined, pairwiseMetricSpec?: GoogleCloudAiplatformV1PairwiseMetricSpec | undefined, pointwiseMetricSpec?: GoogleCloudAiplatformV1PointwiseMetricSpec | undefined, predefinedMetricSpec?: GoogleCloudAiplatformV1PredefinedMetricSpec | undefined, rougeSpec?: GoogleCloudAiplatformV1RougeSpec | undefined}; export type GoogleCloudAiplatformV1MetricSource = {metric?: GoogleCloudAiplatformV1Metric | undefined, metricResourceName?: string | undefined}; export type GoogleCloudAiplatformV1MetricxInstance = {prediction?: string | undefined, reference?: string | undefined, source?: string | undefined}; export type GoogleCloudAiplatformV1MetricxSpec = {sourceLanguage?: string | undefined, targetLanguage?: string | undefined, version?: ('METRICX_VERSION_UNSPECIFIED' | 'METRICX_24_REF' | 'METRICX_24_SRC' | 'METRICX_24_SRC_REF') | undefined}; export type GoogleCloudAiplatformV1MetricxInput = {instance?: GoogleCloudAiplatformV1MetricxInstance | undefined, metricSpec?: GoogleCloudAiplatformV1MetricxSpec | undefined}; export type GoogleCloudAiplatformV1ContentMapContents = {contents?: Array | undefined}; export type GoogleCloudAiplatformV1ContentMap = {values?: {[key: string]: GoogleCloudAiplatformV1ContentMapContents} | undefined}; export type GoogleCloudAiplatformV1PairwiseMetricInstance = {contentMapInstance?: GoogleCloudAiplatformV1ContentMap | undefined, jsonInstance?: string | undefined}; export type GoogleCloudAiplatformV1PairwiseMetricInput = {instance?: GoogleCloudAiplatformV1PairwiseMetricInstance | undefined, metricSpec?: GoogleCloudAiplatformV1PairwiseMetricSpec | undefined}; export type GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInstance = {baselinePrediction?: string | undefined, context?: string | undefined, instruction?: string | undefined, prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualitySpec = {useReference?: boolean | undefined, version?: number | undefined}; export type GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput = {instance?: GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInstance | undefined, metricSpec?: GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualitySpec | undefined}; export type GoogleCloudAiplatformV1PairwiseSummarizationQualityInstance = {baselinePrediction?: string | undefined, context?: string | undefined, instruction?: string | undefined, prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1PairwiseSummarizationQualitySpec = {useReference?: boolean | undefined, version?: number | undefined}; export type GoogleCloudAiplatformV1PairwiseSummarizationQualityInput = {instance?: GoogleCloudAiplatformV1PairwiseSummarizationQualityInstance | undefined, metricSpec?: GoogleCloudAiplatformV1PairwiseSummarizationQualitySpec | undefined}; export type GoogleCloudAiplatformV1PointwiseMetricInstance = {contentMapInstance?: GoogleCloudAiplatformV1ContentMap | undefined, jsonInstance?: string | undefined}; export type GoogleCloudAiplatformV1PointwiseMetricInput = {instance?: GoogleCloudAiplatformV1PointwiseMetricInstance | undefined, metricSpec?: GoogleCloudAiplatformV1PointwiseMetricSpec | undefined}; export type GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInstance = {context?: string | undefined, instruction?: string | undefined, prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1QuestionAnsweringCorrectnessSpec = {useReference?: boolean | undefined, version?: number | undefined}; export type GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInput = {instance?: GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInstance | undefined, metricSpec?: GoogleCloudAiplatformV1QuestionAnsweringCorrectnessSpec | undefined}; export type GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInstance = {context?: string | undefined, instruction?: string | undefined, prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessSpec = {useReference?: boolean | undefined, version?: number | undefined}; export type GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInput = {instance?: GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInstance | undefined, metricSpec?: GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessSpec | undefined}; export type GoogleCloudAiplatformV1QuestionAnsweringQualityInstance = {context?: string | undefined, instruction?: string | undefined, prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1QuestionAnsweringQualitySpec = {useReference?: boolean | undefined, version?: number | undefined}; export type GoogleCloudAiplatformV1QuestionAnsweringQualityInput = {instance?: GoogleCloudAiplatformV1QuestionAnsweringQualityInstance | undefined, metricSpec?: GoogleCloudAiplatformV1QuestionAnsweringQualitySpec | undefined}; export type GoogleCloudAiplatformV1QuestionAnsweringRelevanceInstance = {context?: string | undefined, instruction?: string | undefined, prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1QuestionAnsweringRelevanceSpec = {useReference?: boolean | undefined, version?: number | undefined}; export type GoogleCloudAiplatformV1QuestionAnsweringRelevanceInput = {instance?: GoogleCloudAiplatformV1QuestionAnsweringRelevanceInstance | undefined, metricSpec?: GoogleCloudAiplatformV1QuestionAnsweringRelevanceSpec | undefined}; export type GoogleCloudAiplatformV1RougeInstance = {prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1RougeInput = {instances?: Array | undefined, metricSpec?: GoogleCloudAiplatformV1RougeSpec | undefined}; export type GoogleCloudAiplatformV1RubricBasedInstructionFollowingInstance = {jsonInstance?: string | undefined}; export type GoogleCloudAiplatformV1RubricBasedInstructionFollowingSpec = Record; export type GoogleCloudAiplatformV1RubricBasedInstructionFollowingInput = {instance?: GoogleCloudAiplatformV1RubricBasedInstructionFollowingInstance | undefined, metricSpec?: GoogleCloudAiplatformV1RubricBasedInstructionFollowingSpec | undefined}; export type GoogleCloudAiplatformV1SafetyInstance = {prediction?: string | undefined}; export type GoogleCloudAiplatformV1SafetySpec = {version?: number | undefined}; export type GoogleCloudAiplatformV1SafetyInput = {instance?: GoogleCloudAiplatformV1SafetyInstance | undefined, metricSpec?: GoogleCloudAiplatformV1SafetySpec | undefined}; export type GoogleCloudAiplatformV1SummarizationHelpfulnessInstance = {context?: string | undefined, instruction?: string | undefined, prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1SummarizationHelpfulnessSpec = {useReference?: boolean | undefined, version?: number | undefined}; export type GoogleCloudAiplatformV1SummarizationHelpfulnessInput = {instance?: GoogleCloudAiplatformV1SummarizationHelpfulnessInstance | undefined, metricSpec?: GoogleCloudAiplatformV1SummarizationHelpfulnessSpec | undefined}; export type GoogleCloudAiplatformV1SummarizationQualityInstance = {context?: string | undefined, instruction?: string | undefined, prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1SummarizationQualitySpec = {useReference?: boolean | undefined, version?: number | undefined}; export type GoogleCloudAiplatformV1SummarizationQualityInput = {instance?: GoogleCloudAiplatformV1SummarizationQualityInstance | undefined, metricSpec?: GoogleCloudAiplatformV1SummarizationQualitySpec | undefined}; export type GoogleCloudAiplatformV1SummarizationVerbosityInstance = {context?: string | undefined, instruction?: string | undefined, prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1SummarizationVerbositySpec = {useReference?: boolean | undefined, version?: number | undefined}; export type GoogleCloudAiplatformV1SummarizationVerbosityInput = {instance?: GoogleCloudAiplatformV1SummarizationVerbosityInstance | undefined, metricSpec?: GoogleCloudAiplatformV1SummarizationVerbositySpec | undefined}; export type GoogleCloudAiplatformV1ToolCallValidInstance = {prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1ToolCallValidSpec = Record; export type GoogleCloudAiplatformV1ToolCallValidInput = {instances?: Array | undefined, metricSpec?: GoogleCloudAiplatformV1ToolCallValidSpec | undefined}; export type GoogleCloudAiplatformV1ToolNameMatchInstance = {prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1ToolNameMatchSpec = Record; export type GoogleCloudAiplatformV1ToolNameMatchInput = {instances?: Array | undefined, metricSpec?: GoogleCloudAiplatformV1ToolNameMatchSpec | undefined}; export type GoogleCloudAiplatformV1ToolParameterKeyMatchInstance = {prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1ToolParameterKeyMatchSpec = Record; export type GoogleCloudAiplatformV1ToolParameterKeyMatchInput = {instances?: Array | undefined, metricSpec?: GoogleCloudAiplatformV1ToolParameterKeyMatchSpec | undefined}; export type GoogleCloudAiplatformV1ToolParameterKVMatchInstance = {prediction?: string | undefined, reference?: string | undefined}; export type GoogleCloudAiplatformV1ToolParameterKVMatchSpec = {useStrictStringMatch?: boolean | undefined}; export type GoogleCloudAiplatformV1ToolParameterKVMatchInput = {instances?: Array | undefined, metricSpec?: GoogleCloudAiplatformV1ToolParameterKVMatchSpec | undefined}; export type GoogleCloudAiplatformV1ToolCall = {toolInput?: string | undefined, toolName?: string | undefined}; export type GoogleCloudAiplatformV1Trajectory = {toolCalls?: Array | undefined}; export type GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance = {predictedTrajectory?: GoogleCloudAiplatformV1Trajectory | undefined, referenceTrajectory?: GoogleCloudAiplatformV1Trajectory | undefined}; export type GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec = Record; export type GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput = {instances?: Array | undefined, metricSpec?: GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec | undefined}; export type GoogleCloudAiplatformV1TrajectoryExactMatchInstance = {predictedTrajectory?: GoogleCloudAiplatformV1Trajectory | undefined, referenceTrajectory?: GoogleCloudAiplatformV1Trajectory | undefined}; export type GoogleCloudAiplatformV1TrajectoryExactMatchSpec = Record; export type GoogleCloudAiplatformV1TrajectoryExactMatchInput = {instances?: Array | undefined, metricSpec?: GoogleCloudAiplatformV1TrajectoryExactMatchSpec | undefined}; export type GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance = {predictedTrajectory?: GoogleCloudAiplatformV1Trajectory | undefined, referenceTrajectory?: GoogleCloudAiplatformV1Trajectory | undefined}; export type GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec = Record; export type GoogleCloudAiplatformV1TrajectoryInOrderMatchInput = {instances?: Array | undefined, metricSpec?: GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec | undefined}; export type GoogleCloudAiplatformV1TrajectoryPrecisionInstance = {predictedTrajectory?: GoogleCloudAiplatformV1Trajectory | undefined, referenceTrajectory?: GoogleCloudAiplatformV1Trajectory | undefined}; export type GoogleCloudAiplatformV1TrajectoryPrecisionSpec = Record; export type GoogleCloudAiplatformV1TrajectoryPrecisionInput = {instances?: Array | undefined, metricSpec?: GoogleCloudAiplatformV1TrajectoryPrecisionSpec | undefined}; export type GoogleCloudAiplatformV1TrajectoryRecallInstance = {predictedTrajectory?: GoogleCloudAiplatformV1Trajectory | undefined, referenceTrajectory?: GoogleCloudAiplatformV1Trajectory | undefined}; export type GoogleCloudAiplatformV1TrajectoryRecallSpec = Record; export type GoogleCloudAiplatformV1TrajectoryRecallInput = {instances?: Array | undefined, metricSpec?: GoogleCloudAiplatformV1TrajectoryRecallSpec | undefined}; export type GoogleCloudAiplatformV1TrajectorySingleToolUseInstance = {predictedTrajectory?: GoogleCloudAiplatformV1Trajectory | undefined}; export type GoogleCloudAiplatformV1TrajectorySingleToolUseSpec = {toolName?: string | undefined}; export type GoogleCloudAiplatformV1TrajectorySingleToolUseInput = {instances?: Array | undefined, metricSpec?: GoogleCloudAiplatformV1TrajectorySingleToolUseSpec | undefined}; export type GoogleCloudAiplatformV1EvaluateInstancesRequest = {allowCrossRegionModel?: boolean | undefined, autoraterConfig?: GoogleCloudAiplatformV1AutoraterConfig | undefined, bleuInput?: GoogleCloudAiplatformV1BleuInput | undefined, coherenceInput?: GoogleCloudAiplatformV1CoherenceInput | undefined, cometInput?: GoogleCloudAiplatformV1CometInput | undefined, exactMatchInput?: GoogleCloudAiplatformV1ExactMatchInput | undefined, fluencyInput?: GoogleCloudAiplatformV1FluencyInput | undefined, fulfillmentInput?: GoogleCloudAiplatformV1FulfillmentInput | undefined, groundednessInput?: GoogleCloudAiplatformV1GroundednessInput | undefined, instance?: GoogleCloudAiplatformV1EvaluationInstance | undefined, location?: string | undefined, metricSources?: Array | undefined, metrics?: Array | undefined, metricxInput?: GoogleCloudAiplatformV1MetricxInput | undefined, pairwiseMetricInput?: GoogleCloudAiplatformV1PairwiseMetricInput | undefined, pairwiseQuestionAnsweringQualityInput?: GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput | undefined, pairwiseSummarizationQualityInput?: GoogleCloudAiplatformV1PairwiseSummarizationQualityInput | undefined, pointwiseMetricInput?: GoogleCloudAiplatformV1PointwiseMetricInput | undefined, questionAnsweringCorrectnessInput?: GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInput | undefined, questionAnsweringHelpfulnessInput?: GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInput | undefined, questionAnsweringQualityInput?: GoogleCloudAiplatformV1QuestionAnsweringQualityInput | undefined, questionAnsweringRelevanceInput?: GoogleCloudAiplatformV1QuestionAnsweringRelevanceInput | undefined, rougeInput?: GoogleCloudAiplatformV1RougeInput | undefined, rubricBasedInstructionFollowingInput?: GoogleCloudAiplatformV1RubricBasedInstructionFollowingInput | undefined, safetyInput?: GoogleCloudAiplatformV1SafetyInput | undefined, summarizationHelpfulnessInput?: GoogleCloudAiplatformV1SummarizationHelpfulnessInput | undefined, summarizationQualityInput?: GoogleCloudAiplatformV1SummarizationQualityInput | undefined, summarizationVerbosityInput?: GoogleCloudAiplatformV1SummarizationVerbosityInput | undefined, toolCallValidInput?: GoogleCloudAiplatformV1ToolCallValidInput | undefined, toolNameMatchInput?: GoogleCloudAiplatformV1ToolNameMatchInput | undefined, toolParameterKeyMatchInput?: GoogleCloudAiplatformV1ToolParameterKeyMatchInput | undefined, toolParameterKvMatchInput?: GoogleCloudAiplatformV1ToolParameterKVMatchInput | undefined, trajectoryAnyOrderMatchInput?: GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput | undefined, trajectoryExactMatchInput?: GoogleCloudAiplatformV1TrajectoryExactMatchInput | undefined, trajectoryInOrderMatchInput?: GoogleCloudAiplatformV1TrajectoryInOrderMatchInput | undefined, trajectoryPrecisionInput?: GoogleCloudAiplatformV1TrajectoryPrecisionInput | undefined, trajectoryRecallInput?: GoogleCloudAiplatformV1TrajectoryRecallInput | undefined, trajectorySingleToolUseInput?: GoogleCloudAiplatformV1TrajectorySingleToolUseInput | undefined}; export type CreateApiV1ProjectsProjectsIdLocationsLocationsIdEvaluateInstancesArgs = {projectsId: string, locationsId: string, body: GoogleCloudAiplatformV1EvaluateInstancesRequest}; export type CreateApiV1ProjectsProjectsIdLocationsLocationsIdEvaluateInstancesOptions = {baseUrl?: string | undefined, Oauth2?: string | undefined, Oauth2c?: string | undefined, fetch?: typeof fetch | undefined}; export const googleCloudAiplatformV1BleuMetricValue = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1BleuResults = z.object({bleuMetricValues: z.array(googleCloudAiplatformV1BleuMetricValue).optional()}); export const googleCloudAiplatformV1CoherenceResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), score: z.number().optional()}); export const googleCloudAiplatformV1CometResult = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1ExactMatchMetricValue = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1ExactMatchResults = z.object({exactMatchMetricValues: z.array(googleCloudAiplatformV1ExactMatchMetricValue).optional()}); export const googleCloudAiplatformV1FluencyResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), score: z.number().optional()}); export const googleCloudAiplatformV1FulfillmentResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), score: z.number().optional()}); export const googleCloudAiplatformV1GroundednessResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), score: z.number().optional()}); export const googleRpcStatus = z.object({code: z.number().int().optional(), details: z.array(z.record(z.string(), z.unknown())).optional(), message: z.string().optional()}); export const googleCloudAiplatformV1RubricContentProperty = z.object({description: z.string().optional()}); export const googleCloudAiplatformV1RubricContent = z.object({property: googleCloudAiplatformV1RubricContentProperty.optional()}); export const googleCloudAiplatformV1Rubric = z.object({content: googleCloudAiplatformV1RubricContent.optional(), importance: z.enum(["IMPORTANCE_UNSPECIFIED", "HIGH", "MEDIUM", "LOW"]).optional(), rubricId: z.string().optional(), type: z.string().optional()}); export const googleCloudAiplatformV1RubricVerdict = z.object({evaluatedRubric: googleCloudAiplatformV1Rubric.optional(), reasoning: z.string().optional(), verdict: z.boolean().optional()}); export const googleCloudAiplatformV1MetricResult = z.object({error: googleRpcStatus.optional(), explanation: z.string().optional(), rubricVerdicts: z.array(googleCloudAiplatformV1RubricVerdict).optional(), score: z.number().optional()}); export const googleCloudAiplatformV1MetricxResult = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1RawOutput = z.object({rawOutput: z.array(z.string()).optional()}); export const googleCloudAiplatformV1CustomOutput = z.object({rawOutputs: googleCloudAiplatformV1RawOutput.optional()}); export const googleCloudAiplatformV1PairwiseMetricResult = z.object({customOutput: googleCloudAiplatformV1CustomOutput.optional(), explanation: z.string().optional(), pairwiseChoice: z.enum(["PAIRWISE_CHOICE_UNSPECIFIED", "BASELINE", "CANDIDATE", "TIE"]).optional()}); export const googleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), pairwiseChoice: z.enum(["PAIRWISE_CHOICE_UNSPECIFIED", "BASELINE", "CANDIDATE", "TIE"]).optional()}); export const googleCloudAiplatformV1PairwiseSummarizationQualityResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), pairwiseChoice: z.enum(["PAIRWISE_CHOICE_UNSPECIFIED", "BASELINE", "CANDIDATE", "TIE"]).optional()}); export const googleCloudAiplatformV1PointwiseMetricResult = z.object({customOutput: googleCloudAiplatformV1CustomOutput.optional(), explanation: z.string().optional(), score: z.number().optional()}); export const googleCloudAiplatformV1QuestionAnsweringCorrectnessResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), score: z.number().optional()}); export const googleCloudAiplatformV1QuestionAnsweringHelpfulnessResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), score: z.number().optional()}); export const googleCloudAiplatformV1QuestionAnsweringQualityResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), score: z.number().optional()}); export const googleCloudAiplatformV1QuestionAnsweringRelevanceResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), score: z.number().optional()}); export const googleCloudAiplatformV1RougeMetricValue = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1RougeResults = z.object({rougeMetricValues: z.array(googleCloudAiplatformV1RougeMetricValue).optional()}); export const googleCloudAiplatformV1RubricCritiqueResult = z.object({rubric: z.string().optional(), verdict: z.boolean().optional()}); export const googleCloudAiplatformV1RubricBasedInstructionFollowingResult = z.object({rubricCritiqueResults: z.array(googleCloudAiplatformV1RubricCritiqueResult).optional(), score: z.number().optional()}); export const googleCloudAiplatformV1SafetyResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), score: z.number().optional()}); export const googleCloudAiplatformV1SummarizationHelpfulnessResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), score: z.number().optional()}); export const googleCloudAiplatformV1SummarizationQualityResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), score: z.number().optional()}); export const googleCloudAiplatformV1SummarizationVerbosityResult = z.object({confidence: z.number().optional(), explanation: z.string().optional(), score: z.number().optional()}); export const googleCloudAiplatformV1ToolCallValidMetricValue = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1ToolCallValidResults = z.object({toolCallValidMetricValues: z.array(googleCloudAiplatformV1ToolCallValidMetricValue).optional()}); export const googleCloudAiplatformV1ToolNameMatchMetricValue = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1ToolNameMatchResults = z.object({toolNameMatchMetricValues: z.array(googleCloudAiplatformV1ToolNameMatchMetricValue).optional()}); export const googleCloudAiplatformV1ToolParameterKeyMatchMetricValue = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1ToolParameterKeyMatchResults = z.object({toolParameterKeyMatchMetricValues: z.array(googleCloudAiplatformV1ToolParameterKeyMatchMetricValue).optional()}); export const googleCloudAiplatformV1ToolParameterKVMatchMetricValue = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1ToolParameterKVMatchResults = z.object({toolParameterKvMatchMetricValues: z.array(googleCloudAiplatformV1ToolParameterKVMatchMetricValue).optional()}); export const googleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1TrajectoryAnyOrderMatchResults = z.object({trajectoryAnyOrderMatchMetricValues: z.array(googleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue).optional()}); export const googleCloudAiplatformV1TrajectoryExactMatchMetricValue = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1TrajectoryExactMatchResults = z.object({trajectoryExactMatchMetricValues: z.array(googleCloudAiplatformV1TrajectoryExactMatchMetricValue).optional()}); export const googleCloudAiplatformV1TrajectoryInOrderMatchMetricValue = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1TrajectoryInOrderMatchResults = z.object({trajectoryInOrderMatchMetricValues: z.array(googleCloudAiplatformV1TrajectoryInOrderMatchMetricValue).optional()}); export const googleCloudAiplatformV1TrajectoryPrecisionMetricValue = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1TrajectoryPrecisionResults = z.object({trajectoryPrecisionMetricValues: z.array(googleCloudAiplatformV1TrajectoryPrecisionMetricValue).optional()}); export const googleCloudAiplatformV1TrajectoryRecallMetricValue = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1TrajectoryRecallResults = z.object({trajectoryRecallMetricValues: z.array(googleCloudAiplatformV1TrajectoryRecallMetricValue).optional()}); export const googleCloudAiplatformV1TrajectorySingleToolUseMetricValue = z.object({score: z.number().optional()}); export const googleCloudAiplatformV1TrajectorySingleToolUseResults = z.object({trajectorySingleToolUseMetricValues: z.array(googleCloudAiplatformV1TrajectorySingleToolUseMetricValue).optional()}); export const googleCloudAiplatformV1EvaluateInstancesResponse = z.object({bleuResults: googleCloudAiplatformV1BleuResults.optional(), coherenceResult: googleCloudAiplatformV1CoherenceResult.optional(), cometResult: googleCloudAiplatformV1CometResult.optional(), exactMatchResults: googleCloudAiplatformV1ExactMatchResults.optional(), fluencyResult: googleCloudAiplatformV1FluencyResult.optional(), fulfillmentResult: googleCloudAiplatformV1FulfillmentResult.optional(), groundednessResult: googleCloudAiplatformV1GroundednessResult.optional(), metricResults: z.array(googleCloudAiplatformV1MetricResult).optional(), metricxResult: googleCloudAiplatformV1MetricxResult.optional(), pairwiseMetricResult: googleCloudAiplatformV1PairwiseMetricResult.optional(), pairwiseQuestionAnsweringQualityResult: googleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult.optional(), pairwiseSummarizationQualityResult: googleCloudAiplatformV1PairwiseSummarizationQualityResult.optional(), pointwiseMetricResult: googleCloudAiplatformV1PointwiseMetricResult.optional(), questionAnsweringCorrectnessResult: googleCloudAiplatformV1QuestionAnsweringCorrectnessResult.optional(), questionAnsweringHelpfulnessResult: googleCloudAiplatformV1QuestionAnsweringHelpfulnessResult.optional(), questionAnsweringQualityResult: googleCloudAiplatformV1QuestionAnsweringQualityResult.optional(), questionAnsweringRelevanceResult: googleCloudAiplatformV1QuestionAnsweringRelevanceResult.optional(), rougeResults: googleCloudAiplatformV1RougeResults.optional(), rubricBasedInstructionFollowingResult: googleCloudAiplatformV1RubricBasedInstructionFollowingResult.optional(), safetyResult: googleCloudAiplatformV1SafetyResult.optional(), summarizationHelpfulnessResult: googleCloudAiplatformV1SummarizationHelpfulnessResult.optional(), summarizationQualityResult: googleCloudAiplatformV1SummarizationQualityResult.optional(), summarizationVerbosityResult: googleCloudAiplatformV1SummarizationVerbosityResult.optional(), toolCallValidResults: googleCloudAiplatformV1ToolCallValidResults.optional(), toolNameMatchResults: googleCloudAiplatformV1ToolNameMatchResults.optional(), toolParameterKeyMatchResults: googleCloudAiplatformV1ToolParameterKeyMatchResults.optional(), toolParameterKvMatchResults: googleCloudAiplatformV1ToolParameterKVMatchResults.optional(), trajectoryAnyOrderMatchResults: googleCloudAiplatformV1TrajectoryAnyOrderMatchResults.optional(), trajectoryExactMatchResults: googleCloudAiplatformV1TrajectoryExactMatchResults.optional(), trajectoryInOrderMatchResults: googleCloudAiplatformV1TrajectoryInOrderMatchResults.optional(), trajectoryPrecisionResults: googleCloudAiplatformV1TrajectoryPrecisionResults.optional(), trajectoryRecallResults: googleCloudAiplatformV1TrajectoryRecallResults.optional(), trajectorySingleToolUseResults: googleCloudAiplatformV1TrajectorySingleToolUseResults.optional()}); export const validateResponse = async ( schema: { readonly '~standard': { readonly validate: (value: unknown) => ({ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }) | Promise<{ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }> } }, value: unknown ): Promise => { const result = await schema['~standard'].validate(value) if (result.issues !== undefined) { const detail = result.issues .map(({ message, path }) => path?.length ? `${path.map((segment) => String(typeof segment === 'object' ? segment.key : segment)).join('.')}: ${message}` : message ) .join('; ') throw new Error(`Response does not match the schema: ${detail}`, { cause: { issues: result.issues } }) } return result.value }; /** * Evaluates instances based on a given metric. * * POST /v1/projects/{projectsId}/locations/{locationsId}:evaluateInstances * * Also accepts auth: Oauth2 + Oauth2c */ export const createApiV1ProjectsProjectsIdLocationsLocationsIdEvaluateInstances = async (args: CreateApiV1ProjectsProjectsIdLocationsLocationsIdEvaluateInstancesArgs, options?: CreateApiV1ProjectsProjectsIdLocationsLocationsIdEvaluateInstancesOptions) => { const {baseUrl = "https://aiplatform.googleapis.com", fetch: fetchFn = fetch, Oauth2, Oauth2c} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (Oauth2 !== undefined) headers.set('authorization', `Bearer ${Oauth2}`) if (Oauth2c !== undefined) headers.set('authorization', `Bearer ${Oauth2c}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/projects/${encodeURIComponent(String(args.projectsId))}/locations/${encodeURIComponent(String(args.locationsId))}:evaluateInstances${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(googleCloudAiplatformV1EvaluateInstancesResponse, await res.json()) };