|
85 | 85 | "\u001b[32;1m\u001b[1;3m I need to find out who Leonardo DiCaprio's girlfriend is and then calculate her age to the 0.43 power.\n",
|
86 | 86 | "Action: Search\n",
|
87 | 87 | "Action Input: \"Leonardo DiCaprio girlfriend\"\u001b[0m\n",
|
88 |
| - "Observation: \u001b[36;1m\u001b[1;3m[{'title': 'Leo in Paris with nine ex-girlfriends', 'link': 'https://www.news.com.au/entertainment/celebrity-life/celebrity-photos/leonardo-dicaprios-nine-exgirlfriends-at-paris-fashion-week/news-story/bd07623139cbc42f9ad683c72ab8609a', 'source': 'News.com.au', 'date': '3 days ago', 'thumbnail': 'https://serpapi.com/searches/652119a3b5961e6fd63885e9/images/7db95bf161919ea5f1437993aeba4501fe9fba0acebd51c0.jpeg'}, {'title': \"Leonardo DiCaprio in Paris at same time as 'new girlfriend and nine other exes'\", 'link': 'https://www.dailystar.co.uk/showbiz/us-showbiz/leonardo-dicaprio-paris-same-time-31105443', 'source': 'The Daily Star', 'date': '2 days ago', 'thumbnail': 'https://serpapi.com/searches/652119a3b5961e6fd63885e9/images/7db95bf161919ea5cc24078b67e8880b2a2065d86299c6fa.jpeg'}, {'title': 'Leonardo DiCaprio and new girlfriend Vittoria Ceretti grab dinner with friends in Paris', 'link': 'https://pagesix.com/2023/09/27/leonardo-dicaprio-girlfriend-vittoria-ceretti-grab-dinner-in-paris/', 'source': 'Page Six', 'date': '1 week ago', 'thumbnail': 'https://serpapi.com/searches/652119a3b5961e6fd63885e9/images/7db95bf161919ea541824bea9924d255b388ee4b94430297.jpeg'}, {'title': 'EXCLUSIVE: Leonardo DiCaprio, 48, settles down with Italian model girlfriend Vittoria Ceretti, 25, as pals cla', 'link': 'https://www.dailymail.co.uk/tvshowbiz/article-12491855/Leonardo-DiCaprio-settles-Italian-model-Vittoria-Ceretti-25-besotted-new-flame.html', 'source': 'Daily Mail', 'date': '1 month ago', 'thumbnail': 'https://serpapi.com/searches/652119a3b5961e6fd63885e9/images/7db95bf161919ea53904a654108da52820108789c1eba021.jpeg'}]\u001b[0m\n", |
89 |
| - "Thought:\u001b[32;1m\u001b[1;3m Leonardo DiCaprio's girlfriend is Vittoria Ceretti.\n", |
| 88 | + "Observation: \u001b[36;1m\u001b[1;3mVittoria Ceretti: 2023 According to sources, Leo and Vittoria reportedly met during the Killers of the Flower Moon premiere at the 2023 Cannes Film Festival. (The actor stars in the Martin Scorsese–directed film opposite Lily Gladstone.)\u001b[0m\n", |
| 89 | + "Thought:\u001b[32;1m\u001b[1;3m I need to calculate Vittoria's age to the 0.43 power.\n", |
90 | 90 | "Action: Calculator\n",
|
91 |
| - "Action Input: 25^0.43\u001b[0m\n", |
92 |
| - "Observation: \u001b[33;1m\u001b[1;3mAnswer: 3.991298452658078\u001b[0m\n", |
| 91 | + "Action Input: 2023^0.43\u001b[0m\n", |
| 92 | + "Observation: \u001b[33;1m\u001b[1;3mAnswer: 26.39843795372203\u001b[0m\n", |
93 | 93 | "Thought:\u001b[32;1m\u001b[1;3m I now know the final answer.\n",
|
94 |
| - "Final Answer: Vittoria Ceretti的年龄的0.43次方是3.991298452658078。\u001b[0m\n", |
| 94 | + "Final Answer: Vittoria Ceretti的年龄的0.43次方是26.39843795372203。\u001b[0m\n", |
95 | 95 | "\n",
|
96 | 96 | "\u001b[1m> Finished chain.\u001b[0m\n"
|
97 | 97 | ]
|
98 | 98 | },
|
99 | 99 | {
|
100 | 100 | "data": {
|
101 | 101 | "text/plain": [
|
102 |
| - "'Vittoria Ceretti的年龄的0.43次方是3.991298452658078。'" |
| 102 | + "'Vittoria Ceretti的年龄的0.43次方是26.39843795372203。'" |
103 | 103 | ]
|
104 | 104 | },
|
105 | 105 | "execution_count": 5,
|
|
132 | 132 | "\n",
|
133 | 133 | "\n",
|
134 | 134 | "\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
|
135 |
| - "\u001b[32;1m\u001b[1;3mThought: This question has two parts. First, I need to find out who Leonardo DiCaprio's girlfriend is. Then, I need to find out her age and calculate her age to the power of 0.43. I will start by searching for Leonardo DiCaprio's girlfriend. \n", |
| 135 | + "\u001b[32;1m\u001b[1;3mQuestion: 谁是莱昂纳多·迪卡普里奥的女朋友?\n", |
| 136 | + "Thought: 首先,我需要找出莱昂纳多·迪卡普里奥当前的女朋友是谁。这是一个关于当前事件的问题,所以我将使用搜索工具来找到答案。\n", |
136 | 137 | "Action:\n",
|
137 |
| - "```\n", |
138 |
| - "{\n", |
139 |
| - " \"action\": \"Search\",\n", |
140 |
| - " \"action_input\": \"Leonardo DiCaprio's girlfriend\"\n", |
141 |
| - "}\n", |
142 |
| - "```\u001b[0m\n", |
143 |
| - "Observation: \u001b[36;1m\u001b[1;3mBut after years of canoodling with various much younger beautiful women, Leonardo DiCaprio has finally settled down - at the age of 48. The Mail can reveal that the Hollywood actor has been dating Italian model Vittoria Ceretti for at least two months after they were seen kissing in an Ibiza nightclub this week.\u001b[0m\n", |
144 |
| - "Thought:\u001b[32;1m\u001b[1;3mLeonardo DiCaprio's girlfriend is Vittoria Ceretti. Now I need to find out her age. \n", |
145 |
| - "Action:\n", |
146 |
| - "```\n", |
| 138 | + "```json\n", |
147 | 139 | "{\n",
|
148 | 140 | " \"action\": \"Search\",\n",
|
149 |
| - " \"action_input\": \"Vittoria Ceretti age\"\n", |
| 141 | + " \"action_input\": \"莱昂纳多·迪卡普里奥 当前女朋友\"\n", |
150 | 142 | "}\n",
|
151 | 143 | "```\u001b[0m\n",
|
152 |
| - "Observation: \u001b[36;1m\u001b[1;3m25 years\u001b[0m\n", |
153 |
| - "Thought:\u001b[32;1m\u001b[1;3mVittoria Ceretti is 25 years old. Now I need to calculate 25 to the power of 0.43.\n", |
| 144 | + "Observation: \u001b[36;1m\u001b[1;3m['刚和25岁超模女友卡米拉分手的小李子莱昂纳多·迪卡普里奥,被曝22岁新女友“火速上线”。 这位被换女友如换衣服的小李子“临幸”的妙龄女子就是乌克兰超模玛莉 ...', '8月31日,据外媒报道,47岁的莱昂纳多·迪卡普里奥与刚满25岁不久的模特女友卡米拉·莫罗在今年刚刚入夏的时候,以“顺其自然”的方式分手,5年感情画上 ...', '49岁的莱昂纳多·迪卡普里奥和25岁女友Vittoria Ceretti及其女友的家人现身伦敦。ps:大胆的预测一下,小李子不会要结婚了吧? \\u200b', '新浪娱乐讯据媒体报道,48岁的奥斯卡影帝——莱昂纳多·迪卡普里奥(Leonardo DiCaprio)上周被拍到和23岁的女演员维多利亚·拉马斯(Victoria Lamas) ...', '莱昂纳多·迪卡普里奥(Leonardo DiCaprio) 和梅根·罗奇(Meghan Roche) 在看到豪华游艇后,否认“不,我们没有订婚”。', '8月31日,据外媒报道,“小李子”莱昂纳多·迪卡普里奥最近又双叒叕分手了,正式与辣妹模特卡米拉·莫罗尼结束近5年恋情。圈内有一种传闻,“小李子”的女友不会 ...', '现任女友是阿根廷模特和女演员卡米拉·莫朗(Camila Morrone),今年刚满22岁,她的年龄竟然与电影《泰坦尼克号》相同,她的男友小李在1997年凭借这部电影 ...', '演艺经历 1979年,5岁时,莱昂纳多·迪卡普里奥迎来了他的电视银幕处女秀,在教育片《游戏屋》中扮演一个角色。1988年,14岁时,他出现在他的第一部商业广告之中,那是为 ...', '莱昂纳多·迪卡普里奥再度分手,又一个没超过25岁的女友 ... 两人从2018年开始交往,至今已经交往了4年多。然而,今年5月被偷拍的狗仔队却发现两人关系出现 ...']\u001b[0m\n", |
| 145 | + "Thought:\u001b[32;1m\u001b[1;3m根据搜索结果,莱昂纳多·迪卡普里奥最近的女朋友是22岁的乌克兰超模玛莉。现在我需要计算22岁的0.43次方是多少。\n", |
| 146 | + "\n", |
154 | 147 | "Action:\n",
|
155 |
| - "```\n", |
| 148 | + "```json\n", |
156 | 149 | "{\n",
|
157 | 150 | " \"action\": \"Calculator\",\n",
|
158 |
| - " \"action_input\": \"25**0.43\"\n", |
| 151 | + " \"action_input\": {\n", |
| 152 | + " \"expression\": \"22^0.43\"\n", |
| 153 | + " }\n", |
159 | 154 | "}\n",
|
160 |
| - "```\u001b[0m\n", |
161 |
| - "Observation: \u001b[33;1m\u001b[1;3mAnswer: 3.991298452658078\u001b[0m\n", |
162 |
| - "Thought:\u001b[32;1m\u001b[1;3mThe age of Vittoria Ceretti to the power of 0.43 is approximately 3.99.\n", |
163 |
| - "Final Answer: 莱昂纳多·迪卡普里奥的女朋友是Vittoria Ceretti,她的年龄的0.43次方是3.99。\u001b[0m\n", |
| 155 | + "```\n", |
| 156 | + "\u001b[0m\n", |
| 157 | + "Observation: \u001b[33;1m\u001b[1;3mAnswer: 3.777824273683966\u001b[0m\n", |
| 158 | + "Thought:\u001b[32;1m\u001b[1;3mI now know the final answer to the original input question.\n", |
| 159 | + "\n", |
| 160 | + "Final Answer: 莱昂纳多·迪卡普里奥的女朋友是22岁的乌克兰超模玛莉,她现在年龄的0.43次方是大约3.78。\u001b[0m\n", |
164 | 161 | "\n",
|
165 | 162 | "\u001b[1m> Finished chain.\u001b[0m\n"
|
166 | 163 | ]
|
167 | 164 | },
|
168 | 165 | {
|
169 | 166 | "data": {
|
170 | 167 | "text/plain": [
|
171 |
| - "'莱昂纳多·迪卡普里奥的女朋友是Vittoria Ceretti,她的年龄的0.43次方是3.99。'" |
| 168 | + "'莱昂纳多·迪卡普里奥的女朋友是22岁的乌克兰超模玛莉,她现在年龄的0.43次方是大约3.78。'" |
172 | 169 | ]
|
173 | 170 | },
|
174 | 171 | "execution_count": 6,
|
|
179 | 176 | "source": [
|
180 | 177 | "from langchain.chat_models import ChatOpenAI\n",
|
181 | 178 | "\n",
|
182 |
| - "chat_model = ChatOpenAI(model=\"gpt-4\", temperature=0)\n", |
| 179 | + "chat_model = ChatOpenAI(model=\"gpt-4-1106-preview\", temperature=0)\n", |
183 | 180 | "agent = initialize_agent(tools, chat_model, agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION, verbose=True)\n",
|
184 | 181 | "agent.run(\"谁是莱昂纳多·迪卡普里奥的女朋友?她现在年龄的0.43次方是多少?\")"
|
185 | 182 | ]
|
|
0 commit comments