1
00:00:00,120 --> 00:00:00,520
Wow.
哇。

2
00:00:00,640 --> 00:00:02,160
You've come back for week two.
你已经回来第二周了。

3
00:00:02,320 --> 00:00:04,000
Listen, you're not gonna regret it.
听着，你不会后悔的。

4
00:00:04,040 --> 00:00:07,280
I have such a fabulous week lined up for you.
我为你准备了美好的一周。

5
00:00:07,280 --> 00:00:09,120
And it starts today with.
从今天开始。

6
00:00:09,120 --> 00:00:09,320
With.
和。

7
00:00:09,360 --> 00:00:11,600
We've got such a huge lab today.
今天我们有一个如此巨大的实验室。

8
00:00:11,640 --> 00:00:13,960
Such a gigantic lab.
这么大的实验室。

9
00:00:14,200 --> 00:00:15,760
First of all, what can you already do?
首先，你已经可以做什么？

10
00:00:15,800 --> 00:00:18,960
You've had your introduction to Transformers with tokens context.
您已经通过令牌上下文介绍了 Transformer。

11
00:00:18,960 --> 00:00:22,920
Windows API costs the memory illusion and so on.
Windows API 会消耗内存错觉等等。

12
00:00:22,960 --> 00:00:29,600
You can contrast the leading frontier models and you can confidently use OpenAI's API including streaming
您可以对比领先的前沿模型，并且可以自信地使用 OpenAI 的 API，包括流式处理

13
00:00:29,600 --> 00:00:30,920
markdown JSON.
降价 JSON。

14
00:00:31,200 --> 00:00:32,720
Okay, today.
好吧，今天。

15
00:00:32,920 --> 00:00:35,640
Today is big API day.
今天是 API 日。

16
00:00:35,680 --> 00:00:37,880
Today we are going to cover so many APIs.
今天我们将介绍很多 API。

17
00:00:37,920 --> 00:00:40,000
You're going to have had enough of APIs.
您已经受够了 API。

18
00:00:40,040 --> 00:00:42,720
We're going to connect to many different frontier models.
我们将连接到许多不同的前沿模型。

19
00:00:42,720 --> 00:00:45,600
We're going to use routers and abstraction layers.
我们将使用路由器和抽象层。

20
00:00:45,600 --> 00:00:49,680
And we're also going to write some code that interacts between different frontier models.
我们还将编写一些在不同前沿模型之间交互的代码。

21
00:00:49,680 --> 00:00:51,920
We're going to have them talk to each other, not just to us.
我们会让他们互相交谈，而不仅仅是我们。

22
00:00:51,960 --> 00:00:52,640
All right.
好的。

23
00:00:52,680 --> 00:00:53,840
So much to get done.
有这么多事情要做。

24
00:00:53,880 --> 00:00:57,840
But let me quickly remind you of the journey we started on the left.
但让我快速提醒您我们从左侧开始的旅程。

25
00:00:57,840 --> 00:00:58,920
You were there.
你当时就在那里。

26
00:00:59,120 --> 00:01:03,980
We covered the The foundations the chat completions API last week.
上周我们介绍了聊天完成 API 的基础。

27
00:01:04,020 --> 00:01:05,820
This week it's about frontier models.
本周的主题是前沿模型。

28
00:01:05,820 --> 00:01:12,020
With APIs, we're going to build UIs with the amazing Gradio and we're going to build multi-modal stuff.
借助 API，我们将使用令人惊叹的 Gradio 构建 UI，并且我们将构建多模式内容。

29
00:01:12,220 --> 00:01:17,900
And then next week open source with Hugging Face the week after picking the right LLM.
然后下周在选择合适的法学硕士后一周与 Hugging Face 开源。

30
00:01:17,940 --> 00:01:20,220
That crucial topic the week after that.
在那之后的一周，这个至关重要的话题。

31
00:01:20,220 --> 00:01:23,460
It's all rag rag rag rag on week five.
第五周一切都是破烂破破烂烂。

32
00:01:23,780 --> 00:01:24,580
But don't jump there.
但不要跳到那里。

33
00:01:24,580 --> 00:01:25,820
This week is so great.
这周真是太棒了。

34
00:01:25,820 --> 00:01:29,820
Week six is about fine tuning a frontier model and traditional data science.
第六周是关于微调前沿模型和传统数据科学。

