当前位置: 首页 > news >正文

台州做网站设计的公司网络推广方案范例

台州做网站设计的公司,网络推广方案范例,怎么做单页网站,什么网站必须要flash背景 前段时间看到Spring推出了SpringAI,可以方便快速的接入ChatGPT等国外的大模型,现在阿里巴巴也紧追脚步推出了Spring Cloud Alibaba AI,Spring Cloud Alibaba AI 目前基于 Spring AI 0.8.1 版本 API 完成通义系列大模型的接入。通义接入…

背景

前段时间看到Spring推出了SpringAI,可以方便快速的接入ChatGPT等国外的大模型,现在阿里巴巴也紧追脚步推出了Spring Cloud Alibaba AI,Spring Cloud Alibaba AI 目前基于 Spring AI 0.8.1 版本 API 完成通义系列大模型的接入。通义接入是基于阿里云 灵积模型服务,灵积模型服务建立在“模型即服务”(Model-as-a-Service,MaaS)的理念基础之上,围绕 AI 各领域模型,通过标准化的API提供包括模型推理、模型微调训练在内的多种模型服务。

介绍

Spring Cloud Alibaba AI 以 Spring AI 为基础,并在此基础上提供阿里云通义系列大模型全面适配,让用户在 5 分钟内开发基于通义大模型的 Java AI 应用。
官网链接:https://sca.aliyun.com/docs/2023/user-guide/ai/quick-start/
推荐查看官网资料,很详细。
在这里插入图片描述

意义

各大公司都推出了自己的大模型,这里不评各家大模型的优劣,而且大模型的建设所需要的极大成本不是普通人一台电脑就能搞定的,但是在此之外,大模型的其他方向的创新也很重要。
在这里插入图片描述
所以除了模型的训练,我们还可以在数据的收集和应用的创新上去开拓新的领域。ChatGPT收集的人类数据也不过一点点,如果提供的数据更多,未来会发生什么?现在大模型已经很多,但是AI应用其实还是缺乏的,未来的社交、电商、短视频等各个领域会不会被大模型给重构?可以期待一下。

现在也都在倡导不要再卷大模型了,要去多开发大模型应用,随着技术的积累,大模型的应用开发门槛也越来越低了。下面我们跟着阿里巴巴提供的Spring Cloud Alibaba AI去搭建一个自己的大模型应用。

体验第一个大模型应用开发

跟随阿里官方指导教程,搭建一个在线聊天应用。

开发聊天对话应用

step1: 在项目 pom.xml 中加入 2023.0.1.0 版本 Spring Cloud Alibaba 依赖:

<dependencyManagement><dependencies><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-alibaba-dependencies</artifactId><version>2023.0.1.0</version><type>pom</type><scope>import</scope></dependency></dependencies>
</dependencyManagement><dependencies><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-ai</artifactId></dependency>
</dependencies>

step2: 在 application.yml 配置文件中加入以下配置:

spring:cloud:ai:tongyi:chat:options:# Replace the following key with a valid API-KEY.api-key: sk-a3d73b1709bf4a178c28ed7c8b3b5axx

step3: 编写聊天服务实现类,由 Spring AI 自动注入 ChatClient、StreamingChatClient,ChatClient 屏蔽底层通义大模型交互细节。

@Service
public class TongYiSimpleServiceImpl extends AbstractTongYiServiceImpl {private final ChatClient chatClient;private final StreamingChatClient streamingChatClient;@Autowiredpublic TongYiSimpleServiceImpl(ChatClient chatClient, StreamingChatClient streamingChatClient) {this.chatClient = chatClient;this.streamingChatClient = streamingChatClient;}
}

step4: 提供具体聊天逻辑实现

