Analyze File By Url

To analyze a file with an AI model by the file URL, use the command:

Action Settings

Setting Description
Prompt String, required. The user-provided text to be processed by the Model.
Instructions String, optional. Instructions for the Model.
Model Enum, required. The Model's resource name. This serves as an ID for the Model to use.
Temperature Double, optional. Controls the randomness of the output. The default value varies by Model. Values can range from [0.0, 2.0]
TopP Double, optional. The maximum cumulative probability of tokens to consider when sampling.
TopK Int, optional. The maximum number of tokens to consider when sampling.
Seed Int, optional. Seed used in decoding. If not set, the request uses a randomly generated seed.
MaxOutputTokens Int32, optional. The maximum number of tokens to include in a response candidate.
StopSequences String, optional. The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a stop_sequence. The stop sequence will not be included as part of the response.
SafetyCategory Enum, optional. The safety category to configure a threshold for. Valid values are: HARM_CATEGORY_SEXUALLY_EXPLICIT,HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_DANGEROUS_CONTENT.
SafetyThreshold Enum, optional. The safety threshold to configure for the safety category. Valid values are: BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE, BLOCK_HIGH_AND_ABOVE, BLOCK_NONE.

Action Parameters

Parameter Description
FileUrl String, required. The URL of the file to be analyzed.
MimeType Enum, required. The MIME type of the file to be analyzed.
CachedContent String, optional. The name of the content cached to use as context to serve the prediction. Format: cachedContents/{cachedContent}.

Result

The generated response is returned in the Response_Result field. Response_Id, Response_Result, Response_FinishReason, Response_FinishMessage, Response_PromptTokenCount, Response_CachedContentTokenCount, Response_CandidatesTokenCount, Response_TotalTokenCount, Response_PromptFeedbackBlockReason, Response_PromptFeedbackSafetyRatings, Response_ModelVersion, Response_ModelStatusModelStage, Response_ModelStatusRetirementTime, Response_ModelStatusMessage.