1
00:00:00,200 --> 00:00:01,880
And now for my next trick.
现在我的下一个技巧。

2
00:00:01,920 --> 00:00:03,200
And our last trick for today.
这是我们今天的最后一个技巧。

3
00:00:03,400 --> 00:00:07,120
I'm going to switch it to store it in SQL instead.
我将把它改为存储在 SQL 中。

4
00:00:07,160 --> 00:00:09,960
Our memory is going to be in a SQL database.
我们的内存将存储在 SQL 数据库中。

5
00:00:10,120 --> 00:00:11,920
And again this is impressive stuff.
这又是令人印象深刻的事情。

6
00:00:11,920 --> 00:00:17,000
It's great that it's so simple and easy to switch to using SQL.
切换到使用 SQL 是如此简单和容易，这真是太棒了。

7
00:00:17,440 --> 00:00:22,400
We just import uh, this SQL Lite saver instead.
我们只需导入这个 SQL Lite 保护程序即可。

8
00:00:22,640 --> 00:00:26,000
And uh we're going to write to a memory DB.
呃，我们将写入内存数据库。

9
00:00:26,040 --> 00:00:27,760
We connect that way.
我们就这样联系起来。

10
00:00:28,440 --> 00:00:32,200
Uh, we come in and it's just exactly the same code.
呃，我们进来了，代码完全一样。

11
00:00:32,200 --> 00:00:36,000
But we're of course putting in the SQL memory instead of the memory before.
但我们当然是放入 SQL 内存而不是之前的内存。

12
00:00:36,040 --> 00:00:41,120
I mean, it's just different name of a variable, but it's the exactly the same approach, uh, as we
我的意思是，这只是变量的名称不同，但它的方法完全相同，呃，就像我们一样

13
00:00:41,120 --> 00:00:41,880
had before.
以前有过。

14
00:00:42,040 --> 00:00:43,520
Nothing different there at all.
那里完全没有什么不同。

15
00:00:44,960 --> 00:00:45,640
There we go.
我们开始吧。

16
00:00:45,840 --> 00:00:51,000
I'm going to make the thread ID a different ID because since it's SQL, it's kind of remember from my,
我将把线程 ID 设置为不同的 ID，因为它是 SQL，所以它是我的记忆，

17
00:00:51,040 --> 00:00:52,160
my, my tests.
我的，我的测试。

18
00:00:52,440 --> 00:00:57,960
Uh, but uh, then we can come in and we can say hi there and see.
呃，但是呃，然后我们可以进来，我们可以在那里打个招呼，看看。

19
00:00:58,000 --> 00:00:59,280
How can I assist you today?
今天我能为您提供什么帮助？

20
00:00:59,400 --> 00:01:00,750
Uh, what's my name?
呃，我叫什么名字？

21
00:01:04,070 --> 00:01:05,630
And I don't have access.
而且我没有访问权限。

22
00:01:06,390 --> 00:01:08,190
Uh, my name is Ed.
呃，我叫艾德。

23
00:01:10,990 --> 00:01:11,950
Nice to meet you, Ed.
很高兴认识你，艾德。

24
00:01:11,990 --> 00:01:13,150
How can I assist you today?
今天我能为您提供什么帮助？

25
00:01:13,630 --> 00:01:22,590
All right, so with that, uh, we can now go back here, and this time, we can just recreate the whole
好吧，那么，呃，我们现在可以回到这里，这一次，我们可以重新创建整个

26
00:01:22,590 --> 00:01:23,870
thing from scratch.
事情从头开始。

27
00:01:23,910 --> 00:01:24,590
It's like I could.
好像我可以。

28
00:01:24,590 --> 00:01:26,470
I could restart my kernel.
我可以重新启动我的内核。

29
00:01:26,510 --> 00:01:28,070
I should restart my kernel.
我应该重新启动我的内核。

30
00:01:28,070 --> 00:01:28,990
Why don't I do that?
我为什么不这样做呢？

31
00:01:28,990 --> 00:01:29,910
You'll have to bear with me.
你得忍受我。

32
00:01:29,950 --> 00:01:31,110
We will clear.
我们会清除。

33
00:01:31,110 --> 00:01:33,790
We will restart kernel, clear all outputs.
我们将重新启动内核，清除所有输出。

34
00:01:33,790 --> 00:01:36,510
We'll go all the way back up to the top, run our imports.
我们将一路回到顶部，运行我们的导入。

35
00:01:38,510 --> 00:01:40,870
We will load the dot env.
我们将加载点环境。

36
00:01:41,230 --> 00:01:41,750
Just check.
检查一下。

37
00:01:41,790 --> 00:01:47,630
I guess I should load in the tools again because we're going to use these do this, do this.
我想我应该再次加载这些工具，因为我们将使用这些工具来做这个，做这个。

38
00:01:48,910 --> 00:01:52,790
Get the pushover message me.
给我发消息。

39
00:01:53,230 --> 00:01:54,350
My phone's on silent.
我的手机处于静音状态。

