文心一言AI大模型,前端接入
一、参考接口资料
模型广场:http://console.bce.baidu.com/qianfan/modelcenter/model/buildIn/list
我的应用:http://console.bce.baidu.com/qianfan/ais/console/onlineService
千帆大模型调用API介绍:
http://cloud.baidu.com/doc/WENXINWORKSHOP/s/flfmc9do2
在线调试:
http://console.bce.baidu.com/ticket/?#/ticket/tools/api
http://console.bce.baidu.com/tools/#/api?product=AI&project=%E5%8D%83%E5%B8%86%E5%A4%A7%E6%A8%A1%E5%9E%8B%E5%B9%B3%E5%8F%B0&parent=%E9%89%B4%E6%9D%83%E8%AE%A4%E8%AF%81%E6%9C%BA%E5%88%B6&api=oauth%2F2.0%2Ftoken&method=post
二、vue代码:
{{ http://blog.csdn.net/hkduan/article/details/message.text }}
<!-- <span v-html="http://blog.csdn.net/hkduan/article/details/message.text.replace(/
/g, '
')"> -->
发送
发送
{{ http://blog.csdn.net/hkduan/article/details/message.text }}
<!-- <span v-html="http://blog.csdn.net/hkduan/article/details/message.text.replace(/
/g, '
')"> -->
发送
发送
{{ http://blog.csdn.net/hkduan/article/details/message.text }}
<!-- <span v-html="http://blog.csdn.net/hkduan/article/details/message.text.replace(/
/g, '
')"> -->
<!--
11发送
-->
发送
发送
.el-tabs__header{
margin-left: 40px !important;
}
.kefubox{
overflow-y:auto;
width:95%;
margin: auto;
height:calc(100vh - 246px);
}
.box {
height: 500px;
}
.bot-txt{
padding-left: 16px;
margin:30px 0;
}
.iptbox {
width: 80vw;
display: flex;
bottom: 5px;
padding-left: 42px;
margin:auto;
/* justify-content: center; */
align-items: center;
position: fixed;
}
.input{
width:calc(90% -200px);
}
.iptbox input {
width: 490px;
height: 40px;
padding-left: 5px;
padding-right: 70px;
border-radius: 10px;
}
.iptbox button {
margin-left: 20px;
}
.bot-message,
.user-message {
display: flex;
align-items: center;
}
.bot-message {
background-color: #ebeef5;
color: #000000;
border-radius: 10px;
}
.user-message {
background-color: #d5eaff;
color: #000000;
padding: 5px 10px;
border-radius: 10px;
}
.userBox {
margin-right: 10px;
display: flex;
align-items: center;
}
pre.hljs {
background-color: #f4f4f4;
padding: 10px;
}
pre.hljs code {
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 14px;
}