35
00:01:29,860 --> 00:01:37,140
Week seven is about fine tuning an open source model with shocking results and week eight finale Agentic
第七周是关于微调开源模型，其结果令人震惊，第八周的结局是 Agentic

36
00:01:37,140 --> 00:01:37,460
AI.
人工智能。

37
00:01:37,660 --> 00:01:39,900
That is everything I have in store for you.
这就是我为你准备的一切。

38
00:01:39,900 --> 00:01:42,300
But but trust me, you don't want to miss this week.
但是相信我，你不想错过本周。

39
00:01:42,300 --> 00:01:43,900
It's it's a really great one.
这真是太棒了。

40
00:01:43,900 --> 00:01:48,260
And at the end when you've got past week eight, you will of course be able to say you have mastered
最后，当你度过第八周时，你当然可以说你已经掌握了

41
00:01:48,300 --> 00:01:50,060
LLM engineering.
法学硕士工程。

42
00:01:50,420 --> 00:01:56,820
Now, what we're going to do today is a lot more calling to lots more frontier models.
现在，我们今天要做的就是更多地调用更多前沿模型。

43
00:01:56,820 --> 00:01:59,860
And that's going to involve setting up more keys.
这将涉及设置更多密钥。

44
00:01:59,860 --> 00:02:03,010
And I'm here to tell you that this is optional.
我在这里告诉你这是可选的。

45
00:02:03,450 --> 00:02:05,810
If you've already set up the OpenAI key, that's great.
如果您已经设置了 OpenAI 密钥，那就太好了。

46
00:02:05,810 --> 00:02:06,890
We'll use some of that.
我们将使用其中的一些。

47
00:02:06,890 --> 00:02:09,890
If you haven't, you can just use Olama for everything.
如果还没有，您可以使用 Olama 来完成所有操作。

48
00:02:09,930 --> 00:02:13,450
There's also something called Open Router that I will mention that you can use that will allow you to
还有一个叫做“开放路由器”的东西，我会提到你可以使用它来

49
00:02:13,450 --> 00:02:15,410
do everything, but should you wish to.
做一切事情，但如果你愿意的话。

50
00:02:15,570 --> 00:02:19,250
Another couple of keys Anthropic and Google.
另外几个键 Anthropic 和 Google。

51
00:02:19,290 --> 00:02:22,330
The Google one I do believe is free in many situations.
我相信谷歌在很多情况下都是免费的。

52
00:02:22,330 --> 00:02:26,010
So you may find that when you go to Google, I'll give you the link you'll be able to set one up for
因此，您可能会发现，当您访问 Google 时，我会给您一个链接，您可以为其设置一个链接

53
00:02:26,010 --> 00:02:26,450
free.
自由的。

54
00:02:26,650 --> 00:02:28,650
And Tropic does have a cost.
Tropic 确实有成本。

55
00:02:28,690 --> 00:02:30,490
Now I personally love anthropic.
现在我个人很喜欢人类。

56
00:02:30,530 --> 00:02:32,890
I would always recommend if you if you can afford it.
如果你能负担得起的话，我总是会推荐你。

57
00:02:32,890 --> 00:02:36,450
If you've got the budget to spend that $5, it will be money well spent.
如果您有足够的预算花这 5 美元，那么这笔钱花得值。

58
00:02:36,450 --> 00:02:40,210
You'll get great use out of Claude, but only do it if you're comfortable with that.
你会从克劳德那里得到很大的利用，但只有当你对此感到满意时才这样做。

59
00:02:40,210 --> 00:02:45,290
But once you have updated your you've gone to the website that I will give you a link to.
但是，一旦您更新了您的内容，您就可以访问我将为您提供链接的网站。

60
00:02:45,330 --> 00:02:48,650
You've set up your account, you'll get an API key.
您已设置帐户，您将获得 API 密钥。

61
00:02:48,690 --> 00:02:52,490
You will then need to update your EMV file with that API key.
然后，您需要使用该 API 密钥更新您的 EMV 文件。

62
00:02:52,530 --> 00:02:58,090
You'll need to save it in the EMV file and make sure that it's saved for everything to work, but that
您需要将其保存在 EMV 文件中，并确保保存后一切才能正常工作，但是

63
00:02:58,090 --> 00:03:00,390
that's all the slides I've got for, you.
这就是我为你准备的所有幻灯片。

