Gilberto Medrano commited on
Commit
03f3a3f
·
1 Parent(s): 1763a07

Updating changes to prompt templates for working with JSON and React

Browse files
Files changed (3) hide show
  1. app.py +14 -2
  2. chainlit.md +2 -2
  3. public/stylesheet.css +30 -2
app.py CHANGED
@@ -12,10 +12,22 @@ load_dotenv()
12
 
13
  # ChatOpenAI Templates
14
  system_template = """
15
- You are an expert assistant focused on providing detailed, step-by-step guidance for completing complex tasks. Always ensure your responses are clear, concise, and contextually relevant to the user's input.
 
 
 
 
 
 
 
 
 
 
 
16
  """
17
 
18
- user_template = """Considering the following context: {input}, provide a comprehensive and accurate response, breaking down the information into actionable steps where applicable.
 
19
  """
20
 
21
  response_template = """
 
12
 
13
  # ChatOpenAI Templates
14
  system_template = """
15
+ You are an expert in React development with a deep understanding of form rendering from JSON data. Your knowledge extends to advanced state management techniques and user experience design. You provide clear, practical, and detailed guidance on dynamically creating forms, monitoring form state changes, and implementing mechanisms to prevent user navigation when forms are actively edited. Your focus is on delivering actionable instructions and best practices that can be easily implemented in a real-world project.
16
+ Key Traits:
17
+ Highly knowledgeable in React and JavaScript.
18
+ Expert in dynamic form rendering using JSON data.
19
+ Proficient in state management techniques in React.
20
+ Skilled in user experience design, particularly in preventing data loss during form edits.
21
+ Clear, concise, and practical in communication.
22
+ Responsibilities:
23
+ Provide detailed, step-by-step instructions on rendering forms from JSON data using React.
24
+ Offer best practices and code examples for tracking form state changes.
25
+ Explain and demonstrate strategies to prevent users from navigating away from forms with unsaved changes.
26
+ Deliver advice and solutions in a clear, practical, and easily implementable manner.
27
  """
28
 
29
+ user_template = """
30
+ Considering the following context: {input}, provide a comprehensive and accurate response, breaking down the information into actionable steps where applicable.
31
  """
32
 
33
  response_template = """
chainlit.md CHANGED
@@ -1,10 +1,10 @@
1
  #### Beyond ChatGPT presents:
2
 
3
- # The Challenge Challenger
4
 
5
 
6
 
7
  ![alt text](/public/gpt_avatar.webp "Title")
8
 
9
 
10
- #### This Chainlit app was created following instructions from [this repository!](https://github.com/AI-Maker-Space/Beyond-ChatGPT)
 
1
  #### Beyond ChatGPT presents:
2
 
3
+ # The AIE3 Challenge Challenger
4
 
5
 
6
 
7
  ![alt text](/public/gpt_avatar.webp "Title")
8
 
9
 
10
+ #### Good luck with those JSON forms!
public/stylesheet.css CHANGED
@@ -1,7 +1,6 @@
1
  html {
2
  background: rgb(59,73,87);
3
  background: linear-gradient(45deg, rgb(12, 4, 34) 0%, rgb(52, 7, 114) 100%);
4
- padding: 4rem 8rem !important;
5
  }
6
 
7
  body {
@@ -109,4 +108,33 @@ body {
109
 
110
  .css-1705j0v img {
111
  filter: brightness(0) invert(1) !important;
112
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  html {
2
  background: rgb(59,73,87);
3
  background: linear-gradient(45deg, rgb(12, 4, 34) 0%, rgb(52, 7, 114) 100%);
 
4
  }
5
 
6
  body {
 
108
 
109
  .css-1705j0v img {
110
  filter: brightness(0) invert(1) !important;
111
+ }
112
+
113
+ /* Media query for mobile devices */
114
+ @media only screen and (max-width: 768px) {
115
+ .css-sdz2z h1, .markdown-body h1 {
116
+ font-size: 1.5rem !important;
117
+ }
118
+ .css-ugcix4, .css-1ofqig9, .css-144sd5e, #root, body {
119
+ border-radius: 0 !important;
120
+ }
121
+
122
+ }
123
+
124
+ /* Media query for tablet devices */
125
+ @media only screen and (min-width: 769px) and (max-width: 1024px) {
126
+ html {
127
+ padding: 2rem 4rem !important;
128
+ }
129
+ }
130
+
131
+ /* Media query for desktop devices */
132
+ @media only screen and (min-width: 1025px) {
133
+ html {
134
+ padding: 4rem 8rem !important;
135
+ }
136
+ }
137
+
138
+ /* This Chainlit app was created following instructions from [this repository!](https://github.com/AI-Maker-Space/Beyond-ChatGPT) */
139
+ /* You are an expert assistant focused on providing detailed, step-by-step guidance for completing complex tasks. Always ensure your responses are clear, concise, and contextually relevant to the user's input. */
140
+ /* Considering the following context: {input}, provide a comprehensive and accurate response, breaking down the information into actionable steps where applicable. */