raannakasturi commited on
Commit
00d470f
·
1 Parent(s): 62463b3

Update model version to llama-3.3-70b in NLP processing functions

Browse files
Files changed (1) hide show
  1. nlp_processes.py +4 -20
nlp_processes.py CHANGED
@@ -24,11 +24,7 @@ def generate_nlp_summary(temp_summary):
24
  print(str(e))
25
  client = Client()
26
  completion = client.chat.completions.create(
27
- provider=RetryProvider(
28
- providers=[Provider.DDG, Provider.DarkAI, Provider.DeepInfraChat, Provider.PollinationsAI, Provider.RubiksAI, Provider.TeachAnything, Provider.Airforce],
29
- max_retries=8,
30
- ),
31
- model="llama-3.1-70b",
32
  messages=[
33
  {"role": "system", "content": "You are a helpful research assistant for generating well-formatted summaries from scientific research papers."},
34
  {"role": "user", "content": f'As a text script expert, please help me to write a short text script with the topic \" {temp_summary}\".You have three tasks, which are:\\n 1.to summarize the text I provided into a Summary .Please answer within 150-300 characters.\\n 2.to summarize the text I provided, using up to seven Highlight.\\n 3.to summarize the text I provided, using up to seven Key Insights. Each insight should include a brief in-depth analysis. Key Insight should not include timestamps.\\n Your output should use the following template strictly, provide the results for the three tasks:\\n ## Summary\\n ## Highlights\\n - Highlights\\n ## Key Insights\\n - Key Insights .\\n Importantly your output must use language \"English\"'}
@@ -60,11 +56,7 @@ def generate_nlp_mindmap(temp_summary):
60
  print(str(e))
61
  client = Client()
62
  completion = client.chat.completions.create(
63
- provider=RetryProvider(
64
- providers=[Provider.DDG, Provider.DarkAI, Provider.DeepInfraChat, Provider.PollinationsAI, Provider.RubiksAI, Provider.TeachAnything, Provider.Airforce],
65
- max_retries=8,
66
- ),
67
- model="llama-3.1-70b",
68
  messages=[
69
  {"role": "system", "content": "You are a helpful research assistant for generating well-formatted mindmaps from scientific research papers."},
70
  {"role": "user", "content": f'As a text script expert, please help me to write a short text script with the topic \"{temp_summary}\".Your output should use the following template:\\n\\n## {{Subtitle01}}\\n- {{Bulletpoint01}}\\n- {{Bulletpoint02}}\\n## {{Subtitle02}}\\n- {{Bulletpoint03}}\\n- {{Bulletpoint04}}\\n\\nSummarize the giving topic to generate a mind map (as many subtitles as possible, with a minimum of three subtitles) structure markdown. Do not include anything in the response, that is not the part of mindmap.\\n Most Importantly your output must use language \"English\" and each point or pointer should include no more than 9 words.'}
@@ -119,11 +111,7 @@ def fix_title(title):
119
  print(str(e))
120
  client = Client()
121
  completion = client.chat.completions.create(
122
- provider=RetryProvider(
123
- providers=[Provider.DDG, Provider.DarkAI, Provider.DeepInfraChat, Provider.PollinationsAI, Provider.RubiksAI, Provider.TeachAnything, Provider.Airforce],
124
- max_retries=8,
125
- ),
126
- model="llama-3.1-70b",
127
  messages=[
128
  {
129
  "role": "system",
@@ -199,11 +187,7 @@ def fix_citation(citation):
199
  print(str(e))
200
  client = Client()
201
  completion = client.chat.completions.create(
202
- provider=RetryProvider(
203
- providers=[Provider.DDG, Provider.DarkAI, Provider.DeepInfraChat, Provider.PollinationsAI, Provider.RubiksAI, Provider.TeachAnything, Provider.Airforce],
204
- max_retries=8,
205
- ),
206
- model="llama-3.1-70b",
207
  messages=[
208
  {
209
  "role": "system",
 
24
  print(str(e))
25
  client = Client()
26
  completion = client.chat.completions.create(
27
+ model="llama-3.3-70b",
 
 
 
 
28
  messages=[
29
  {"role": "system", "content": "You are a helpful research assistant for generating well-formatted summaries from scientific research papers."},
30
  {"role": "user", "content": f'As a text script expert, please help me to write a short text script with the topic \" {temp_summary}\".You have three tasks, which are:\\n 1.to summarize the text I provided into a Summary .Please answer within 150-300 characters.\\n 2.to summarize the text I provided, using up to seven Highlight.\\n 3.to summarize the text I provided, using up to seven Key Insights. Each insight should include a brief in-depth analysis. Key Insight should not include timestamps.\\n Your output should use the following template strictly, provide the results for the three tasks:\\n ## Summary\\n ## Highlights\\n - Highlights\\n ## Key Insights\\n - Key Insights .\\n Importantly your output must use language \"English\"'}
 
56
  print(str(e))
57
  client = Client()
58
  completion = client.chat.completions.create(
59
+ model="llama-3.3-70b",
 
 
 
 
60
  messages=[
61
  {"role": "system", "content": "You are a helpful research assistant for generating well-formatted mindmaps from scientific research papers."},
62
  {"role": "user", "content": f'As a text script expert, please help me to write a short text script with the topic \"{temp_summary}\".Your output should use the following template:\\n\\n## {{Subtitle01}}\\n- {{Bulletpoint01}}\\n- {{Bulletpoint02}}\\n## {{Subtitle02}}\\n- {{Bulletpoint03}}\\n- {{Bulletpoint04}}\\n\\nSummarize the giving topic to generate a mind map (as many subtitles as possible, with a minimum of three subtitles) structure markdown. Do not include anything in the response, that is not the part of mindmap.\\n Most Importantly your output must use language \"English\" and each point or pointer should include no more than 9 words.'}
 
111
  print(str(e))
112
  client = Client()
113
  completion = client.chat.completions.create(
114
+ model="llama-3.3-70b",
 
 
 
 
115
  messages=[
116
  {
117
  "role": "system",
 
187
  print(str(e))
188
  client = Client()
189
  completion = client.chat.completions.create(
190
+ model="llama-3.3-70b",
 
 
 
 
191
  messages=[
192
  {
193
  "role": "system",