64
00:03:00,430 --> 00:03:02,590
No, no more slides.
不，不再有幻灯片了。

65
00:03:02,590 --> 00:03:04,310
The rest of this session.
本次会议的剩余时间。

66
00:03:04,310 --> 00:03:05,190
The rest of week two.
第二周剩下的时间。

67
00:03:05,230 --> 00:03:07,190
Day one is all lab.
第一天都是实验室。

68
00:03:07,190 --> 00:03:08,910
And wow, is it a big lab.
哇，这是一个大实验室吗？

69
00:03:08,990 --> 00:03:10,070
Let's go there now.
我们现在就去那里吧。

70
00:03:10,230 --> 00:03:15,870
Okay, so here I am in Cursa and I'm going now to week two.
好的，我现在在库萨，现在要进入第二周了。

71
00:03:16,190 --> 00:03:16,950
Week two.
第二周。

72
00:03:17,150 --> 00:03:19,110
And I'm going to day one.
我要去第一天。

73
00:03:19,150 --> 00:03:21,590
The day one lab in week two.
第二周的第一天实验室。

74
00:03:21,910 --> 00:03:22,790
Here we are.
我们到了。

75
00:03:23,190 --> 00:03:27,950
So I start with an important note that I am always updating these labs.
因此，我首先要强调的是，我一直在更新这些实验室。

76
00:03:27,950 --> 00:03:29,830
I'm constantly refining them.
我不断地完善它们。

77
00:03:29,830 --> 00:03:34,630
So at the start of the week, it's always worth checking at this point that you've got the latest code.
因此，在本周开始时，总是值得检查一下您是否拥有最新的代码。

78
00:03:34,630 --> 00:03:40,230
And you'll find in the git instructions and the git guide, there are steps for how you make sure you've
您会在 git 说明和 git 指南中找到如何确保您已完成的步骤

79
00:03:40,230 --> 00:03:41,550
updated the latest code.
更新了最新的代码。

80
00:03:41,550 --> 00:03:45,510
If you've made changes to these labs, you might want to merge your changes with my latest.
如果您对这些实验室进行了更改，您可能希望将您的更改与我的最新更改合并。

81
00:03:45,750 --> 00:03:46,470
And.
和。

82
00:03:46,510 --> 00:03:47,750
But you should do that.
但你应该这样做。

83
00:03:47,790 --> 00:03:52,590
Now, the wonderful thing about UV is that because we're using UV, it will automatically then update
现在，UV 的美妙之处在于，因为我们使用的是 UV，所以它会自动更新

84
00:03:52,590 --> 00:03:53,990
any packages that you need.
您需要的任何软件包。

85
00:03:54,030 --> 00:03:57,710
You don't need to rebuild an environment or anything like that, which is great.
您不需要重建环境或类似的东西，这很棒。

86
00:03:58,070 --> 00:04:00,260
But but you do need to pull the code.
但是你确实需要提取代码。

87
00:04:00,260 --> 00:04:01,220
So to check that out.
所以要检查一下。

88
00:04:01,260 --> 00:04:02,740
Check out these instructions.
查看这些说明。

89
00:04:02,740 --> 00:04:07,300
And then one more reminder about the resources page that you can link to, which has other things like
然后再提醒您可以链接到的资源页面，其中还有其他内容，例如

90
00:04:07,300 --> 00:04:08,020
the slides for the.
的幻灯片。

91
00:04:08,020 --> 00:04:11,940
Of course, not that we had any slides today because we're getting straight to the lab.
当然，我们今天并不是有任何幻灯片，因为我们要直接进入实验室。

92
00:04:12,180 --> 00:04:12,980
All right.
好的。

93
00:04:12,980 --> 00:04:14,460
Let's go on with week two.
让我们继续第二周。

94
00:04:14,500 --> 00:04:15,620
Day one lab.
第一天实验室。

95
00:04:15,620 --> 00:04:22,500
So today is all about using APIs to connect to many models just like we used the user interfaces, the
所以今天的主题是使用 API 连接到许多模型，就像我们使用用户界面一样

96
00:04:22,500 --> 00:04:23,660
products last week.
上周的产品。

97
00:04:23,860 --> 00:04:26,020
So we're going to be going through the APIs.
因此，我们将详细介绍 API。

