ryefoxlime commited on
Commit
f328415
1 Parent(s): 1cc5a1d

alpha version 1.1

Browse files
Files changed (2) hide show
  1. app.py +13 -1
  2. src/research_agent/config/tasks.yaml +23 -25
app.py CHANGED
@@ -27,7 +27,19 @@ class MarketUseCaseGen:
27
  progress_bar.progress(100)
28
  # Display the generated article
29
  st.subheader("Generated Article:")
 
30
  if st.session_state.article_text and st.session_state.article_text != "":
 
 
 
 
 
 
 
 
 
 
 
31
  with st.container():
32
  # Display the article text
33
  st.markdown(st.session_state.article_text)
@@ -38,7 +50,7 @@ class MarketUseCaseGen:
38
  if st.session_state.article_text:
39
  st.download_button(
40
  label="Download Article",
41
- data=st.session_state.article_text,
42
  file_name=f"{st.session_state.name.replace(' ', '_').lower()}_market_and_use_case_analysis.txt",
43
  mime="text/plain"
44
  )
 
27
  progress_bar.progress(100)
28
  # Display the generated article
29
  st.subheader("Generated Article:")
30
+
31
  if st.session_state.article_text and st.session_state.article_text != "":
32
+
33
+ # Convert the article text to a string if it's not already
34
+ if isinstance(st.session_state.article_text, str):
35
+ article_text = st.session_state.article_text
36
+
37
+ elif isinstance(st.session_state.article_text, dict) and 'article' in st.session_state.article_text:
38
+ article_text = st.session_state.article_text['article']
39
+
40
+ else:
41
+ article_text = str(st.session_state.article_text)
42
+
43
  with st.container():
44
  # Display the article text
45
  st.markdown(st.session_state.article_text)
 
50
  if st.session_state.article_text:
51
  st.download_button(
52
  label="Download Article",
53
+ data=article_text,
54
  file_name=f"{st.session_state.name.replace(' ', '_').lower()}_market_and_use_case_analysis.txt",
55
  mime="text/plain"
56
  )
src/research_agent/config/tasks.yaml CHANGED
@@ -5,7 +5,7 @@ research_task:
5
  - Find out the {company} strategic focus areas where it outperforms other companys in the same Industry
6
  - For additional information about the company use the following link: {company_link}
7
  IMPORTANT INSTRUCTIONS ABOUT USING TOOLS: When using tools, DO NOT ESCAPE the underscore character "_", EVER. If you need to use a tool and pass in a parameter called 'search_query', you should write 'search_query', not 'search\_query'. THIS IS VERY IMPORTANT, else the tool will not work.
8
-
9
  expected_output: >
10
  - A list with the most relevant information about industry,segment,key offering and strategic focus of {company} in a markdown file.
11
  - For each source or contextual detail referenced, please include any relevant links in a markdown link format (e.g., [source text](URL)).
@@ -23,10 +23,10 @@ design_task:
23
  For flowcharts use the mermaid js library.
24
  Ensure that all relevant information is accessible within the file, and integrate each link in context as necessary for clarity (e.g., [source text](URL)).
25
  IMPORTANT INSTRUCTIONS ABOUT USING TOOLS: When using tools, DO NOT ESCAPE the underscore character "_", EVER. If you need to use a tool and pass in a parameter called 'search_query', you should write 'search_query', not 'search\_query'. THIS IS VERY IMPORTANT, else the tool will not work.
26
-
27
  expected_output: >
28
  A markdown document with all the ideas to that can be implemented.
29
-
30
  Each one should contain:
31
  - Title:
32
  - Summary:
@@ -36,28 +36,26 @@ design_task:
36
  - How the idea may impact or benefit the customers
37
  - Source: [source text](URL)
38
 
39
-
40
  agent: design_thinker
41
 
42
  resource_collector:
