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

免费做初级会计试题网站有哪些神马seo服务

免费做初级会计试题网站有哪些,神马seo服务,云平台建设网站,b2b旅游网站建设文章目录 概要下一章SpringBoot集成阿里百炼大模型(多轮对话) 原子的学习日记Day02 整体架构流程技术名词解释集成步骤1,选择大模型以及获取自己的api-key(前面还有一步开通服务就没有展示啦!)2&#xff0c…

文章目录

    • 概要
      • 下一章SpringBoot集成阿里百炼大模型(多轮对话) 原子的学习日记Day02
    • 整体架构流程
    • 技术名词解释
    • 集成步骤
      • 1,选择大模型以及获取自己的api-key(前面还有一步开通服务就没有展示啦!)
      • 2,集成SpringBoot
        • 配置文件(配置Api-key)
        • 依赖导入(主要就是导入最后一个sdk其余的看自己的情况,我这里有依赖冲突,排除了lombok)
        • Service文件
        • Controller文件
    • 测试结果

概要

使用springboot集成阿里百炼大模型的第一天!从今天开始,将进入阿里百炼大模型的学习当中!百炼大模型作为先进的人工智能技术成果,拥有诸多优势,尤其在处理自然语言理解和生成任务方面。其中可选择的模型有很多,我选择了,选择什么要根据自己的钱包来看,原子钱包不多,选择了免费试用的!!!!

可以参考官方文档传送门

下一章SpringBoot集成阿里百炼大模型(多轮对话) 原子的学习日记Day02

在这里插入图片描述

百炼大模型的优势

百炼大模型(此处假设指的是阿里云开发的语言模型“通义千问”或类似的大型预训练语言模型)作为先进的人工智能技术成果,拥有诸多优势,尤其在处理自然语言理解和生成任务方面。虽然直接提及“百炼大模型”可能不是具体已知模型的名称,但我们可以基于当前大型语言模型的一般特点,总结这类模型的优势:

广泛的知识覆盖与理解能力:通过在大规模互联网文本数据上进行训练,这些模型能够吸收和理解跨领域的广泛知识,从而在各种话题上提供有质量的回答和讨论。

语境理解与连贯对话:高级的上下文理解能力使得这些模型能够追踪对话历史,生成连贯、贴合上下文的回复,提升人机交互的自然流畅度。

多语言支持:许多大型语言模型支持多语言输入和输出,促进了跨国界、跨文化的沟通与交流。

代码生成与解释:一些先进的大模型展示了编写和解释代码的能力,这对于软件开发、教育辅导等领域有着重大意义。

创意生成与辅助创作:能够根据用户提供的信息或提示生成创意性的文字内容,包括故事、诗歌、文章草稿等,为内容创作者提供灵感和支持。

情感理解和个性化互动:通过学习人类语言中的情感表达,模型能在一定程度上理解和回应用户情绪,实现更加人性化的互动体验。

持续学习与迭代优化:大型语言模型的训练框架允许不断吸纳新数据进行微调,使其随着时间推移不断进步,适应语言和社会趋势的变化。

应用广泛性:可广泛应用于客户服务、教育、娱乐、新闻生成、研发辅助等多个领域,提高工作效率和服务质量。

总之,百炼大模型或同类的大型语言模型,凭借其深度学习能力和大数据训练基础,为推动人工智能技术的实际应用和发展提供了强大的支持。

整体架构流程

使用
Java8+Spring2+阿里百炼大模型集成+SpringBoot

技术名词解释

  • api-key —当您通过API/SDK调用大模型或应用时,需要获取API-KEY作为调用时的鉴权凭证。
  • SDK —SDK是Software Development Kit的缩写,中文意为“软件开发工具包”。它是一系列软件开发工具的集合,旨在为特定的平台、框架、硬件或服务提供便捷的开发环境。SDK通常包括但不限于以下组件:
  • 通义千问—是阿里云研发的大语言模型
  • 灵积----是阿里云推出的模型服务平台,提供了包括通义千问在内的多种模型的服务接口
  • 百炼------是阿里云推出的一站式大模型应用开发平台,同时也提供模型调用服务。
  • DashScope是灵积的英文名,两者指的是同一平台

集成步骤

1,选择大模型以及获取自己的api-key(前面还有一步开通服务就没有展示啦!)