98
00:04:26,260 --> 00:04:29,820
And you shouldn't feel like you need to to connect to these APIs.
而且您不应该觉得需要连接到这些 API。

99
00:04:30,180 --> 00:04:34,140
I'm going to do it through lots of them so that you can live vicariously through me.
我将通过他们中的很多人来做到这一点，这样你就可以通过我来代替生活。

100
00:04:34,420 --> 00:04:37,820
You can enjoy what I do, but should you wish to, then you can as well.
你可以享受我所做的事情，但如果你愿意，那么你也可以。

101
00:04:38,060 --> 00:04:40,220
So here are the links if you wish to.
如果您愿意，这里是链接。

102
00:04:40,260 --> 00:04:43,140
You've already gone to OpenAI to set that up before that.
在此之前您已经访问 OpenAI 进行了设置。

103
00:04:43,140 --> 00:04:50,340
Here is the links for anthropic for Claude, Google for Gemini deep seq, AI for deep seq grok with
以下是 Claude 的 anthropic、Gemini deep seq 的 Google、deep seq grok 的 AI 的链接

104
00:04:50,340 --> 00:04:51,020
a Q.
一个问。

105
00:04:51,220 --> 00:04:55,780
And I will explain the difference in a minute between grok with a q and grok with a k.
我将在一分钟内解释带有 q 的 grok 和带有 k 的 grok 之间的区别。

106
00:04:56,140 --> 00:04:56,740
Um.
一。

107
00:04:57,060 --> 00:05:02,120
Also, should you wish, there is another alternative to going to all of these websites.
另外，如果您愿意，除了访问所有这些网站之外，还有另一种选择。

108
00:05:02,120 --> 00:05:05,520
There is a platform called Open Router and Open Router.
有一个平台叫做Open Router和Open Router。

109
00:05:05,520 --> 00:05:10,360
Is this really cool way that you can you can have one account with open router AI.
这是一种非常酷的方式，您可以拥有一个具有开放路由器 AI 的帐户。

110
00:05:10,600 --> 00:05:16,760
And when you specify the model, you can choose any of these models and from any of these providers.
当您指定模型时，您可以选择任何这些模型并从任何这些提供程序中选择。

111
00:05:16,760 --> 00:05:20,280
And that gives you like one account, one amount to pay up front.
这样您就可以拥有一个帐户，只需预付一笔金额。

112
00:05:20,280 --> 00:05:21,720
And you can access all of them.
您可以访问所有这些。

113
00:05:21,880 --> 00:05:25,480
And what I'm going to do is I'm going to go through and connect to each of these.
我要做的就是仔细研究并连接到其中的每一个。

114
00:05:25,480 --> 00:05:27,880
But I'm also then going to show you Open router.
但接下来我还将向您展示开放路由器。

115
00:05:27,880 --> 00:05:31,440
So if you wish you can you can choose just to go with Open Router.
因此，如果您愿意，您可以选择使用开放路由器。

116
00:05:31,480 --> 00:05:36,000
Hang on in there and come back and try out all the different models via open router.
坚持住，然后回来通过开放路由器尝试所有不同的模型。

117
00:05:36,000 --> 00:05:38,920
But we'll do it all today okay.
但我们今天会把这一切都做好。

118
00:05:39,400 --> 00:05:45,000
So when you've gone to each of these sites, you would go to their billing page to add the minimum top
因此，当您访问这些网站中的每一个时，您将转到他们的计费页面以添加最低顶部

119
00:05:45,040 --> 00:05:45,240
up.
向上。

120
00:05:45,240 --> 00:05:48,080
So OpenAI's $5 at least as of now.
所以 OpenAI 目前至少是 5 美元。

121
00:05:48,280 --> 00:05:49,880
Anthropic also $5.
人为也5美元。

122
00:05:50,160 --> 00:05:52,280
Google I believe has a free tier.
我相信谷歌有免费套餐。

123
00:05:52,440 --> 00:05:54,600
Deep seq I believe is $2 up front.
我认为 Deep seq 的预付费用是 2 美元。

124
00:05:54,600 --> 00:05:59,620
They need grok, I think also has a free tier and grok with a k, I don't know.
他们需要 grok，我想也有一个免费套餐，而 grok 带有 k，我不知道。

125
00:05:59,660 --> 00:06:00,660
They they change a lot.
他们改变了很多。

