Chinez-dev commited on
Commit
39953b4
·
verified ·
1 Parent(s): f234d13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -23,7 +23,7 @@ def __init__(self):
23
  self.patient_data = {}
24
 
25
  @tool
26
- def collect_symptoms(self: CodeAgent, patient_id: str, symptoms: str) -> str:
27
  """
28
  Nurse tool to collect symptoms and ask follow-up questions.
29
 
@@ -64,6 +64,7 @@ def diagnose_patient(self: CodeAgent, patient_id: str) -> str:
64
  Doctor tool to diagnose the patient based on symptoms.
65
 
66
  Args:
 
67
  patient_id: Unique identifier for the patient.
68
 
69
  Returns:
@@ -89,7 +90,7 @@ def diagnose_patient(self: CodeAgent, patient_id: str) -> str:
89
  return f"Unexpected Error: {str(e)}"
90
 
91
  @tool
92
- def fetch_diagnosis(self: CodeAgent, symptoms: str) -> str:
93
  """
94
  AI tool to retrieve a diagnosis based on symptoms.
95
 
@@ -113,7 +114,7 @@ def fetch_diagnosis(self: CodeAgent, symptoms: str) -> str:
113
  return f"Unexpected Error: {str(e)}"
114
 
115
  @tool
116
- def fetch_medication(self: CodeAgent, symptoms: str) -> str:
117
  """
118
  AI tool to suggest medications based on symptoms.
119
 
@@ -137,7 +138,7 @@ def fetch_medication(self: CodeAgent, symptoms: str) -> str:
137
  return f"Unexpected Error: {str(e)}"
138
 
139
  @tool
140
- def fetch_treatment_advice(self: CodeAgent, symptoms: str) -> str:
141
  """
142
  AI tool to provide treatment recommendations.
143
 
 
23
  self.patient_data = {}
24
 
25
  @tool
26
+ def collect_symptoms(patient_id: str, symptoms: str) -> str:
27
  """
28
  Nurse tool to collect symptoms and ask follow-up questions.
29
 
 
64
  Doctor tool to diagnose the patient based on symptoms.
65
 
66
  Args:
67
+ self: Reference to the instance of the class.
68
  patient_id: Unique identifier for the patient.
69
 
70
  Returns:
 
90
  return f"Unexpected Error: {str(e)}"
91
 
92
  @tool
93
+ def fetch_diagnosis(symptoms: str) -> str:
94
  """
95
  AI tool to retrieve a diagnosis based on symptoms.
96
 
 
114
  return f"Unexpected Error: {str(e)}"
115
 
116
  @tool
117
+ def fetch_medication(symptoms: str) -> str:
118
  """
119
  AI tool to suggest medications based on symptoms.
120
 
 
138
  return f"Unexpected Error: {str(e)}"
139
 
140
  @tool
141
+ def fetch_treatment_advice(symptoms: str) -> str:
142
  """
143
  AI tool to provide treatment recommendations.
144