|
| 1 | +### Initial Idea Submission |
| 2 | + |
| 3 | +Full Name: Mohammed Ayaan |
| 4 | +University name: PES University Bangalore |
| 5 | +Program you are enrolled in (Degree & Major/Minor): BTech (AI/ML) |
| 6 | +Year: 2nd year (2023-2027) |
| 7 | +Expected graduation date: 2027 |
| 8 | + |
| 9 | +Project Title: AI UI Designer for APIs |
| 10 | +Relevant issues: #617 |
| 11 | + |
| 12 | +Idea description: |
| 13 | + |
| 14 | +My assumption here is that the requirement is to provide an advanced preview for API responses |
| 15 | +which are of type json/xml. |
| 16 | + |
| 17 | +Proposed solution - |
| 18 | + |
| 19 | +When the API responses are of type xml/json we can show additional advanced preview action buttons on the |
| 20 | +response widget. eg : Data table, Chart, Summary |
| 21 | + |
| 22 | +# 12-Mar-2025 - Proof of concept/ update |
| 23 | + |
| 24 | +I executed a quick proof of concept using chatgpt and the results were amazing. |
| 25 | + |
| 26 | +=> I was able to generate entire flutter widget with customizations. This essentially means that our static widget screens now |
| 27 | +can be mere placeholders/containers which render the widgets given by the llm codegen service. |
| 28 | + |
| 29 | +=> We need not restrict on the type of charts we can support. We can in fact take guidance from llm on what |
| 30 | +kind of charts can be helpful in analyzing the data and pick may be the best 5 types |
| 31 | + |
| 32 | +=> However we need to have control on the look and feel and apidash ui standards. These can be provided |
| 33 | +as inputs to the prompt. eg: top/bottom margins should be 5%, bar graph color must be blue, or width of |
| 34 | +bars must be 5 px etc. |
| 35 | +Sample charts generated using json data. |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +We can design a fixed layout as per apidash ui standards (font, colors, themes) for each of the |
| 42 | +visualization. This would comprise the static content by reusing the existing widgets. This will ensure |
| 43 | +uniform look and feel for all users. |
| 44 | +for eg: datatable_page.dart, chart_page.dart, summary_page.dart |
| 45 | + |
| 46 | +Dynamic data based on the json/xml input would come from the codellama service. for eg: visualizations_service.dart. |
| 47 | +This service will interface with the codellama server by providing the json/xml as input and |
| 48 | +return the generated html/dart widget code or may be just the collections which needs to be placed in |
| 49 | +the placeholders in static screen widgets. This can be evaluated and decided as per the support provided |
| 50 | +by the codellama service. |
| 51 | + |
| 52 | +To ensure the kind of output(html/dart code or the transforming the json/xml data) we need, |
| 53 | +we can provide the llm with few shot prompts as examples. |
| 54 | + |
| 55 | +On click of Data table => |
| 56 | +call visualization_service.dart to get the dynamic content from json/xml as required for data table. |
| 57 | +Render the widget. Widget to provide capabilities to sort and search |
| 58 | +On click of Chart => |
| 59 | +We can ask for additional inputs like which type of chart, on what columns etc. |
| 60 | +call visualization_service.dart to get the dynamic content from json/xml as required for chart widget. |
| 61 | +Render the widget. Multiple chart types can be supported like bar graph, pie, bubble etc. |
| 62 | +On click of Summary => |
| 63 | +We can provide some options like top 5 data points(eg: positive reviews/ratings), group by |
| 64 | +or outliers, book summary, weather report etc |
| 65 | +call visualization_service.dart to get the dynamic content from json/xml as required for summary widget. |
| 66 | + |
| 67 | +Additionally I can perhaps also contribute to the har importer project. I do have some exposure to har formats. |
| 68 | +I will analyze and update the idea shortly. |
0 commit comments