126
00:06:00,700 --> 00:06:01,820
They might have a free tier as well.
他们也可能有免费套餐。

127
00:06:01,820 --> 00:06:02,980
I'm pretty sure they do, actually.
事实上，我很确定他们确实这么做了。

128
00:06:03,340 --> 00:06:04,020
All right.
好的。

129
00:06:04,060 --> 00:06:09,140
So once you have done that, you then go to the API key page for all of these.
因此，一旦完成此操作，您就可以转到 API 密钥页面来获取所有这些内容。

130
00:06:09,180 --> 00:06:12,780
And you collect your API key the same as with open AI.
您可以像开放 AI 一样收集 API 密钥。

131
00:06:12,820 --> 00:06:17,940
You have to make sure that you give it all the right access, and then you have to put it in your dot
您必须确保授予它所有正确的访问权限，然后您必须将其放入您的点中

132
00:06:17,980 --> 00:06:19,140
EMV file.
EMV 文件。

133
00:06:19,260 --> 00:06:20,140
You know the drill.
你知道该怎么做。

134
00:06:20,140 --> 00:06:21,980
Now you put this in here.
现在你把它放在这里。

135
00:06:22,180 --> 00:06:24,140
Any one of these keys, you can choose none of them.
这些键中的任何一个，您都不能选择。

136
00:06:24,140 --> 00:06:29,300
If you don't wish any one of these keys, um, put them in the env file.
如果您不希望使用这些密钥中的任何一个，嗯，请将它们放入 env 文件中。

137
00:06:29,300 --> 00:06:31,060
You need to spell it right.
你需要拼写正确。

138
00:06:31,060 --> 00:06:32,700
Any typo and it's not going to work.
任何拼写错误都不会起作用。

139
00:06:32,700 --> 00:06:34,380
Then you need to save the file.
然后您需要保存文件。

140
00:06:34,420 --> 00:06:36,220
Make sure the white blob goes away.
确保白色斑点消失。

141
00:06:36,380 --> 00:06:40,220
Uh, but the one with the stop sign is fine, as I explained last week.
呃，但是有停车标志的就可以，正如我上周解释的那样。

142
00:06:40,420 --> 00:06:46,780
And, uh, then make sure any time you change it, you save it and you have to rerun, load underscore
并且，呃，然后确保每次更改它时，保存它并且必须重新运行，加载下划线

143
00:06:47,180 --> 00:06:47,740
EMV.
电磁势。

144
00:06:47,980 --> 00:06:49,780
And that is what we will do right now.
这就是我们现在要做的。

145
00:06:49,780 --> 00:06:52,700
So I will, uh, I will run that cell.
所以我会，呃，我会运行那个单元。

146
00:06:53,020 --> 00:06:56,140
Um, it's telling me that we don't need this here, so I'll take that out.
嗯，它告诉我我们这里不需要这个，所以我会把它拿出来。

147
00:06:57,140 --> 00:06:58,460
Uh, run that cell.
呃，运行那个单元格。

148
00:06:58,460 --> 00:07:01,730
And now this is where I load in all of my API keys.
现在这是我加载所有 API 密钥的地方。

149
00:07:01,730 --> 00:07:04,170
And then I just check them that they all look good.
然后我只是检查它们看起来都不错。

150
00:07:04,210 --> 00:07:06,250
And you can see that I have a lot of API keys.
你可以看到我有很多 API 密钥。

151
00:07:06,290 --> 00:07:07,290
I've signed up for all these things.
我已经报名参加了所有这些事情。

152
00:07:07,290 --> 00:07:08,010
I'm a sucker.
我是个傻瓜。

153
00:07:08,050 --> 00:07:08,890
You don't need to.
你不需要。

154
00:07:08,930 --> 00:07:09,490
As you wish.
如你所愿。

155
00:07:09,490 --> 00:07:10,450
You can watch me.
你可以关注我。

156
00:07:10,610 --> 00:07:17,850
I've got OpenAI, anthropic, Google, uh, deep seq grok with a Q, grok with a K and open router.
我有 OpenAI、anthropic、Google、呃、带有 Q 的 Deep seq grok、带有 K 的 grok 和开放路由器。

157
00:07:18,290 --> 00:07:19,010
All right.
好的。

158
00:07:19,050 --> 00:07:22,410
Now, of course, you remember OpenAI equals OpenAI.
现在，当然，您还记得 OpenAI 等于 OpenAI。

