Skip to content

Commit dd2e6ee

Browse files
committed
chore(dojo): use create_react_agent in LangGraph backend_tool_rendering
Signed-off-by: Tyler Slaton <[email protected]>
1 parent 43a77c5 commit dd2e6ee

File tree

3 files changed

+26
-81
lines changed
  • typescript-sdk
    • apps/dojo/src
    • integrations/langgraph/examples/python/agents/backend_tool_rendering

3 files changed

+26
-81
lines changed

typescript-sdk/apps/dojo/src/app/[integrationId]/feature/backend_tool_rendering/page.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const Chat = () => {
3131
available: "disabled",
3232
parameters: [{ name: "location", type: "string", required: true }],
3333
render: ({ args, result, status }) => {
34+
console.log(result, args);
3435
if (status !== "complete") {
3536
return (
3637
<div className=" bg-[#667eea] text-white p-4 rounded-lg max-w-md">
@@ -40,11 +41,11 @@ const Chat = () => {
4041
}
4142

4243
const weatherResult: WeatherToolResult = {
43-
temperature: result.temperature || 0,
44-
conditions: result.conditions || "clear",
45-
humidity: result.humidity || 0,
46-
windSpeed: result.wind_speed || 0,
47-
feelsLike: result.feels_like || result.temperature || 0,
44+
temperature: result?.temperature || 0,
45+
conditions: result?.conditions || "clear",
46+
humidity: result?.humidity || 0,
47+
windSpeed: result?.wind_speed || 0,
48+
feelsLike: result?.feels_like || result?.temperature || 0,
4849
};
4950

5051
const themeColor = getThemeColor(weatherResult.conditions);

0 commit comments

Comments
 (0)