40
00:01:55,230 --> 00:01:56,430
Bring them together.
把他们聚集在一起。

41
00:01:56,910 --> 00:01:59,980
Get our state object because we reuse that at various points.
获取我们的状态对象，因为我们在不同的点重用它。

42
00:01:59,980 --> 00:02:05,100
And now from this point onwards, I think now we can now go back here.
现在从现在开始，我想我们现在可以回到这里了。

43
00:02:05,100 --> 00:02:06,980
So we're completely fresh.
所以我们完全新鲜。

44
00:02:07,420 --> 00:02:11,220
Uh, so now we're going to recreate this.
呃，现在我们要重新创建这个。

45
00:02:11,700 --> 00:02:14,020
We are going to rebuild our graph builder.
我们将重建我们的图表生成器。

46
00:02:14,020 --> 00:02:14,940
There it is.
就在那里。

47
00:02:15,220 --> 00:02:16,820
And here we go.
我们开始吧。

48
00:02:17,060 --> 00:02:18,220
And hi there.
你好。

49
00:02:20,020 --> 00:02:21,100
Hello again editor.
编辑您好。

50
00:02:21,140 --> 00:02:23,180
Ha there you have it.
哈，你有它。

51
00:02:23,180 --> 00:02:24,460
Restart the kernel.
重新启动内核。

52
00:02:24,700 --> 00:02:27,100
Uh, completely bring everything fresh.
呃，完全给一切带来新鲜感。

53
00:02:27,300 --> 00:02:29,820
And of course, it knows who I am.
当然，它知道我是谁。

54
00:02:29,860 --> 00:02:35,900
And it knows that because you can see right here in this directory, there's a bunch of database objects.
它知道，因为您可以在这个目录中看到，有一堆数据库对象。

55
00:02:35,900 --> 00:02:39,700
It's storing it in a SQLite database.
它将其存储在 SQLite 数据库中。

56
00:02:39,700 --> 00:02:46,220
And so we have persistent memory with changing like one word uh from, from my code.
所以我们有持久的记忆，就像我的代码中的一个词一样。

57
00:02:46,220 --> 00:02:48,460
And I think that is really impressive.
我认为这确实令人印象深刻。

58
00:02:48,500 --> 00:02:54,980
And I realized just before we, we closed this, I should also show that the tools are working and in
我意识到就在我们关闭这个之前，我还应该表明这些工具正在工作并且在

59
00:02:54,980 --> 00:02:55,380
action.
行动。

60
00:02:55,380 --> 00:02:58,740
So after saying this, I should let's do the same thing.
所以说完这句话后，我应该做同样的事情。

61
00:02:59,220 --> 00:02:59,380
Um.
一。

62
00:02:59,420 --> 00:03:11,300
Please send me a push notification with the current USD GBP exchange rates.
请向我发送包含当前美元英镑汇率的推送通知。

63
00:03:12,140 --> 00:03:13,620
Let's let it do its thing.
让我们让它做它该做的事。

64
00:03:18,060 --> 00:03:18,900
Off it goes.
关了就走了。

65
00:03:18,900 --> 00:03:24,300
And I just got a push notification and it says 0.78.
我刚刚收到一条推送通知，上面写着 0.78。

66
00:03:24,380 --> 00:03:25,100
Ha ha ha!
哈哈哈！

67
00:03:25,580 --> 00:03:26,300
There we go.
我们开始吧。

68
00:03:27,020 --> 00:03:27,740
So, uh.
所以，呃。

69
00:03:27,780 --> 00:03:28,540
Success.
成功。

70
00:03:28,780 --> 00:03:31,940
Uh, I think, um, maybe, uh.
呃，我想，嗯，也许，呃。

71
00:03:34,820 --> 00:03:35,420
Interesting.
有趣的。

72
00:03:35,940 --> 00:03:37,900
Uh, what what if I say I can?
呃，如果我说我可以呢？

73
00:03:37,940 --> 00:03:40,140
I'm trying to think about how we can use memory as well.
我也在尝试思考我们如何使用内存。

74
00:03:40,180 --> 00:03:41,260
Can you send that?
你能发送那个吗？

75
00:03:41,540 --> 00:03:47,660
Can you send that push notification again, please?
您能再次发送该推送通知吗？

76
00:03:48,740 --> 00:03:49,460
Let's try that.
让我们试试吧。

77
00:03:51,260 --> 00:03:51,820
There we go.
我们开始吧。

78
00:03:51,860 --> 00:03:54,300
I got another push notification with the same thing.
我又收到了同样内容的推送通知。

79
00:03:54,300 --> 00:03:55,020
So there, there.
那么那里，那里。

80
00:03:55,060 --> 00:03:56,340
I had to think for a moment.
我不得不思考一下。

81
00:03:56,340 --> 00:04:02,690
There's a demonstration of both memory and tool calling in one shot with the right answer.
演示了内存和工具一次调用正确答案的过程。

