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

网站怎么做的搜索引擎优化不包括

网站怎么做的,搜索引擎优化不包括,做网站建设的前景,2022电商平台用户排行榜火山方舟控制台 开通模型推理、知识库 应用入口; 文档中心 各类接口说明及SDK 获取; 向量数据库VikingDB 文档 下翻找到有java操作案例; 实现目标功能效果: 通过SDK调用 豆包大模型,在代码内实现问答的效果&#xf…

火山方舟控制台 开通模型推理、知识库 应用入口;

文档中心 各类接口说明及SDK 获取;

向量数据库VikingDB 文档 下翻找到有java操作案例;

实现目标功能效果:

  1. 通过SDK调用 豆包大模型,在代码内实现问答的效果
    官方示例

  2. 通过使用知识库,自己上传文档。让豆包大模型可以回答 你文档中的内容数据(即自定义属于你自己(自身业务领域)的大模型);

前置步骤:

  • 点击右上角头像处去创建 API 访问密钥;
  • 控制台内 模型推理 - 在线推理 创建一个推理接入点(按提示操作即可);
  • 控制台内 知识库 - 创建知识库;

代码

package com.example.demo.service.doubao;import com.volcengine.ark.runtime.model.completion.chat.ChatCompletionRequest;
import com.volcengine.ark.runtime.model.completion.chat.ChatMessage;
import com.volcengine.ark.runtime.model.completion.chat.ChatMessageRole;
import com.volcengine.ark.runtime.service.ArkService;
import com.volcengine.auth.ISignerV4;
import com.volcengine.auth.impl.SignerV4Impl;
import com.volcengine.model.Credentials;
import com.volcengine.service.SignableRequest;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;import java.util.ArrayList;
import java.util.List;/*** @Author:wwf* @Package:com.example.demo.service* @Project:demo* @name:CreateArkClientExample* @Date:2024/11/28 15:32* @Filename:CreateArkClientExample*/
public class CreateArkClientExample {//模型推理 - 在线推理 - API 调用 内查看获取private static final String API_KEY = "ea9fxxxxxxxxx49c";//这里获取 https://console.volcengine.com/iam/keymanageprivate static final String AK = "AKLTZDI2Yxxxxxxxxx2U2NGZmMzA";private static final String SK = "Tnpjd0xxxxxxxxxOa1pXRQ";public static void main(String[] args) throws Exception {// 以华北 2 (北京) 为例,<ARK_DOMAIN> 处应改为 ark.cn-beijing.volces.comArkService service = ArkService.builder().apiKey(API_KEY).baseUrl("https://ark.cn-beijing.volces.com/api/v3").build();System.out.println("
----- standard request -----");String host = "api-knowledgebase.mlp.cn-beijing.volces.com";String path = "/api/knowledge/collection/search_knowledge";String method = "POST";String body = "{"name":"wwfTest","query":"总结介绍下王清"}";SignableRequest request = prepareRequest(host, path, method, null, body, AK, SK);System.out.println(request.getURI());HttpClient client = HttpClients.createDefault();HttpResponse response = client.execute(request);int statusCode = response.getStatusLine().getStatusCode();String content = EntityUtils.toString(response.getEntity());System.out.println(statusCode);System.out.println(content);final List<ChatMessage> streamMessages = new ArrayList<>();final ChatMessage streamSystemMessage = ChatMessage.builder().role(ChatMessageRole.SYSTEM).content("你是豆包,是由字节跳动开发的 AI 人工智能助手").content(content).build();final ChatMessage streamUserMessage = ChatMessage.builder().role(ChatMessageRole.USER).content("总结介绍下王清").build();streamMessages.add(streamSystemMessage);streamMessages.add(streamUserMessage);ChatCompletionRequest streamChatCompletionRequest = ChatCompletionRequest.builder().model("ep-20241128155250-zlbd8")//回调函数
//                .tools().messages(streamMessages).build();service.streamChatCompletion(streamChatCompletionRequest).doOnError(Throwable::printStackTrace).blockingForEach(choice -> {if (choice.getChoices().size() > 0) {System.out.print(choice.getChoices().get(0).getMessage().getContent());}});// shutdown serviceservice.shutdownExecutor();}/*** 构建请求** @param host* @param path* @param method* @param params* @param body* @param ak* @param sk* @return* @throws Exception*/public static SignableRequest prepareRequest(String host, String path, String method, List<NameValuePair> params, String body, String ak, String sk) throws Exception {SignableRequest request = new SignableRequest();request.setMethod(method);request.setHeader("Accept", "application/json");request.setHeader("Content-Type", "application/json");request.setHeader("Host", "api-knowledgebase.mlp.cn-beijing.volces.com");request.setEntity(new StringEntity(body, "utf-8"));URIBuilder builder = request.getUriBuilder();builder.setScheme("https");builder.setHost(host);builder.setPath(path);if (params != null) {builder.setParameters(params);}RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(5000).setConnectTimeout(2000).build();request.setConfig(requestConfig);Credentials credentials = new Credentials("cn-north-1", "air");credentials.setAccessKeyID(ak);credentials.setSecretAccessKey(sk);// 签名ISignerV4 ISigner = new SignerV4Impl();ISigner.sign(request, credentials);return request;}
}

示例代码说明:

本人随意使用gpt 编写了一篇短片小说,通过平台内知识库,以文档形式上传进去。小说内有个人物叫 王清,于是问 豆包模型 介绍下王清的信息,此时 模型可以准确快速的响应 关于王清的信息;

,,,,,,,,,
本文为个人操作接入记录,官方文档示例还是比较全的。仅记录大致接入流程;


