> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Get AI Answer

- Component: `appmixer.cloro.core.GetAIAnswer`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.cloro 1.0.0](https://connectors.appmixer.com/connector/appmixer.cloro/1.0.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.cloro/1.0.0/component/appmixer.cloro.core.GetAIAnswer>

Send a prompt to Google AI Mode, Bing AI Mode, ChatGPT or Gemini through cloro and get the answer with the sources it cites.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Engine (`engine`) | select | The AI answer engine to ask. |
| Prompt (`prompt`) | textarea | The prompt to send. Bing AI Mode accepts at most 3,500 characters after URL encoding. |
| Country (`country`) | text | 2-letter ISO 3166-1 country code for the location of the request, for example `US` or `DE`. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Engine (`engine`) | string | - |
| Prompt (`prompt`) | string | - |
| Answer Text (`text`) | string | - |
| Answer Markdown (`markdown`) | string | - |
| Sources (`sources`) | array | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.cloro.core.GetAIAnswer",
  "label": "Get AI Answer",
  "description": "Send a prompt to Google AI Mode, Bing AI Mode, ChatGPT or Gemini through cloro and get the answer with the sources it cites.",
  "author": "cloro <info@cloro.dev>",
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:cloro"
  },
  "quota": {
    "manager": "appmixer:cloro",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "engine": {
            "type": "string",
            "enum": [
              "aimode",
              "bing_aimode",
              "chatgpt",
              "gemini"
            ]
          },
          "prompt": {
            "type": "string"
          },
          "country": {
            "type": "string"
          }
        },
        "required": [
          "prompt"
        ]
      },
      "inspector": {
        "inputs": {
          "engine": {
            "type": "select",
            "index": 1,
            "label": "Engine",
            "defaultValue": "aimode",
            "tooltip": "The AI answer engine to ask.",
            "options": [
              {
                "label": "Google AI Mode",
                "value": "aimode"
              },
              {
                "label": "Bing AI Mode",
                "value": "bing_aimode"
              },
              {
                "label": "ChatGPT",
                "value": "chatgpt"
              },
              {
                "label": "Gemini",
                "value": "gemini"
              }
            ]
          },
          "prompt": {
            "type": "textarea",
            "index": 2,
            "label": "Prompt",
            "tooltip": "The prompt to send. Bing AI Mode accepts at most 3,500 characters after URL encoding."
          },
          "country": {
            "type": "text",
            "index": 3,
            "label": "Country",
            "defaultValue": "US",
            "tooltip": "2-letter ISO 3166-1 country code for the location of the request, for example <code>US</code> or <code>DE</code>."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "schema": {
        "type": "object",
        "properties": {
          "engine": {
            "type": "string",
            "title": "Engine",
            "example": "aimode"
          },
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "example": "What is a search engine results page?"
          },
          "text": {
            "type": "string",
            "title": "Answer Text",
            "example": "A search engine results page is the page a search engine shows for a query ..."
          },
          "markdown": {
            "type": "string",
            "title": "Answer Markdown",
            "example": "A **search engine results page** is the page a search engine shows ..."
          },
          "sources": {
            "type": "array",
            "title": "Sources",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer",
                  "title": "Position",
                  "example": 1
                },
                "label": {
                  "type": "string",
                  "title": "Label",
                  "example": "Example Domain"
                },
                "url": {
                  "type": "string",
                  "title": "URL",
                  "example": "https://example.com/"
                },
                "description": {
                  "type": "string",
                  "title": "Description",
                  "example": "This domain is for use in documentation examples."
                }
              }
            },
            "example": [
              {
                "position": 1,
                "label": "Example Domain",
                "url": "https://example.com/",
                "description": "This domain is for use in documentation examples."
              }
            ]
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