159
00:07:22,450 --> 00:07:29,210
This is a way of us creating the lightweight Python client library so that we can connect to their endpoint.
这是我们创建轻量级 Python 客户端库的一种方法，以便我们可以连接到它们的端点。

160
00:07:29,370 --> 00:07:36,410
And what you also remember, I'm sure, is that there is this nice little trick that we can use to connect
我相信你还记得，我们可以用这个漂亮的小技巧来连接

161
00:07:36,410 --> 00:07:42,890
to any other model, any other provider, just reusing the same Python client library.
对于任何其他模型、任何其他提供商，只需重用相同的 Python 客户端库即可。

162
00:07:43,090 --> 00:07:48,770
Now, later, we will use a couple of the dedicated client libraries that Anthropic and Google Gemini
现在，稍后，我们将使用 Anthropic 和 Google Gemini 的几个专用客户端库

163
00:07:48,810 --> 00:07:51,250
both have their own libraries, but you don't need to.
两者都有自己的库，但您不需要。

164
00:07:51,290 --> 00:07:57,050
And honestly, it's becoming increasingly common in industry for people just to always use OpenAI's
老实说，人们总是使用 OpenAI 在行业中变得越来越普遍

165
00:07:57,090 --> 00:07:58,090
client library.
客户端库。

166
00:07:58,090 --> 00:07:59,510
But we'll do both today.
但今天我们将两者都做。

167
00:07:59,550 --> 00:07:59,950
All right.
好的。

168
00:07:59,950 --> 00:08:02,830
So I run that and I've just created all of these client libraries.
所以我运行它并且刚刚创建了所有这些客户端库。

169
00:08:02,830 --> 00:08:07,830
And I've also of course again done this trick where I've created one for llama as well.
当然，我也再次完成了这个技巧，我也为美洲驼创建了一个。

170
00:08:08,430 --> 00:08:09,310
All right.
好的。

171
00:08:09,310 --> 00:08:10,230
So far so good.
到目前为止，一切都很好。

172
00:08:10,270 --> 00:08:13,510
We've got lots of keys, lots of client libraries.
我们有很多密钥，很多客户端库。

173
00:08:13,550 --> 00:08:16,110
It's time for us to talk to lots of LMS.
现在是我们与许多 LMS 交谈的时候了。

174
00:08:16,430 --> 00:08:22,070
Okay, so first of all, I've got a message to send an LLM, and it's called Tell a joke.
好的，首先，我收到一条消息要发送法学硕士，它的名字叫“讲一个笑话”。

175
00:08:22,270 --> 00:08:24,710
And it is a list of dictionaries.
这是一个字典列表。

176
00:08:24,710 --> 00:08:29,390
Remember, they're always a list of dictionaries and it has just a user prompt.
请记住，它们始终是字典列表，并且只有用户提示。

177
00:08:29,390 --> 00:08:31,470
You don't actually need to have a system prompt.
您实际上不需要系统提示。

178
00:08:31,470 --> 00:08:35,550
And if all you're going to put in your system prompt is you're a helpful assistant, it doesn't really
如果您要在系统提示中输入的只是您是一个有用的助手，那实际上并没有什么意义

179
00:08:35,550 --> 00:08:36,230
make any difference.
有任何区别。

180
00:08:36,230 --> 00:08:37,350
You don't you don't need it at all.
你不知道，你根本不需要它。

181
00:08:37,350 --> 00:08:40,510
So we haven't got a system prompt, just a user prompt.
所以我们没有系统提示，只有用户提示。

182
00:08:40,710 --> 00:08:43,030
Tell a joke for a student.
给学生讲个笑话。

183
00:08:43,510 --> 00:08:49,750
Two A's for a student on the journey to becoming an expert in LLM engineering.
一名正在成为 LLM 工程专家的学生获得了两个 A。

184
00:08:50,190 --> 00:08:50,990
All right.
好的。

185
00:08:50,990 --> 00:08:57,830
So now we want to make that call to GPT 4.1 mini, one of my very favorite models to use quick and nice.
所以现在我们想要调用 GPT 4.1 mini，这是我最喜欢的模型之一，使用起来又快又好。

186
00:08:58,030 --> 00:08:59,180
And how do we do it again?
我们该如何再次做到这一点？

