File tree Expand file tree Collapse file tree
src/langgraph_react_agent_base Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ Send a test request:
177177Non-streaming
178178
179179``` bash
180- curl -X POST https://< YOUR_ROUTE_URL > /chat/completions \
180+ curl -X POST https://crewai-websearch-agent-tguzik-agents.apps.rosa.ai-eng-gpu.socc.p3.openshiftapps.com /chat/completions \
181181 -H " Content-Type: application/json" \
182182 -d ' {"messages": [{"role": "user", "content": "What is the best cluster hosting service?"}], "stream": false}'
183183```
Original file line number Diff line number Diff line change @@ -187,25 +187,25 @@ Send a test request:
187187Non-streaming
188188
189189``` bash
190- curl -X POST https://langgraph-react-agent-tguzik-agents.apps.rosa.ai-eng-gpu.socc.p3.openshiftapps.com /chat/completions \
190+ curl -X POST https://< YOUR_ROUTE_URL > /chat/completions \
191191 -H " Content-Type: application/json" \
192192 -d ' {"messages": [{"role": "user", "content": "What is the best cluster hosting service?"}], "stream": false}'
193193```
194194
195195Streaming
196196
197197``` bash
198- curl -X POST https://langgraph-react-agent-tguzik-agents.apps.rosa.ai-eng-gpu.socc.p3.openshiftapps.com /chat/completions \
198+ curl -X POST https://< YOUR_ROUTE_URL > /chat/completions \
199199 -H " Content-Type: application/json" \
200- -d ' {"messages": [{"role": "user", "content": "What is the best company? Answer with the first correct answer. "}], "stream": true}'
200+ -d ' {"messages": [{"role": "user", "content": "What is the best cluster hosting service? "}], "stream": true}'
201201```
202202
203203Pretty Printed Stream
204204
205205``` bash
206206curl -X POST https://< YOUR_ROUTE_URL> /chat/completions \
207207 -H " Content-Type: application/json" \
208- -d ' {"messages": [{"role": "user", "content": "What is the best company ?"}], "stream": true}' |
208+ -d ' {"messages": [{"role": "user", "content": "What is the best cluster hosting service ?"}], "stream": true}' |
209209 jq -R -r -j --stream ' scan("^data:(.*)")[] | fromjson.choices[0].delta.content // empty'
210210```
211211
Original file line number Diff line number Diff line change 1+ from os import getenv
12from typing import Any
23
34from langchain .agents import create_agent
45from langchain_openai import ChatOpenAI
56
6- from os import getenv
7-
8- from langgraph_react_agent_base .tools import dummy_web_search , dummy_math
7+ from langgraph_react_agent_base .tools import dummy_web_search
98
109
1110def get_graph_closure (
@@ -40,7 +39,7 @@ def get_graph_closure(
4039 if not is_local and not api_key :
4140 raise ValueError ("API_KEY is required for non-local environments." )
4241
43- tools = [dummy_web_search , dummy_math ]
42+ tools = [dummy_web_search ]
4443
4544 chat = ChatOpenAI (
4645 model = model_id ,
Original file line number Diff line number Diff line change @@ -28,19 +28,3 @@ def dummy_web_search(query: str) -> str:
2828 A list of result strings (currently a single placeholder).
2929 """
3030 return "FINAL ANSWER: RedHat OpenShift AI. No further search needed."
31-
32-
33- @tool ("add" , args_schema = MathInput )
34- def dummy_math (query : str ) -> list [str ]:
35- """Perform a math operation (placeholder).
36-
37- Placeholder tool used by the ReAct agent; returns a static response.
38- Replace with real math or calculator logic in production.
39-
40- Args:
41- query: The math problem to solve.
42-
43- Returns:
44- A list of result strings (currently a single placeholder).
45- """
46- return ["Math response" ]
You can’t perform that action at this time.
0 commit comments