# Information Extractor - OpenAI Schema Generator

## Try it in the Widget Center

Click this [url](https://app.myshell.ai/robot-workshop/widget/1782696474146430976) to try this widget and copy the Pro Config template.

## Usage

\<TODO: enter description here, and remove useless inputs>

**Input Parameters**

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>instruction</td><td><code>string</code></td><td>Please describe your intention for extracting information from the input content. You can specify their types and names explicitly. For example: 'Help me to extract the abstract, named as `abs`, and summarize the chapter 3 Method, named as `approach`. Count how many sections are in this paper, named as `num_sec` of type int.'</td><td></td><td>false</td></tr></tbody></table>

**Output Parameters**

| Name        | Type     | Description                                         | File Type |
| ----------- | -------- | --------------------------------------------------- | --------- |
| name        | `string` | Function name                                       |           |
| required    | `array`  | Required parameters                                 |           |
| parameters  | `object` | contain \`type\`(string) and \`properties\`(object) |           |
| description | `string` | Function description                                |           |

**Output Example**

{% tabs %}
{% tab title="success" %}
{% code fullWidth="false" %}

```json
See below
```

{% endcode %}
{% endtab %}

{% tab title="fail" %}
{% code fullWidth="false" %}

```json
throw a Http error.
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Detailed Guidelines

* Example
  * input
    * instruction

      ```python
      Tell me How to build an AI app from start to finish. The step extracted should be named as 'step_{i}', where i is the number from 1.
      ```
  * Output

    ```python
    # This is json
    {
      "description": "Instructions on building an AI app from start to finish.",
      "name": "Schema",
      "parameters": {
        "properties": {
          "step_1": {
            "description": "The first step in building an AI app.",
            "title": "Step 1",
            "type": "string"
          },
          "step_2": {
            "description": "The second step in building an AI app.",
            "title": "Step 2",
            "type": "string"
          },
          "step_3": {
            "description": "The third step in building an AI app.",
            "title": "Step 3",
            "type": "string"
          },
          "step_4": {
            "description": "The fourth step in building an AI app.",
            "title": "Step 4",
            "type": "string"
          },
          "step_5": {
            "description": "The fifth step in building an AI app.",
            "title": "Step 5",
            "type": "string"
          }
        },
        "type": "object"
      },
      "required": [
        "step_1",
        "step_2",
        "step_3",
        "step_4",
        "step_5"
      ]
    }
    ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.myshell.ai/ko/create/pro-config-mode/api-reference/widgets/39-information-extractor----openai-schema-generator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
