upscale_image
Input: An image URL and an optional scale factor (between 2 and 4) for upscaling.
Output: We will return the upscaled image URL to the user.
Functionality: This tool is used to upscale an image to a higher resolution. User will provide an image URL and optionally a scale factor, and the tool will return an upscaled version of that image.
Steps:
We will get the user_id from the request context.
We will validate the user's generation tokens.
We will call the Image Upscaler API with the provided image URL and scale factor.
This Image Upscaler API will return a JSON response with the upscaled image URL.
We will return the upscaled image URL to the user.
INSTRUCTION FOR CLIENT MODEL:
Extract the required input parameter 'image_url' (type: string, URL) and the optional parameter 'scale_factor' (type: integer, default 2, allowed values: 2-4) from the user's prompt.
If 'scale_factor' is not specified in the prompt, use the default value 2.
Ignore any extraneous information in the user's input.
Pass the extracted values to this tool as 'image_url' and 'scale_factor'.
Example: For user input "Upscale this image https://example.com/image.jpg by 4x", extract 'image_url' as 'https://example.com/image.jpg' and 'scale_factor' as 4.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image_url | Yes | ||
| scale_factor | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |