Spaces:
Configuration error
Configuration error
Commit
·
e83334a
1
Parent(s):
7791360
Clear Nodes React Agent Notebook to only showcase Langfuse
Browse files- nodes_react_agent_test.ipynb +0 -80
nodes_react_agent_test.ipynb
CHANGED
|
@@ -1,85 +1,5 @@
|
|
| 1 |
{
|
| 2 |
"cells": [
|
| 3 |
-
{
|
| 4 |
-
"cell_type": "code",
|
| 5 |
-
"execution_count": null,
|
| 6 |
-
"id": "c446bcd1",
|
| 7 |
-
"metadata": {},
|
| 8 |
-
"outputs": [
|
| 9 |
-
{
|
| 10 |
-
"name": "stdout",
|
| 11 |
-
"output_type": "stream",
|
| 12 |
-
"text": [
|
| 13 |
-
"Initializing ReActAgent...\n",
|
| 14 |
-
"ReActAgent initialized with Google - gemini-2.5-pro.\n",
|
| 15 |
-
"================================\u001b[1m Human Message \u001b[0m=================================\n",
|
| 16 |
-
"\n",
|
| 17 |
-
"The attached Excel file contains the sales of menu items for a local fast-food chain. What were the total sales that the chain made from food (not including drinks)? Express your answer in USD with two decimal places.\n",
|
| 18 |
-
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
|
| 19 |
-
"Tool Calls:\n",
|
| 20 |
-
" read_file_content (4da7a0ba-f9f5-471f-abd7-6993c9084eb5)\n",
|
| 21 |
-
" Call ID: 4da7a0ba-f9f5-471f-abd7-6993c9084eb5\n",
|
| 22 |
-
" Args:\n",
|
| 23 |
-
" file_name: 7bd855d8-463d-4ed5-93ca-5fe35145f733.xlsx\n",
|
| 24 |
-
"=================================\u001b[1m Tool Message \u001b[0m=================================\n",
|
| 25 |
-
"Name: read_file_content\n",
|
| 26 |
-
"\n",
|
| 27 |
-
" Location Burgers Hot Dogs Salads Fries Ice Cream Soda\n",
|
| 28 |
-
" Pinebrook 1594 1999 2002 2005 1977 1980\n",
|
| 29 |
-
" Wharvton 1983 2008 2014 2015 2017 2018\n",
|
| 30 |
-
" Sagrada 2019 2022 2022 2023 2021 2019\n",
|
| 31 |
-
" Algrimand 1958 1971 1982 1989 1998 2009\n",
|
| 32 |
-
" Marztep 2015 2016 2018 2019 2021 2022\n",
|
| 33 |
-
"San Cecelia 2011 2010 2012 2013 2015 2016\n",
|
| 34 |
-
" Pimento 2017 1999 2001 2003 1969 2967\n",
|
| 35 |
-
" Tinseles 1967 1969 1982 1994 2005 2006\n",
|
| 36 |
-
" Rosdale 2007 2009 2021 1989 2005 2011\n",
|
| 37 |
-
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
|
| 38 |
-
"Tool Calls:\n",
|
| 39 |
-
" sum_excel_cols (222f4931-da00-47e3-9f2c-3a84247c1ca4)\n",
|
| 40 |
-
" Call ID: 222f4931-da00-47e3-9f2c-3a84247c1ca4\n",
|
| 41 |
-
" Args:\n",
|
| 42 |
-
" file_name: 7bd855d8-463d-4ed5-93ca-5fe35145f733.xlsx\n",
|
| 43 |
-
" column_names: ['Burgers', 'Hot Dogs', 'Salads', 'Fries', 'Ice Cream']\n",
|
| 44 |
-
"=================================\u001b[1m Tool Message \u001b[0m=================================\n",
|
| 45 |
-
"Name: sum_excel_cols\n",
|
| 46 |
-
"\n",
|
| 47 |
-
"89706\n",
|
| 48 |
-
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
|
| 49 |
-
"\n",
|
| 50 |
-
"FINAL ANSWER: 89706.00\n"
|
| 51 |
-
]
|
| 52 |
-
}
|
| 53 |
-
],
|
| 54 |
-
"source": [
|
| 55 |
-
"from nodes_react_agent import NodesReActAgent\n",
|
| 56 |
-
"\n",
|
| 57 |
-
"agent = NodesReActAgent()\n",
|
| 58 |
-
"\n",
|
| 59 |
-
"response = agent(\"The attached Excel file contains the sales of menu items for a local fast-food chain. What were the total sales that the chain made from food (not including drinks)? Express your answer in USD with two decimal places.\", \"7bd855d8-463d-4ed5-93ca-5fe35145f733.xlsx\")"
|
| 60 |
-
]
|
| 61 |
-
},
|
| 62 |
-
{
|
| 63 |
-
"cell_type": "code",
|
| 64 |
-
"execution_count": 9,
|
| 65 |
-
"id": "a8855a9f",
|
| 66 |
-
"metadata": {},
|
| 67 |
-
"outputs": [
|
| 68 |
-
{
|
| 69 |
-
"data": {
|
| 70 |
-
"text/plain": [
|
| 71 |
-
"'89706.00'"
|
| 72 |
-
]
|
| 73 |
-
},
|
| 74 |
-
"execution_count": 9,
|
| 75 |
-
"metadata": {},
|
| 76 |
-
"output_type": "execute_result"
|
| 77 |
-
}
|
| 78 |
-
],
|
| 79 |
-
"source": [
|
| 80 |
-
"response"
|
| 81 |
-
]
|
| 82 |
-
},
|
| 83 |
{
|
| 84 |
"cell_type": "code",
|
| 85 |
"execution_count": null,
|
|
|
|
| 1 |
{
|
| 2 |
"cells": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
"execution_count": null,
|