Skip to content

Make com

MakeWrapper #

Bases: BaseReader

Make reader.

Source code in llama-index-integrations/readers/llama-index-readers-make-com/llama_index/readers/make_com/base.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
class MakeWrapper(BaseReader):
    """Make reader."""

    def load_data(self, *args: Any, **load_kwargs: Any) -> List[Document]:
        """Load data from the input directory.

        NOTE: This is not implemented.

        """
        raise NotImplementedError("Cannot load documents from Make.com API.")

    def pass_response_to_webhook(
        self, webhook_url: str, response: Response, query: Optional[str] = None
    ) -> None:
        """Pass response object to webhook.

        Args:
            webhook_url (str): Webhook URL.
            response (Response): Response object.
            query (Optional[str]): Query. Defaults to None.

        """
        response_text = response.response
        source_nodes = [n.dict() for n in response.source_nodes]
        json_dict = {
            "response": response_text,
            "source_nodes": source_nodes,
            "query": query,
        }
        r = requests.post(webhook_url, json=json_dict)
        r.raise_for_status()

load_data #

load_data(*args: Any, **load_kwargs: Any) -> List[Document]

Load data from the input directory.

NOTE: This is not implemented.

Source code in llama-index-integrations/readers/llama-index-readers-make-com/llama_index/readers/make_com/base.py
18
19
20
21
22
23
24
def load_data(self, *args: Any, **load_kwargs: Any) -> List[Document]:
    """Load data from the input directory.

    NOTE: This is not implemented.

    """
    raise NotImplementedError("Cannot load documents from Make.com API.")

pass_response_to_webhook #

pass_response_to_webhook(webhook_url: str, response: Response, query: Optional[str] = None) -> None

Pass response object to webhook.

Parameters:

Name Type Description Default
webhook_url str

Webhook URL.

required
response Response

Response object.

required
query Optional[str]

Query. Defaults to None.

None
Source code in llama-index-integrations/readers/llama-index-readers-make-com/llama_index/readers/make_com/base.py
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
def pass_response_to_webhook(
    self, webhook_url: str, response: Response, query: Optional[str] = None
) -> None:
    """Pass response object to webhook.

    Args:
        webhook_url (str): Webhook URL.
        response (Response): Response object.
        query (Optional[str]): Query. Defaults to None.

    """
    response_text = response.response
    source_nodes = [n.dict() for n in response.source_nodes]
    json_dict = {
        "response": response_text,
        "source_nodes": source_nodes,
        "query": query,
    }
    r = requests.post(webhook_url, json=json_dict)
    r.raise_for_status()