File size: 1,495 Bytes
c01955c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import os
import sys

sys.path.append(os.getcwd())

from dotenv import load_dotenv
load_dotenv()

from logger import *
import logging
import asyncio
from src.Agents.pipelines.FormFillerPipeline import FormFillerPipeline


async def main():
    form_filler_pipeline = FormFillerPipeline()

    formFields = [
        {
            "id": "field-01",
            "name": "full_name",
            "placeholder": "Enter your full name",
            "type": "text",
            "label_text": "Full Name"
        },
        {
            "id": "field-02",
            "name": "email",
            "placeholder": "Enter your email",
            "type": "email",
            "label_text": "Email Address"
        },
        {
            "id": "field-03",
            "name": "phone",
            "placeholder": "Enter phone number",
            "type": "text",
            "label_text": "Phone Number"
        },
        {
            "id": "field-04",
            "name": "address",
            "placeholder": "Enter address",
            "type": "text",
            "label_text": "Shipping Address"
        }
    ]

    userDetails = """
    Name: Vansh Sharma
    Email: vanshsharma123@gmail.com
    Phone: 9876543210
    Location: Ghaziabad, Uttar Pradesh, India
    Skills: Python, Machine Learning, Node.js
    """

    res = await form_filler_pipeline.initiate(
        formFields=formFields,
        userDetails=userDetails
    )

    logging.info(f"Final Response: {res}")


asyncio.run(main())