Skip to Content
移动端AI与ML应用开发:基于iOS和Android
book

移动端AI与ML应用开发:基于iOS和Android

by Laurence Moroney
January 2023
Intermediate to advanced
288 pages
6h 6m
Chinese
China Machine Press
Content preview from 移动端AI与ML应用开发:基于iOS和Android
86
|
5
5.3
智能回复对话
你可以使用的完整模型的另一个示例是智能回复模型。有了这个,你可以给模型一个对
话的内容,它可以弄清楚可能是什么回复。你可能已经在许多网站和应用程序上看到过
它的使用,如果你想知道如何实现它,这个 API 将为你提供一个良好的开端。
你可以在图 5-4 中看到它的运行情况。
5-4
:使用智能回复
在这里,我模拟了自己与一位朋友的谈话,我们正在谈论早餐。她问我一个问题:“只
是咖啡,你想吃些什么吗?”当我按下“生成回复”GENERATE REPLY)按钮时,推荐
的答案是“当然,听起来不错”。它并没有真正回答问题,但这是一个足够体面的回复,
因为它捕捉了我的对话
当被问及我是否想见面时,我的回答是“当然,你喜欢什
么?”所以现在生成的短语也以 “当然” 这个词开头。
让我们看看这个应用程序是如何构建的。
5.3.1
创建应用程序
和以前一样,使用单个活动创建一个新应用程序。如果你不熟悉这些步骤,请返回第
3 章。
完成后,你可以通过将以下内容添加到 build.gradle 文件来包含智能回复库:
正文.indd 86正文.indd 86 2023-4-30 9:08:282023-4-30 9:08:28
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

人工智能驱动的商业智能

人工智能驱动的商业智能

Tobias Zwingmann
Lua游戏AI开发指南

Lua游戏AI开发指南

Posts & Telecom Press, David Young
人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar

Publisher Resources

ISBN: 9787111713081