|
1025 | 1025 | "runnable = graph.compile()"
|
1026 | 1026 | ]
|
1027 | 1027 | },
|
| 1028 | + { |
| 1029 | + "cell_type": "markdown", |
| 1030 | + "metadata": {}, |
| 1031 | + "source": [ |
| 1032 | + "To view the graph we can generate a mermaid graph like so:" |
| 1033 | + ] |
| 1034 | + }, |
1028 | 1035 | {
|
1029 | 1036 | "cell_type": "code",
|
1030 | 1037 | "execution_count": 25,
|
|
1063 | 1070 | ")"
|
1064 | 1071 | ]
|
1065 | 1072 | },
|
| 1073 | + { |
| 1074 | + "cell_type": "markdown", |
| 1075 | + "metadata": {}, |
| 1076 | + "source": [ |
| 1077 | + "## Testing the Agent" |
| 1078 | + ] |
| 1079 | + }, |
| 1080 | + { |
| 1081 | + "cell_type": "markdown", |
| 1082 | + "metadata": {}, |
| 1083 | + "source": [ |
| 1084 | + "Our agent has now been constructed so we can test it. First, let's check for the best pizza in Rome:" |
| 1085 | + ] |
| 1086 | + }, |
1066 | 1087 | {
|
1067 | 1088 | "cell_type": "code",
|
1068 | 1089 | "execution_count": 26,
|
|
1091 | 1112 | "})"
|
1092 | 1113 | ]
|
1093 | 1114 | },
|
| 1115 | + { |
| 1116 | + "cell_type": "markdown", |
| 1117 | + "metadata": {}, |
| 1118 | + "source": [ |
| 1119 | + "We extract the answer:" |
| 1120 | + ] |
| 1121 | + }, |
1094 | 1122 | {
|
1095 | 1123 | "cell_type": "code",
|
1096 | 1124 | "execution_count": 28,
|
|
1114 | 1142 | ]
|
1115 | 1143 | },
|
1116 | 1144 | {
|
1117 |
| - "cell_type": "code", |
1118 |
| - "execution_count": 29, |
| 1145 | + "cell_type": "markdown", |
1119 | 1146 | "metadata": {},
|
1120 |
| - "outputs": [ |
1121 |
| - { |
1122 |
| - "name": "stdout", |
1123 |
| - "output_type": "stream", |
1124 |
| - "text": [ |
1125 |
| - "run_oracle\n", |
1126 |
| - "router\n", |
1127 |
| - "run_tool | search.invoke(input={'query': 'gluten-free pizza in Rome'})\n", |
1128 |
| - "The food in Italy is just ridiculously good. I ate so much in Rome. Gluten free pizza.\n", |
1129 |
| - "Celiac Disease Videos\n", |
1130 |
| - "Italy: a gluten-free paradise?\n", |
1131 |
| - "run_oracle\n", |
1132 |
| - "router\n", |
1133 |
| - "run_tool | final_answer.invoke(input={'answer': 'Unfortunately, I was unable to find a specific recommendation for gluten-free pizza in Rome from the search results. However, based on the comments and reviews provided, it seems that Italy is generally considered a good destination for gluten-free options, especially when it comes to traditional Italian cuisine like pizza. The restaurant \"Pizza in Trevi\" mentioned in one of the reviews was described as a \"marvelous restaurant\" with a gluten-free option available, but it was noted that prices were on the higher side at around 30-40€ per person per meal.', 'phone_number': '', 'address': ''})\n" |
1134 |
| - ] |
1135 |
| - } |
1136 |
| - ], |
1137 | 1147 | "source": [
|
1138 |
| - "out = runnable.invoke({\n", |
1139 |
| - " \"input\": \"where is the best gluten free pizza in rome?\",\n", |
1140 |
| - " \"chat_history\": [],\n", |
1141 |
| - "})" |
| 1148 | + "We are recommended [Seu Pizza Illuminati](https://maps.app.goo.gl/RMSdTUpH8D3oQETUA), a seemingly notorious pizzeria known for their less traditional and more experimental Neapolitan pizzas." |
1142 | 1149 | ]
|
1143 | 1150 | },
|
1144 | 1151 | {
|
|
0 commit comments