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
{{ message }}
This repository was archived by the owner on May 30, 2025. It is now read-only.
"answer": "Index funds are often a good choice for passive investors looking for broad market exposure with low fees. They offer diversification and typically outperform actively managed funds in the long term. However, the suitability depends on your investment goals, time horizon, and risk tolerance."
110
116
}
117
+
example_request_body= {"query": "Should I invest in index funds?"}
111
118
112
119
returntemplates.TemplateResponse(
113
120
"route.html",
114
121
{
115
122
"request": request,
116
123
"route_path": "/agent",
117
-
"method": "GET",
124
+
"method": "POST",
118
125
"full_path": str(request.url).split("?")[0],
119
-
"description": "Agent endpoint that uses a multi-AI system to provide sophisticated investment advice.",
126
+
"description": "Agent endpoint that uses a multi-AI system to provide sophisticated investment advice. Accepts a JSON body with a 'query' field.",
120
127
"parameters": [
121
-
{"name": "query", "type": "string", "description": "The investment question to ask"},
"question": "What are good tech stocks to invest in?",
152
162
"answer": "Some popular tech stocks to consider include Apple (AAPL), Microsoft (MSFT), Google (GOOGL), and Amazon (AMZN). However, you should always do your own research and consider your investment goals and risk tolerance before investing."
153
163
}
154
-
164
+
example_request_body= {"query": "What are good tech stocks to invest in?"}
165
+
155
166
returntemplates.TemplateResponse(
156
167
"route.html",
157
168
{
158
169
"request": request,
159
170
"route_path": "/chat",
160
-
"method": "GET",
171
+
"method": "GET",# Changed to GET since we're just displaying info
161
172
"full_path": str(request.url).split("?")[0],
162
-
"description": "Chat endpoint that uses Groq's LLaMa model to answer investment questions.",
173
+
"description": "Chat endpoint that uses Groq's LLaMa model to answer investment questions. For actual queries, use POST with a JSON body containing a 'query' field.",
163
174
"parameters": [
164
-
{"name": "query", "type": "string", "description": "The investment question to ask"},
165
175
{"name": "format", "type": "string", "description": "Response format (html or json)"}
166
176
],
167
-
"example_query": "What are good tech stocks to invest in?",
0 commit comments