43
- description: >
44
- Based on the ideas generated by the design thinker, gather relevant resources to support each idea.
45
- - The resources should include relevant datasets, research papers, similar or existing projects, and any related documentation that may aid in exploring or validating the proposed expansion ideas.
46
- - Each resource should be annotated with a short description explaining its relevance.
47
- - If applicable, propose GenAI solutions like document search, automated report generation, and AI-powered chat systems for internal or customer-facing purposes.
48
- - Datasets and existing projects can be found on websites such as hugging_face, github, kaggle.
49
-
50
- IMPORTANT INSTRUCTIONS ABOUT USING TOOLS: When using tools, DO NOT ESCAPE the underscore character "_", EVER. If you need to use a tool and pass in a parameter called 'search_query', you should write 'search_query', not 'search\_query'. THIS IS VERY IMPORTANT, else the tool will not work.
51
-
52
- Context: ["analysing_task"]
53
-
54
- expected_output: >
55
- A structured list of resources for any two ideas, with the following details for each resource:
56
- - Title and type of the resource (e.g., Dataset, Research Paper, Project)
57
- - Direct link or reference to the resource in markdown link format (e.g., [Title](URL))
58
- - A short summary of how each resource is relevant to the specific idea.
59
- - Modification to suit {company}'s goals
60
-
61
- Ensure that this information is formatted as markdown, with each resource link integrated in context for readability.
62
-
63
- agent: developer
 
5
  - Find out the {company} strategic focus areas where it outperforms other companys in the same Industry
6
  - For additional information about the company use the following link: {company_link}
7
  IMPORTANT INSTRUCTIONS ABOUT USING TOOLS: When using tools, DO NOT ESCAPE the underscore character "_", EVER. If you need to use a tool and pass in a parameter called 'search_query', you should write 'search_query', not 'search\_query'. THIS IS VERY IMPORTANT, else the tool will not work.
8
+ Search a particular website takes the argument as search_query: 'string', website: 'string' in order to use the tool properly
9
  expected_output: >
10
  - A list with the most relevant information about industry,segment,key offering and strategic focus of {company} in a markdown file.
11
  - For each source or contextual detail referenced, please include any relevant links in a markdown link format (e.g., [source text](URL)).
 
23
  For flowcharts use the mermaid js library.
24
  Ensure that all relevant information is accessible within the file, and integrate each link in context as necessary for clarity (e.g., [source text](URL)).
25
  IMPORTANT INSTRUCTIONS ABOUT USING TOOLS: When using tools, DO NOT ESCAPE the underscore character "_", EVER. If you need to use a tool and pass in a parameter called 'search_query', you should write 'search_query', not 'search\_query'. THIS IS VERY IMPORTANT, else the tool will not work.
26
+ Search a particular website takes the argument as search_query: 'string', website: 'string' in order to use the tool properly
27
  expected_output: >
28
  A markdown document with all the ideas to that can be implemented.
29
+
30
  Each one should contain:
31
  - Title:
32
  - Summary:
 
36
  - How the idea may impact or benefit the customers
37
  - Source: [source text](URL)
38
 
 
39
  agent: design_thinker
40
 
41
  resource_collector:
42
+ description: >
43
+ Based on the ideas generated by the design thinker, gather relevant resources to support each idea.
44
+ - The resources should include relevant datasets, research papers, similar or existing projects, and any related documentation that may aid in exploring or validating the proposed expansion ideas.
45
+ - Each resource should be annotated with a short description explaining its relevance.
46
+ - If applicable, propose GenAI solutions like document search, automated report generation, and AI-powered chat systems for internal or customer-facing purposes.
47
+ - Datasets and existing projects can be found on websites such as hugging_face, github, kaggle.
48
+
49
+ IMPORTANT INSTRUCTIONS ABOUT USING TOOLS: When using tools, DO NOT ESCAPE the underscore character "_", EVER. If you need to use a tool and pass in a parameter called 'search_query', you should write 'search_query', not 'search\_query'. THIS IS VERY IMPORTANT, else the tool will not work.
50
+ Search a particular website takes the argument as search_query: 'string', website: 'string' in order to use the tool properly
51
+ Context: ["analysing_task"]
52
+ expected_output: >
53
+ A structured list of resources for any two ideas, with the following details for each resource:
54
+ - Title and type of the resource (e.g., Dataset, Research Paper, Project)
55
+ - Direct link or reference to the resource in markdown link format (e.g., [Title](URL))
56
+ - A short summary of how each resource is relevant to the specific idea.
57
+ - Modification to suit {company}'s goals
58
+
59
+ Ensure that this information is formatted as markdown, with each resource link integrated in context for readability.
60
+
61
+ agent: developer