187
00:08:59,260 --> 00:09:07,980
We say response is open AI chat bot completions, create chat completions API.
我们说响应是开放AI聊天机器人完成，创建聊天完成API。

188
00:09:08,260 --> 00:09:11,820
The model we're going to use is GPT 4.1 mini.
我们要使用的模型是 GPT 4.1 mini。

189
00:09:13,380 --> 00:09:17,220
And the message is we'll finish it off is tell a joke.
传达的信息是我们会讲一个笑话来结束它。

190
00:09:17,260 --> 00:09:24,900
And with what comes back we'll say display markdown of response .0. message content.
对于返回的内容，我们会说显示响应 .0 的降价。消息内容。

191
00:09:25,060 --> 00:09:25,780
All right.
好的。

192
00:09:25,780 --> 00:09:29,740
Let's see what kind of joke GPT 4.1 mini can say.
看看GPT 4.1 mini能开什么玩笑。

193
00:09:29,780 --> 00:09:30,060
Sure.
当然。

194
00:09:30,060 --> 00:09:32,220
Here's a joke for an aspiring MLM engineer.
这是一个针对一位有抱负的传销工程师的笑话。

195
00:09:32,300 --> 00:09:35,820
Why did the engineer bring a ladder to the data center?
工程师为什么要带梯子到数据中心？

196
00:09:35,940 --> 00:09:39,900
Because they wanted to reach the next level of training.
因为他们想要达到下一个级别的训练。

197
00:09:40,220 --> 00:09:40,980
Boom, boom.
繁荣，繁荣。

198
00:09:41,300 --> 00:09:43,780
Uh, that feels like it's right.
呃，感觉好像是对的。

199
00:09:43,780 --> 00:09:48,700
It would have been funny if it weren't to data center, but something that where you'd have to get to
如果不是数据中心，而是你必须到达的地方，那会很有趣

200
00:09:48,700 --> 00:09:50,220
a next level of training.
下一个级别的培训。

201
00:09:50,220 --> 00:09:52,380
I feel like I feel like that's a miss.
我感觉我感觉那是一种怀念。

202
00:09:52,380 --> 00:09:53,420
That could have been funnier.
那可能会更有趣。

203
00:09:53,460 --> 00:09:54,420
It wasn't bad.
这还不错。

204
00:09:54,660 --> 00:09:57,900
All right, let's try Claude sonnet 4.5.
好吧，让我们试试克劳德十四行诗 4.5。

205
00:09:57,980 --> 00:10:03,200
The one that's just come out for me anyway, this is brand new and I should mention good point for me
无论如何，这是刚刚为我推出的，这是全新的，我应该为我提到优点

206
00:10:03,200 --> 00:10:03,800
to mention.
提一下。

207
00:10:03,960 --> 00:10:09,040
Uh, as as time goes on, I plan to keep this updated and I plan to slip in latest models.
呃，随着时间的推移，我计划不断更新，并计划加入最新型号。

208
00:10:09,040 --> 00:10:13,480
So the code that you see may have different model version numbers in here, which should give you even
因此，您看到的代码可能在这里有不同的模型版本号，这应该给您甚至

209
00:10:13,480 --> 00:10:17,280
more incentive to come in and run it because you might get something better than me.
更有动力进来经营它，因为你可能会得到比我更好的东西。

210
00:10:17,560 --> 00:10:22,520
So I'm calling anthropic, which is of course, just the other, this one right here.
所以我称之为人择，当然，这只是另一个，就是这里的这个。

211
00:10:22,520 --> 00:10:29,800
It's the other, uh, OpenAI that I've created with the anthropic URL and I'm calling it ChatGPT completions
这是我用人类 URL 创建的另一个，呃，OpenAI，我称之为 ChatGPT 补全

212
00:10:29,800 --> 00:10:30,360
dot create.
点创建。

213
00:10:30,360 --> 00:10:37,320
I'm passing in sonnet 4.5, the latest model, and it's a hybrid model, a reasoning and chat.
我传递的是十四行诗 4.5，最新的模型，它是一个混合模型，推理和聊天。

214
00:10:37,320 --> 00:10:40,040
So it's not nearly as fast as GPT four one.
所以它的速度远不如 GPT 4 1 快。

215
00:10:40,040 --> 00:10:43,000
It's obviously thrashing around this joke and it's a long one.
显然它是在绕这个笑话，而且这个笑话很长。

