You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description="Analyze the nature of the request, identifying the specific disease, virus, or condition. Consider the context of the inquiry, including symptoms, demographics, and relevant medical history to provide a comprehensive understanding.",
59
+
)
60
+
pubmed_query: str=Field(
61
+
...,
62
+
description="Formulate a precise PubMed query based on the analysis of the request. Ensure the query includes the disease or condition name, relevant keywords, and MeSH terms. Incorporate Boolean operators to enhance search accuracy and retrieve the most pertinent research articles, reviews, and clinical trials.",
63
+
)
64
+
max_articles: int=Field(
65
+
...,
66
+
description=None
67
+
)
68
+
69
+
58
70
# Create an instance of the OpenAIChat class with GPT-4
59
71
model=OpenAIChat(
60
72
openai_api_key=openai_api_key,
@@ -90,19 +102,13 @@ class MedInsightMetadataOutput(BaseModel):
90
102
)
91
103
92
104
93
-
classPubMedQuery(BaseModel):
94
-
analysis_of_request: str=Field(
95
-
...,
96
-
description="Analyze the nature of the request, identifying the specific disease, virus, or condition. Consider the context of the inquiry, including symptoms, demographics, and relevant medical history to provide a comprehensive understanding.",
97
-
)
98
-
pubmed_query: str=Field(
99
-
...,
100
-
description="Formulate a precise PubMed query based on the analysis of the request. Ensure the query includes the disease or condition name, relevant keywords, and MeSH terms. Incorporate Boolean operators to enhance search accuracy and retrieve the most pertinent research articles, reviews, and clinical trials.",
101
-
)
102
-
103
-
104
105
# Define the MedInsightPro class with customizable options and logging
105
106
classMedInsightPro:
107
+
"""
108
+
This class is used to initialize and run the MedInsight Pro agent.
109
+
It allows for customization of various options and provides logging functionality.
110
+
"""
111
+
106
112
def__init__(
107
113
self,
108
114
semantic_scholar_api_key: str=None,
@@ -112,6 +118,9 @@ def __init__(
112
118
max_loops: int=None,
113
119
return_json: bool=False,
114
120
):
121
+
"""
122
+
Initialize the MedInsight Pro agent with the provided parameters.
0 commit comments