pvanand commited on
Commit
3a25e33
1 Parent(s): 02ddbf6

Update prompts.py

Browse files
Files changed (1) hide show
  1. prompts.py +33 -51
prompts.py CHANGED
@@ -1,54 +1,36 @@
1
  # prompts.py #
2
 
3
  from datetime import datetime
4
-
5
- CODING_ASSISTANT_PROMPT = "\
6
- You are a helpful assistant proficient in coding tasks. Help the user in understanding and writing code."
7
-
8
- NEWS_ASSISTANT_PROMPT = \
9
- """Given a set of recent news articles or snippets:
10
-
11
- 1. Identify the main subject and timeframe of the news.
12
-
13
- 3. Create a title and brief introduction summarizing the overall situation.
14
-
15
- 4. Structure the main body:
16
- - Use themed sections with clear subheadings
17
- - Prioritize recent and impactful news, (include updated time in each snippet)
18
- - Provide context and highlight implications
19
- - Provide analysis for each section
20
-
21
- 5. Analyze trends and note any conflicting information.
22
-
23
- 6. Conclude with a summary and forward-looking statement.
24
-
25
- 7. Maintain a professional, objective tone throughout.
26
-
27
- 8. Ensure the report is well-formatted, accurate, and provides a balanced view.
28
-
29
- Aim for a comprehensive overview that informs readers about recent developments
30
- and their potential impact."""
31
-
32
- SEARCH_ASSISTANT_PROMPT = \
33
- """You are an expert writer capable of writing beautifully formatted answers in markdown formatting using internet search results.
34
- 1. filter and summarize relevant information, if there are conflicting information, use the latest source.
35
- 2. use it to construct a clear and factual answer.
36
- Your response should be structured and properly formatted using markdown headings, subheadings, tables, use as necessary. Ignore Links and references
37
- """
38
- def generate_news_prompt(query, news_data):
39
- today = datetime.now().strftime("%Y-%m-%d")
40
- prompt = f"Based on the following recent news about user query: {query}, create a well rounded news report, well formatted using markdown format:'Today's date is {today}."
41
- for item in news_data:
42
- prompt += f"Title: {item['title']}\n"
43
- prompt += f"Snippet: {item['snippet']}\n"
44
- prompt += f"Last Updated: {item['last_updated']}\n\n"
45
- return prompt
46
-
47
- def generate_search_prompt(query, search_data):
48
- today = datetime.now().strftime("%Y-%m-%d")
49
- prompt = f"Write a well thought out, detailed and structured answer to the query::{query}, refer the provided internet search results for context::'Today's date is {today}."
50
- for item in search_data:
51
- prompt += f"Title: {item['title']}\n"
52
- prompt += f"Snippet: {item['snippet']}\n"
53
- prompt += f"Last Updated: {item['last_updated']}\n\n"
54
- return prompt
 
1
  # prompts.py #
2
 
3
  from datetime import datetime
4
+ marpit_example = """
5
+ ---
6
+ marp: true
7
+ theme: default
8
+ paginate: true
9
+ style: |
10
+ section {
11
+ background-color: #;
12
+ font-family: ;
13
+ }
14
+ h1, h2 {
15
+ color: ;
16
+ border-bottom: ;
17
+ padding-bottom: ;
18
+ }
19
+ ul, ol {
20
+ color: ;
21
+ }
22
+ strong {
23
+ color: ;
24
+ }
25
+ img {
26
+ border-radius: ;
27
+ box-shadow: ;
28
+ }
29
+ ---
30
+ """
31
+ # Initialize OpenAI client (assuming you have set up the API key)
32
+ PRESENTATION_SYSTEM_PROMPT = f"""You are a Markdown Presentation maker using Marp formatting.
33
+ 1. Enclose the output presentation in following tags <marp_presentation>presentation in marp format</marp_presentation>,
34
+ 2. start the presentation using the following section {marpit_example},
35
+ 3. use --- to add a new page"
36
+ 4. if images are required, specify image position, dimension and a single keyword in the format ![bg right:40% 80%](keyword), [bg left:40%](keyword), [bg right:33%](keyword)"""