<!DOCTYPE html>
<html>
<head>
<title>AI对话</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link href="resources/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="resources/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script src="resources/marked.min.js" crossorigin="anonymous"></script>
<script src="resources/purify.min.js" crossorigin="anonymous"></script>
<script src="resources/jquery-3.7.1.min.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="chat.css">
</head>
<body data-bs-theme="dark">
<div class="container">
<div id="scroll-wrapper">
<div id="chat-container" class="card">
<div class="card-body">
<div id="chat-history"></div>
</div>
</div>
</div>
</div>
<div class="position-fixed w-100" style="z-index: 9999; top: 0px; height: 200px; background: linear-gradient(180deg, black, transparent);">
<div class="position-fixed w-100" style="z-index: 9999; top: 0px; height: 200px; background: linear-gradient(180deg, black, transparent);">
<div class="d-flex justify-content-between align-items-center m-0" style="padding: 16px;">
<h1>AI对话</h1>
<!-- Model dropdown -->
<div class="d-flex align-items-center m-1">
<div class="p-2 flex-grow-1 bd-highlight">
<label for="system-prompt" class="me-2" style="font-size: normal;">系统提示词</label>
<textarea id="system-prompt" class="form-control" type="text" placeholder="You are a helpful assistant" style="width: auto;height:100px;"></textarea>
<label for="host-address" class="me-2" style="font-size: normal;display:none;">主机地址</label>
<input id="host-address" class="form-control" type="text" placeholder="http://localhost:11434" style="width: auto;display:none;"></select>
</div>
<div class="d-flex align-items-center m-2">
<div class="p-2 flex-grow-1 bd-highlight">
<label for="model-select" class="me-2" style="font-size: normal;">模型:</label>
<select class="form-select me-5" id="model-select" style="width: auto;"></select>
<label for="chat-select" class="me-2" style="font-size: normal;">对话历史:</label>
<select id="chat-select" class="form-select me-2" style="width: auto;">
<option value="" disabled selected>请选择</option>
</select>
</div>
<div class="p-auto flex-grow-1 bd-highlight">
<div class="d-flex flex-column">
<button id="new-chat" class="btn btn-dark mb-2" type="button">重置</button>
<button id="save-chat" class="btn btn-secondary mb-2" type="button" data-bs-toggle="modal" data-bs-target="#nameModal">保存</button>
<button id="delete-chat" class="btn btn-danger" type="button">删除</button>
</div>
</div>
</div>
</div>
</div>
<div class="container p-2 card" id="input-area">
<div class="input-group">
<textarea class="form-control" id="user-input" placeholder="请输入你的问题..." oninput="autoGrow(this)"></textarea>
<button id="send-button" class="btn btn-primary">发送</button>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="nameModal" tabindex="-1" aria-labelledby="nameModalLabel" aria-hidden="true" >
<div class="modal-dialog" >
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="nameModalLabel">对话保存</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input type="text" class="form-control" id="userName" placeholder="对话名称">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="saveName">保存</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="errorModal" tabindex="-1">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">不能访问Ollama服务</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<p id="errorText"></p>
</div>
</div>
</div>
</div>
<script src="api.js"></script>
<script src="chat.js"></script>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
nginx-1.26.2.zip (53个子文件)
nginx-1.26.2
nginxService.xml 222B
nginxService.exe 352KB
temp
fastcgi_temp
uwsgi_temp
proxy_temp
client_body_temp
scgi_temp
docs
CHANGES 320KB
README 49B
LICENSE 1KB
OpenSSL.LICENSE 10KB
PCRE.LICENCE 3KB
CHANGES.ru 490KB
zlib.LICENSE 983B
nginx.exe 4.5MB
html
icon16.png 957B
resources
bootstrap.min.css 227KB
jquery-3.7.1.min.js 85KB
purify.min.js 20KB
bootstrap.bundle.min.js 79KB
marked.min.js 39KB
icon48.png 2KB
chat.js 12KB
api.js 3KB
https-test
mkkeys.sh 345B
Dockerfile 85B
run.sh 79B
nginx.conf 424B
50x.html 497B
favicon.ico 15KB
icon32.png 2KB
background.js 118B
index.html 5KB
icon128.png 5KB
.gitignore 30B
chat.css 2KB
install.bat 310B
logs
startup.bat 284B
uninstall.bat 326B
conf
mime.types 5KB
uwsgi_params 681B
koi-utf 3KB
fastcgi_params 1KB
fastcgi.conf 1KB
win-utf 4KB
koi-win 2KB
scgi_params 653B
nginx.conf 2KB
contrib
README 543B
vim
indent
nginx.vim 250B
ftplugin
nginx.vim 29B
ftdetect
nginx.vim 198B
syntax
nginx.vim 111KB
geo2nginx.pl 1KB
unicode2nginx
koi-utf 6KB
win-utf 5KB
unicode-to-nginx.pl 1KB
shutdown.bat 273B
共 53 条
- 1
资源评论
程序员老司机
- 粉丝: 235
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功