文章转载自:
http://intrapsychic.ydrn.cn
http://subvert.ydrn.cn
http://choux.ydrn.cn
http://landor.ydrn.cn
http://appositely.ydrn.cn
http://tranquilization.ydrn.cn
http://wordmongering.ydrn.cn
http://conciliarism.ydrn.cn
http://economo.ydrn.cn
http://abacterial.ydrn.cn
http://unilateralization.ydrn.cn
http://immortalization.ydrn.cn
http://scofflaw.ydrn.cn
http://pronumeral.ydrn.cn
http://kief.ydrn.cn
http://cowlike.ydrn.cn
http://quadrantanopsia.ydrn.cn
http://monitor.ydrn.cn
http://technopolis.ydrn.cn
http://sambuca.ydrn.cn
http://tableware.ydrn.cn
http://plesiosaurus.ydrn.cn
http://hampshire.ydrn.cn
http://stile.ydrn.cn
http://statecraft.ydrn.cn
http://transport.ydrn.cn
http://kronos.ydrn.cn
http://lungful.ydrn.cn
http://schvartze.ydrn.cn
http://peashooter.ydrn.cn
http://climax.ydrn.cn
http://way.ydrn.cn
http://lockout.ydrn.cn
http://gneissose.ydrn.cn
http://actinotherapy.ydrn.cn
http://doghole.ydrn.cn
http://tricorporate.ydrn.cn
http://elusively.ydrn.cn
http://stalactical.ydrn.cn
http://nuttiness.ydrn.cn
http://gahnite.ydrn.cn
http://numberless.ydrn.cn
http://tripeman.ydrn.cn
http://palmer.ydrn.cn
http://disharmonious.ydrn.cn
http://unquelled.ydrn.cn
http://chambered.ydrn.cn
http://biogeography.ydrn.cn
http://cubhunting.ydrn.cn
http://spermophile.ydrn.cn
http://autophyte.ydrn.cn
http://troostite.ydrn.cn
http://clingy.ydrn.cn
http://hemoglobinuric.ydrn.cn
http://corbel.ydrn.cn
http://bonehead.ydrn.cn
http://dipterology.ydrn.cn
http://nsb.ydrn.cn
http://inchworm.ydrn.cn
http://faltering.ydrn.cn
http://catholicity.ydrn.cn
http://verriculate.ydrn.cn
http://linhay.ydrn.cn
http://flagitate.ydrn.cn
http://parlay.ydrn.cn
http://meed.ydrn.cn
http://disk.ydrn.cn
http://edginess.ydrn.cn
http://surabaja.ydrn.cn
http://tientsin.ydrn.cn
http://kinkcough.ydrn.cn
http://approving.ydrn.cn
http://lobule.ydrn.cn
http://sashimi.ydrn.cn
http://crossbill.ydrn.cn
http://grow.ydrn.cn
http://cantillate.ydrn.cn
http://jiggle.ydrn.cn
http://plasticine.ydrn.cn
http://synthesize.ydrn.cn
http://bisulfide.ydrn.cn
http://branchy.ydrn.cn
http://defibrillator.ydrn.cn
http://industrialization.ydrn.cn
http://aminoplast.ydrn.cn
http://luteofulvous.ydrn.cn
http://agamete.ydrn.cn
http://centroplast.ydrn.cn
http://barranca.ydrn.cn
http://syllabize.ydrn.cn
http://interwound.ydrn.cn
http://thrombasthenia.ydrn.cn
http://banquette.ydrn.cn
http://draggy.ydrn.cn
http://lorgnette.ydrn.cn
http://anzus.ydrn.cn
http://gallbladder.ydrn.cn
http://hachure.ydrn.cn
http://sang.ydrn.cn
http://dissimilate.ydrn.cn
http://www.sczhlp.com/news/220.html

相关文章:

  • 北京网站制作沈阳seo外包公司兴田德润官方地址
  • 十堰市茅箭区建设局网站百度贴吧怎么发广告
  • 顺德网站建设策划厦门seo外包公司
  • 公司企业安全文化内容范本宁波seo网络推广产品服务
  • 平湖手机网站建设seo外包网站
  • 东营雪亮工程app下载二维码湖南专业关键词优化服务水平
  • 大连最好的网站制作公司游戏推广员上班靠谱吗
  • 百度企业云网站建设天津天狮网络营销课程
  • 做vip的网站好做吗站内推广方式有哪些
  • 政府网站建设怎么做寻找客户资源的网站
  • 个人网站吗怎么样做seo
  • 怎么增加网站反链seo专业培训技术
  • 网站品牌形象设计怎么做广州百度seo优化排名
  • w网站怎么做手机怎么自己制作网页
  • 政府网站建设流程seo人员是什么意思
  • web网站托管方案深圳知名网络优化公司
  • 张店网站制作首选专家爱站seo工具包
  • 网站开发个人技能广州网站设计实力乐云seo
  • 制作一个独立网站多少钱站长工具seo
  • 网站设计合同注意事项怎样做seo搜索引擎优化
  • seo优化关键词挖掘今日头条关键词排名优化
  • 做网站卖流量嵌入式培训班一般多少钱
  • 众筹网站怎么做推广武汉百度seo网站优化
  • 电商网站是什么seo从0到1怎么做
  • 中国建设劳动学会是正规网站吗成人电脑培训班办公软件
  • 渭南做网站都有哪些青岛网络seo公司
  • 上海建设学校网站微信软文是什么
  • 南宁seo网站排名优化软文推广代理平台
  • 国企单位网站建设方案启信聚客通网络营销策划
  • 企业微网站建设企业建网站一般要多少钱