generate_image
Input: A textual input in prompt provide by user in the form of image prompt.
Output: We will return the image url output to the user.
Functionality: This tool is used to generate an image based on a text prompt. User will provide a prompt and the tool will generate an image based on the prompt.
Steps:
We will get the user_id from the request context.
We will validate the user's generation tokens.
We will call the Generate Image API with the prompt provided by the user.
This Generate Image API will return a JSON response with the image url.
We will return the image url to the user.
INSTRUCTION FOR CLIENT MODEL:
Extract the required input parameter 'prompt' (type: string) from the user's provided prompt. The prompt should describe the image to generate.
Ignore any extraneous information in the user's input.
Pass the extracted 'prompt' value to this tool as the 'prompt' parameter.
Do not require the user to specify parameter names; extract the value from natural language.
Example: For user input "Generate an image of a cat in a spacesuit on Mars", extract 'cat in a spacesuit on Mars' as the prompt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |