kevinhug commited on
Commit
8d075f5
·
1 Parent(s): 1557884

deepseek-r1-distill-qwen-32b update

Browse files
Files changed (3) hide show
  1. controls.py +2 -18
  2. rag.py +4 -2
  3. tool.py +1 -1
controls.py CHANGED
@@ -11,7 +11,7 @@ from tavily import TavilyClient
11
  #lm = dspy.LM('ollama_chat/deepscaler', api_base='http://localhost:11434', api_key='')
12
  #lm = dspy.LM('huggingface/Qwen/Qwen2.5-Coder-32B-Instruct')
13
  #lm = dspy.LM('huggingface/meta-llama/Llama-3.2-1B')
14
- lm = dspy.LM('groq/deepseek-r1-distill-qwen-32b')
15
  dspy.configure(lm=lm)
16
 
17
  search_client = TavilyClient(api_key=os.environ["T_TOKEN"])
@@ -49,10 +49,6 @@ class Detective(dspy.Module):
49
  Use control to validate whether each red flag is hoax or a false positive.
50
 
51
  Examples: cross-checking official contact numbers on verified government websites, confirming with independent third parties, requesting written documentation, checking with financial institutions’ fraud units, or using telecom records (Rogers, etc.) for number spoofing.
52
-
53
- Risk Assessment
54
- - Provide a reasoned judgment on whether the case represents fraud, hoax, or a legitimate investigation.
55
- - Explain potential impact (identity theft, wealth destruction, reputational damage).
56
  """
57
  def __init__(self):
58
  self.redFlags_generator = dspy.ChainOfThought(RedFlagsGenerator)
@@ -65,19 +61,7 @@ class Detective(dspy.Module):
65
 
66
 
67
  story = """
68
- Dear Sir,
69
-
70
- I am DR Lucas Chiebo, the personal Assistance to the late Nigerian Minister of Justice and the Attorney General of the Federal ChiefBola Ige, who was murdered on 23rd of December 2001 by unknown persons. Before he became the minister of Justice and the Attorney General of the Federation, he was once the Minister of Mines and Power. During his time as a Minister of Mines and Power, the Federal Government of Nigeria gave to his ministry the sum of US$200 Million, which is to be used for the completion of the Ajaokuta Steel Industry and the purchasing of electrical transformers and able for the Nigerian Electric Power Authority (NEPA). Then this jobs and the supply of the transformers and cables were done, but of low Quality standard and the transformers he imported were of low quality standard and of low power capacity.
71
-
72
- Because of the low quality standard of this jobs, the sum of US$22 Million was realized of which he deposited US$15 Million to a security company abroad and was looking for a reliable person or company whom he will transact business with before he meet his un-timely death on the 23rd of December, 2001. He informed the security company about his foreign partner who will be coming to pick the money although no company’s name was given to the security company before he died it was only I and the late Chief Bola Ige knew about the money.
73
-
74
- Therefore, if you can be trusted in fairness to your honesty to safe keep that money pending when I will be coming to meet you in your country. Please, if you are not interested with this business, kindly inform me As soon as you received this proposals. At the same time, if you are interested, kindly send me as a matter of urgency: your company’s name and address, your private phone and fax number. This will be used to send to you the fund deposit certificate which you will use to claim the money from the Security company.
75
-
76
- I am awaiting to hear from you.
77
-
78
- Best regard.
79
-
80
- DR Lucas Chiebo
81
  """
82
 
83
  conan = Detective()
 
11
  #lm = dspy.LM('ollama_chat/deepscaler', api_base='http://localhost:11434', api_key='')
12
  #lm = dspy.LM('huggingface/Qwen/Qwen2.5-Coder-32B-Instruct')
13
  #lm = dspy.LM('huggingface/meta-llama/Llama-3.2-1B')
14
+ lm = dspy.LM('groq/llama-3.1-8b-instant', api_base='https://api.groq.com/openai/v1', api_key=os.environ["GROQ_API_KEY"])
15
  dspy.configure(lm=lm)
16
 
17
  search_client = TavilyClient(api_key=os.environ["T_TOKEN"])
 
49
  Use control to validate whether each red flag is hoax or a false positive.
50
 
51
  Examples: cross-checking official contact numbers on verified government websites, confirming with independent third parties, requesting written documentation, checking with financial institutions’ fraud units, or using telecom records (Rogers, etc.) for number spoofing.
 
 
 
 
52
  """
53
  def __init__(self):
54
  self.redFlags_generator = dspy.ChainOfThought(RedFlagsGenerator)
 
61
 
62
 
63
  story = """
64
+ government SCAM PHONE CALL-> identity stolen(provide time and location, force you to contact police(scammer actor)) -> cooperate(social engineering) -> (make you involved in confidential case, dont tell anyone or in jail for 6 month, good cop bad cop) you are suspect -> bail to secure account
 
 
 
 
 
 
 
 
 
 
 
 
65
  """
66
 
67
  conan = Detective()
rag.py CHANGED
@@ -1,11 +1,13 @@
1
  import dspy
2
-
3
  import pandas as pd
4
 
5
  #lm = dspy.LM('ollama_chat/llama3.2', api_base='http://localhost:11434', api_key='')
6
  #lm = dspy.LM('huggingface/Qwen/Qwen2.5-Coder-32B-Instruct')
7
  #lm = dspy.LM('huggingface/meta-llama/Llama-3.2-1B')
8
- lm = dspy.LM('groq/deepseek-r1-distill-qwen-32b')
 
 
9
  dspy.configure(lm=lm)
10
 
11
  df = pd.read_csv("product2.csv")
 
1
  import dspy
2
+ import os
3
  import pandas as pd
4
 
5
  #lm = dspy.LM('ollama_chat/llama3.2', api_base='http://localhost:11434', api_key='')
6
  #lm = dspy.LM('huggingface/Qwen/Qwen2.5-Coder-32B-Instruct')
7
  #lm = dspy.LM('huggingface/meta-llama/Llama-3.2-1B')
8
+ #lm = dspy.LM('groq/deepseek-r1-distill-qwen-32b', api_base='https://api.groq.com/openai/v1', api_key=os.environ["GROQ_API_KEY"])
9
+ lm = dspy.LM('groq/llama-3.1-8b-instant', api_base='https://api.groq.com/openai/v1', api_key=os.environ["GROQ_API_KEY"])
10
+
11
  dspy.configure(lm=lm)
12
 
13
  df = pd.read_csv("product2.csv")
tool.py CHANGED
@@ -7,7 +7,7 @@ from tavily import TavilyClient
7
  #lm = dspy.LM('ollama_chat/llama3.2', api_base='http://localhost:11434', api_key='')
8
  #lm = dspy.LM('huggingface/Qwen/Qwen2.5-Coder-32B-Instruct')
9
  #lm = dspy.LM('huggingface/meta-llama/Llama-3.2-1B')
10
- lm = dspy.LM('groq/deepseek-r1-distill-qwen-32b')
11
  dspy.configure(lm=lm)
12
 
13
  search_client = TavilyClient(api_key=os.environ["T_TOKEN"])
 
7
  #lm = dspy.LM('ollama_chat/llama3.2', api_base='http://localhost:11434', api_key='')
8
  #lm = dspy.LM('huggingface/Qwen/Qwen2.5-Coder-32B-Instruct')
9
  #lm = dspy.LM('huggingface/meta-llama/Llama-3.2-1B')
10
+ lm = dspy.LM('groq/llama-3.1-8b-instant', api_base='https://api.groq.com/openai/v1', api_key=os.environ["GROQ_API_KEY"])
11
  dspy.configure(lm=lm)
12
 
13
  search_client = TavilyClient(api_key=os.environ["T_TOKEN"])