82
00:04:02,690 --> 00:04:03,490
Success.
成功。

83
00:04:03,850 --> 00:04:07,610
And you can see the various calls happening down there.
您可以看到下面发生的各种呼叫。

84
00:04:07,850 --> 00:04:10,370
So that then is a wrap on this.
那么这就是这个的总结。

85
00:04:10,570 --> 00:04:16,290
Um, and uh, it might be nice for us just to bring that up in Lang Smith just to see those calls.
嗯，呃，如果我们能在 Lang Smith 中提及这一点，看看这些电话，可能会很好。

86
00:04:16,290 --> 00:04:19,890
And so here we are in Lang Smith looking at that most recent request.
因此，我们在兰史密斯正在研究最近的请求。

87
00:04:19,890 --> 00:04:25,290
And it's good to see that, as I was hoping to see it did use the tool to send the push notification.
很高兴看到这一点，因为我希望看到它确实使用该工具发送推送通知。

88
00:04:25,290 --> 00:04:29,130
It didn't bother doing the search again because it had that in its memory.
它没有费心再次进行搜索，因为它已经在内存中了。

89
00:04:29,130 --> 00:04:34,690
And you can see at the bottom here that it sends that push notification, and it then confirms back
您可以在底部看到它发送推送通知，然后确认回来

90
00:04:34,690 --> 00:04:37,490
there that it did it as just as we saw in the chat.
就像我们在聊天中看到的那样。

91
00:04:37,490 --> 00:04:41,050
And you can see all of the history that it's got up above it.
你可以看到它上面的所有历史。

92
00:04:41,050 --> 00:04:45,490
So you can see in Lang Smith that true to its word, everything is working.
因此，您可以在朗史密斯身上看到，正如其所言，一切都在发挥作用。

93
00:04:45,490 --> 00:04:48,770
The memory is working, the tool call is working.
内存正在工作，工具调用正在工作。

94
00:04:48,970 --> 00:04:51,610
Uh, and it knew that it already knew the exchange rate.
呃，它知道它已经知道汇率了。

95
00:04:51,810 --> 00:04:54,010
Uh, so I'd say that that is a success.
呃，所以我想说这是成功的。

96
00:04:54,170 --> 00:05:00,440
And to wrap up, let me show you one more time this great picture, which now I hope is lands nicely
最后，让我再向您展示这张精彩的照片，我希望它能顺利落地

97
00:05:00,440 --> 00:05:01,080
with you.
与你。

98
00:05:01,120 --> 00:05:02,040
We define our graph.
我们定义我们的图表。

99
00:05:02,040 --> 00:05:07,720
We run each super step with each interaction, and these red lines are showing the checkpointing that's
我们在每次交互中运行每个超级步骤，这些红线显示了检查点

100
00:05:07,720 --> 00:05:10,800
happening so that we can resume at any point.
发生这样我们就可以随时恢复。

101
00:05:10,800 --> 00:05:13,320
We can replay the state as it was.
我们可以按原样重放该状态。

102
00:05:13,320 --> 00:05:20,040
Then we can time travel back, and we can persist this in a database so that it maintains knowledge
然后我们可以时间旅行回来，我们可以将其保存在数据库中，以便它维护知识

103
00:05:20,040 --> 00:05:20,800
of the conversation.
的谈话。

104
00:05:20,800 --> 00:05:22,880
And it's keyed off this thread ID.
并且它已关闭该线程 ID。

105
00:05:23,240 --> 00:05:26,560
And with that that concludes day three.
第三天就这样结束了。

106
00:05:26,600 --> 00:05:28,040
And it was a meaty day.
这真是多肉的一天。

107
00:05:28,040 --> 00:05:30,000
We covered a lot of ground.
我们涵盖了很多领域。

108
00:05:30,160 --> 00:05:34,520
And I hope that you're building some of the same enthusiasms that I'm that I'm growing.
我希望你也能像我一样，培养出一些同样的热情。

109
00:05:34,560 --> 00:05:35,880
As we get into this.
当我们进入这个话题时。

110
00:05:36,440 --> 00:05:43,240
For Landgraf, and seeing seeing the strengths, seeing how resilient, how robust it is, uh, and
对于 Landgraf 来说，看到它的优势，看到它有多么有弹性，有多么强大，呃，

111
00:05:43,240 --> 00:05:45,880
this, this discipline that it puts around the process.
这个，它围绕流程制定的纪律。

112
00:05:46,280 --> 00:05:49,840
But that's enough of the, of the, of the learning and the concepts.
但学习和概念就足够了。

113
00:05:49,880 --> 00:05:54,280
Next time we launch into our project, our project called sidekick.
下次我们启动我们的项目时，我们的项目称为 sidekick。

114
00:05:54,400 --> 00:05:55,640
And it's a really great one.
这真的很棒。

115
00:05:55,640 --> 00:05:56,920
I can't wait to show it to you.
我迫不及待地想向你展示它。

116
00:05:56,960 --> 00:05:57,760
See you then.
到时候见。