216
00:10:43,000 --> 00:10:43,520
Goodness.
善良。

217
00:10:43,880 --> 00:10:47,280
Junior engineer walks into a bar and asked the bartender, can you help me?
初级工程师走进一家酒吧，问调酒师，你能帮我吗？

218
00:10:47,280 --> 00:10:49,920
I've been trying to reduce my model's hallucinations.
我一直在努力减少模型的幻觉。

219
00:10:50,440 --> 00:10:53,920
The bartender replies, sure, that'll be $47 in API costs.
调酒师回答说，当然，API 成本为 47 美元。

220
00:10:53,960 --> 00:10:56,320
The engineer says, well, wait, I only asked one question.
工程师说，好吧，等等，我只问了一个问题。

221
00:10:56,360 --> 00:11:01,630
The bartender responds, I know, but you set temperature to 1.5 and your system prompt was 3000 tokens
调酒师回应，我知道，但是你将温度设置为 1.5，而你的系统提示是 3000 个代币

222
00:11:01,630 --> 00:11:01,870
of.
的。

223
00:11:01,910 --> 00:11:05,910
You're a helpful bartender assistant who provides detailed, comprehensive responses.
您是一位乐于助人的调酒师助理，可以提供详细、全面的答复。

224
00:11:06,470 --> 00:11:08,150
Uh, okay.
呃，好吧。

225
00:11:08,510 --> 00:11:11,590
Uh, I feel like it's more of a stand up routine.
呃，我觉得这更像是一个站立的例行公事。

226
00:11:11,630 --> 00:11:12,510
It's not bad.
这还不错。

227
00:11:12,510 --> 00:11:13,230
It's quite funny.
这很有趣。

228
00:11:13,230 --> 00:11:14,350
It's quite, quite witty.
真是非常非常机智啊。

229
00:11:14,550 --> 00:11:16,150
Uh, but, uh.
呃，但是，呃。

230
00:11:16,150 --> 00:11:18,950
Yeah, I haven't even explained to you about temperature yet, but I will do.
是的，我什至还没有向你解释温度，但我会的。

231
00:11:19,110 --> 00:11:21,470
Um, but, um, it's, uh.
嗯，但是，嗯，这是，呃。

232
00:11:21,510 --> 00:11:27,070
Yeah, it's it's kind of amusing, and it's obviously very apropos and very relevant, so it's clever,
是的，这有点有趣，而且显然非常恰当并且非常相关，所以它很聪明，

233
00:11:27,070 --> 00:11:27,710
for sure.
一定。

234
00:11:28,310 --> 00:11:29,430
Bonus wisdom.
奖励智慧。

235
00:11:29,430 --> 00:11:34,630
You know, you're becoming an expert when you stop asking, can we fine tune this and start asking,
你知道，当你停止提问时，你就成为了专家，我们可以对此进行微调并开始提问，

236
00:11:34,670 --> 00:11:36,230
should we fine tune this?
我们应该对此进行微调吗？

237
00:11:36,270 --> 00:11:36,590
Wow.
哇。

238
00:11:36,630 --> 00:11:38,670
That is is a pearl of wisdom.
那是一颗智慧的珍珠。

239
00:11:38,710 --> 00:11:39,270
Very good.
非常好。

240
00:11:39,270 --> 00:11:39,790
Claude.
克劳德.

241
00:11:39,950 --> 00:11:41,790
Um, usually the answer is no.
嗯，通常答案是否定的。

242
00:11:41,790 --> 00:11:45,390
Prompt engineering and Rag solves 80% of what people think needs fine tuning.
即时工程和 Rag 解决了人们认为需要微调的 80%。

243
00:11:45,390 --> 00:11:46,310
I couldn't agree more.
我完全同意。

244
00:11:46,550 --> 00:11:47,790
Uh, wow.
呃，哇。

245
00:11:48,110 --> 00:11:49,030
Uh, okay.
呃，好吧。

246
00:11:49,150 --> 00:11:51,830
Very nicely put and slightly controversial.
说得非常好，但略有争议。

247
00:11:51,990 --> 00:11:58,790
I might say context engineering rather than prompt engineering, but otherwise very nicely done by Claude.
我可能会说上下文工程而不是即时工程，但克劳德在其他方面做得非常好。