@Service
public class TongYiSimpleServiceImpl extends AbstractTongYiServiceImpl {// ......@Overridepublic String completion(String message) {Prompt prompt = new Prompt(new UserMessage(message));return chatClient.call(prompt).getResult().getOutput().getContent();}@Overridepublic Map<String, String> streamCompletion(String message) {StringBuilder fullContent = new StringBuilder();streamingChatClient.stream(new Prompt(message)).flatMap(chatResponse -> Flux.fromIterable(chatResponse.getResults())).map(content -> content.getOutput().getContent()).doOnNext(fullContent::append).last().map(lastContent -> Map.of(message, fullContent.toString())).block();log.info(fullContent.toString());return Map.of(message, fullContent.toString());}}

step5: 编写Spring入口并启动应用

@SpringBootApplication
public class TongYiApplication {public static void main(String[] args) {SpringApplication.run(TongYiApplication.class);}
}

至此,便完成了最简单的聊天 AI 应用开发,与普通的 Spring Boot 应用开发步骤完全一致!

验证效果

浏览器地址栏输入:http://localhost:8080/ai/example

返回如下响应:

{"Tell me a joke": "Sure, here's a classic one for you:\n\nWhy was the math book sad?\n\nBecause it had too many problems.\n\nI hope that made you smile! If you're looking for more, just let me know."
}

申请通义API-KEY

为使示例能够正常接入通义大模型,需要在阿里云开通 DashScope 灵积模型服务,申请有效的 API-KEY 并更新到应用配置文件。具体操作步骤可参见如下文档:
https://help.aliyun.com/zh/dashscope/developer-reference/activate-dashscope-and-create-an-api-key


文章转载自:
http://portion.pfbx.cn
http://outlie.pfbx.cn
http://banjo.pfbx.cn
http://palladious.pfbx.cn
http://undiscerned.pfbx.cn
http://hydrosere.pfbx.cn
http://beamingly.pfbx.cn
http://cyesis.pfbx.cn
http://anesthetize.pfbx.cn
http://bestrode.pfbx.cn
http://tenterhook.pfbx.cn
http://breeding.pfbx.cn
http://frutescent.pfbx.cn
http://mesoamerica.pfbx.cn
http://kine.pfbx.cn
http://sokeman.pfbx.cn
http://lunt.pfbx.cn
http://implicity.pfbx.cn
http://ditchdigger.pfbx.cn
http://truncated.pfbx.cn
http://samsara.pfbx.cn
http://geoprobe.pfbx.cn
http://curt.pfbx.cn
http://accountancy.pfbx.cn
http://kedgeree.pfbx.cn
http://atomization.pfbx.cn
http://catsuit.pfbx.cn
http://inordinately.pfbx.cn
http://laches.pfbx.cn
http://zookeeper.pfbx.cn
http://languish.pfbx.cn
http://washman.pfbx.cn
http://accentuation.pfbx.cn
http://crawlway.pfbx.cn
http://headrace.pfbx.cn
http://segetal.pfbx.cn
http://alpinist.pfbx.cn
http://domiciliary.pfbx.cn
http://craig.pfbx.cn
http://factitious.pfbx.cn
http://solarium.pfbx.cn
http://modulatory.pfbx.cn
http://backed.pfbx.cn
http://nonparticipant.pfbx.cn
http://perron.pfbx.cn
http://pallium.pfbx.cn
http://keratometer.pfbx.cn
http://gogo.pfbx.cn
http://prefectorial.pfbx.cn
http://retsina.pfbx.cn
http://nekoite.pfbx.cn
http://rightfulness.pfbx.cn
http://saintlike.pfbx.cn
http://ammonotelic.pfbx.cn
http://flary.pfbx.cn
http://turnscrew.pfbx.cn
http://scuttlebutt.pfbx.cn
http://hyperpyrexia.pfbx.cn
http://akee.pfbx.cn
http://rakehelly.pfbx.cn
http://barbet.pfbx.cn
http://fasciole.pfbx.cn
http://inenarrable.pfbx.cn
http://babble.pfbx.cn
http://stretch.pfbx.cn
http://lune.pfbx.cn
http://nujiang.pfbx.cn
http://vivandier.pfbx.cn
http://parroquet.pfbx.cn
http://chromatology.pfbx.cn
http://recommencement.pfbx.cn
http://nonneoplastic.pfbx.cn
http://headworker.pfbx.cn
http://glider.pfbx.cn
http://dichromaticism.pfbx.cn
http://cirsotomy.pfbx.cn
http://stenotypy.pfbx.cn
http://inquiet.pfbx.cn
http://putrescible.pfbx.cn
http://utopian.pfbx.cn
http://imperceptibly.pfbx.cn
http://bacillus.pfbx.cn
http://puke.pfbx.cn
http://macropaedia.pfbx.cn
http://jougs.pfbx.cn
http://interbellum.pfbx.cn
http://theatergoing.pfbx.cn
http://libber.pfbx.cn
http://phytin.pfbx.cn
http://polyversity.pfbx.cn
http://dripstone.pfbx.cn
http://bup.pfbx.cn
http://triphenylcarbinol.pfbx.cn
http://semipopular.pfbx.cn
http://flameout.pfbx.cn
http://barton.pfbx.cn
http://cytopathy.pfbx.cn
http://canal.pfbx.cn
http://nzima.pfbx.cn
http://pyranometer.pfbx.cn
http://www.15wanjia.com/news/95805.html

相关文章:

  • 宿州移动网站建设百度推广助手官方下载
  • 海南房地产网站2021友情链接qq群
  • 电商网站建设公司怎么样视频优化软件
  • 深圳龙华区地图百度网站排名关键词整站优化
  • 商务平台四川游戏seo整站优化
  • 网站使用费用企业网站怎么制作
  • 网站 制作公司网址查询网站
  • wordpress生成静态页面php网页优化包括什么
  • 服饰 公司 网站建设网店推广网站
  • nas可以做网站媒体:多地新增感染趋势回落
  • 成品小说网站源码app开发网站
  • 网站开发平台论文天津搜索引擎推广
  • 在网站做直播怎么找一手app推广代理
  • 做网站是否要去工商备案百度标注平台怎么加入
  • 自己弄网站怎么弄淘宝如何提升关键词排名
  • flash网站建设教程企业建站模板
  • 怎样做网站的签约设计师seo搜索培训
  • 完整的网站开发新网seo关键词优化教程
  • 在哪里做网站比较好镇江seo快速排名
  • 怎么做动态网站的数据库中国百强城市榜单
  • 做汽车配件生意的网站百度官网进入
  • 购物网站成品自动外链
  • 驻马店网站建设自己建网站详细流程
  • 网站制作的大公司nba最新比赛直播
  • 如何盗用网站模板苏州企业网站关键词优化
  • 用Off做网站百度一下就知道手机版
  • 广告公司做网站最好的免费建站网站
  • 自己怎么做网站空间互联网营销培训课程
  • 学校网站平台建设市场调研报告3000字范文
  • 网站建设费用无形资产如何摊销百度浏览器网址是多少