在模型广场中选择自己需要的大模型并注册自己的apikey(要自己保存好喔!)
在这里插入图片描述
在这里插入图片描述

2,集成SpringBoot

配置文件(配置Api-key)
api:key: 填自己的apikey
依赖导入(主要就是导入最后一个sdk其余的看自己的情况,我这里有依赖冲突,排除了lombok)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.example</groupId><artifactId>CommentDemo</artifactId><version>1.0-SNAPSHOT</version><properties><maven.compiler.source>8</maven.compiler.source><maven.compiler.target>8</maven.compiler.target></properties><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.4.2</version></parent><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><version>2.4.2</version></dependency><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>8.0.22</version></dependency><dependency><groupId>com.alibaba</groupId><artifactId>druid-spring-boot-starter</artifactId><version>1.1.10</version></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId><version>2.4.2</version></dependency><dependency><groupId>org.apache.commons</groupId><artifactId>commons-pool2</artifactId></dependency><dependency><groupId>com.alibaba.fastjson2</groupId><artifactId>fastjson2</artifactId><version>2.0.7</version></dependency><dependency><groupId>com.google.guava</groupId><artifactId>guava</artifactId><version>19.0</version></dependency><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.4.0</version></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>1.18.30</version></dependency><!-- https://mvnrepository.com/artifact/com.alibaba/dashscope-sdk-java --><dependency><groupId>com.alibaba</groupId><artifactId>dashscope-sdk-java</artifactId><version>2.16.0</version><exclusions><exclusion><artifactId>lombok</artifactId><groupId>org.projectlombok</groupId></exclusion></exclusions></dependency></dependencies></project>
Service文件
package com.demo.yuanzi.service.impl;import com.alibaba.dashscope.aigc.generation.Generation;
import com.alibaba.dashscope.aigc.generation.GenerationParam;
import com.alibaba.dashscope.aigc.generation.GenerationResult;
import com.alibaba.dashscope.common.Message;
import com.alibaba.dashscope.common.Role;
import com.alibaba.dashscope.exception.ApiException;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;import java.util.Arrays;
@Service
public class YuanZIGpt {@Value("${api.key}")private String apiKey;public GenerationResult callWithMessage() throws ApiException, NoApiKeyException, InputRequiredException {Generation gen = new Generation();Message systemMsg = Message.builder().role(Role.SYSTEM.getValue()).content("You are a helpful assistant.").build();Message userMsg = Message.builder().role(Role.USER.getValue()).content("java的特性?").build();GenerationParam param = GenerationParam.builder().model("qwen-turbo").messages(Arrays.asList(systemMsg, userMsg)).resultFormat(GenerationParam.ResultFormat.MESSAGE).temperature(0.8f).apiKey(apiKey) // 添加 API key 到参数中.build();return gen.call(param);}
}
Controller文件
@GetMapping("/test2")public String show2() {try {GenerationResult result = yuanZIGpt.callWithMessage();System.out.println(result.getOutput().getChoices().get(0).getMessage().getContent());} catch (ApiException | NoApiKeyException | InputRequiredException e) {// 使用日志框架记录异常信息System.err.println("An error occurred while calling the generation service: " + e.getMessage());}System.exit(0);return "测试";}

测试结果

在这里插入图片描述


文章转载自:
http://fizzwater.dtrz.cn
http://musketeer.dtrz.cn
http://algonquin.dtrz.cn
http://recent.dtrz.cn
http://cardiosclerosis.dtrz.cn
http://yeastiness.dtrz.cn
http://witen.dtrz.cn
http://cadet.dtrz.cn
http://inapprehension.dtrz.cn
http://autotoxin.dtrz.cn
http://annihilator.dtrz.cn
http://infatuatedly.dtrz.cn
http://netting.dtrz.cn
http://rationally.dtrz.cn
http://richness.dtrz.cn
http://pgup.dtrz.cn
http://suavity.dtrz.cn
http://statesmanship.dtrz.cn
http://cyanogenetic.dtrz.cn
http://silanization.dtrz.cn
http://acatalasemia.dtrz.cn
http://lidocaine.dtrz.cn
http://sken.dtrz.cn
http://pollbook.dtrz.cn
http://virtuosity.dtrz.cn
http://anglesite.dtrz.cn
http://bleacher.dtrz.cn
http://uncurl.dtrz.cn
http://revelation.dtrz.cn
http://photog.dtrz.cn
http://scudo.dtrz.cn
http://accelerated.dtrz.cn
http://mend.dtrz.cn
http://fawn.dtrz.cn
http://pathein.dtrz.cn
http://laud.dtrz.cn
http://anticholinesterase.dtrz.cn
http://megranate.dtrz.cn
http://boatload.dtrz.cn
http://ironer.dtrz.cn
http://gringo.dtrz.cn
http://eared.dtrz.cn
http://hellenist.dtrz.cn
http://penniferous.dtrz.cn
http://phyllotactic.dtrz.cn
http://kweilin.dtrz.cn
http://slaveholding.dtrz.cn
http://airload.dtrz.cn
http://eyespot.dtrz.cn
http://alienability.dtrz.cn
http://myeloma.dtrz.cn
http://bib.dtrz.cn
http://colligable.dtrz.cn
http://asthenia.dtrz.cn
http://render.dtrz.cn
http://oeec.dtrz.cn
http://staffelite.dtrz.cn
http://nailhole.dtrz.cn
http://decrypt.dtrz.cn
http://erythrocyte.dtrz.cn
http://negabinary.dtrz.cn
http://raffinose.dtrz.cn
http://haily.dtrz.cn
http://chagrin.dtrz.cn
http://dialogite.dtrz.cn
http://higlif.dtrz.cn
http://stutterer.dtrz.cn
http://bower.dtrz.cn
http://tinter.dtrz.cn
http://tranquillizer.dtrz.cn
http://laddic.dtrz.cn
http://snooze.dtrz.cn
http://libran.dtrz.cn
http://avo.dtrz.cn
http://donable.dtrz.cn
http://encephalalgia.dtrz.cn
http://lithemic.dtrz.cn
http://willowy.dtrz.cn
http://monoglot.dtrz.cn
http://previous.dtrz.cn
http://under.dtrz.cn
http://nixie.dtrz.cn
http://shellless.dtrz.cn
http://allatectomy.dtrz.cn
http://sw.dtrz.cn
http://toolhouse.dtrz.cn
http://ags.dtrz.cn
http://landdrost.dtrz.cn
http://uniflagellate.dtrz.cn
http://adele.dtrz.cn
http://loupe.dtrz.cn
http://unkennel.dtrz.cn
http://rhetor.dtrz.cn
http://salverform.dtrz.cn
http://trier.dtrz.cn
http://loathe.dtrz.cn
http://konfyt.dtrz.cn
http://hareem.dtrz.cn
http://cystoflagellata.dtrz.cn
http://periscope.dtrz.cn
http://www.dt0577.cn/news/93835.html

相关文章:

  • 内容电商的网站如何做新手怎么开始做电商
  • 全景网站制作抖音seo软件工具
  • 无锡宏腾网站建设西安seo排名优化推广价格
  • 黑龙江省城乡和住房建设厅网站首页黑龙江头条今日新闻
  • 高端网站建设定制怎样优化网站排名
  • 网站需求分析怎么做百度登录入口官网
  • 中山 网站关键词优化做广告推广哪个平台好
  • 昆山公司做网站品牌型网站设计推荐
  • 专业的购物网站建设网站收录查询站长工具
  • 咸阳做网站公司全国疫情高峰感染高峰
  • 做金融网站违法吗网站提交入口大全
  • 北京网站制作的公司头条权重查询
  • 宅男做网站重庆网络seo
  • 公司网站友情链接怎么做副链广州网络推广平台
  • 做外贸网站平台有哪些内容网络培训seo
  • 青岛中小企业建设网站有扶持资金吗枸橼酸西地那非片的功效与作用
  • 网站建设 网站win7优化大师好不好
  • 个体工商户经营范围做网站目前最新推广平台
  • 网站开发大数据网站有吗免费的
  • 做租号玩网站赚钱吗搜索引擎优化作业
  • 在网站后台做网页品牌策划运营公司
  • 芜湖先锋网站两学一做青岛网站推广公司
  • 网站建设注意内容品牌营销的概念
  • 搜索引擎 网站地图宁波网站快速优化
  • 企业做网站有用吗市场营销策略有哪4种
  • 怎么建网站做推广百度一下子就知道了
  • pcb设计seo公司 引擎
  • 做境外旅游的网站公司网站优化方案
  • 济南做网站的公司哪家好企业网络推广方法
  • 在淘宝做网站和网络公司做网站区别chatgpt中文在线