eust-w 487f3af948 feat: modifications based on team suggestions
- Add MongoDB type manager implementation (TypeManagerMongo)
- Update environment variables configuration to support MongoDB connection
- Add chat functionality
- Integrate Azure OpenAI API support
- Update dependencies and startup script
2025-04-11 12:00:32 +08:00

73 lines
3.6 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>图片智能对话系统 - 地瓜机器人</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/chat.css') }}">
</head>
<body>
<div class="container">
<header class="text-center my-4">
<h1>图片智能对话系统</h1>
<p class="lead">上传图片与AI进行多轮对话</p>
<nav class="mt-3">
<a href="/" class="btn btn-outline-secondary">返回首页</a>
</nav>
</header>
<div class="row">
<div class="col-md-12">
<div class="card mb-4">
<div class="card-body">
<h5 class="card-title">上传图片</h5>
<form id="uploadImageForm" enctype="multipart/form-data">
<div class="mb-3">
<label for="chatImageFile" class="form-label">选择图片</label>
<input class="form-control" type="file" id="chatImageFile" name="file" accept="image/*" required>
<div class="form-text">支持JPG、PNG、JPEG、GIF格式</div>
</div>
<button type="submit" class="btn btn-primary">上传并开始对话</button>
</form>
<div id="uploadPreview" class="mt-3 text-center d-none">
<div class="preview-container">
<img id="previewImage" class="img-fluid rounded" alt="预览图">
</div>
<div id="imageInfo" class="mt-2">
<div id="imageType" class="badge bg-info"></div>
<div id="imageDescription" class="text-muted small mt-1"></div>
</div>
</div>
</div>
</div>
<div id="chatContainer" class="card d-none">
<div class="card-header">
<h5 class="mb-0">与图片对话</h5>
</div>
<div class="card-body">
<div id="chatMessages" class="chat-messages mb-3"></div>
<div class="chat-input-container">
<form id="chatForm">
<div class="input-group">
<input type="text" id="messageInput" class="form-control" placeholder="输入您的问题..." required>
<button class="btn btn-primary" type="submit">
<i class="bi bi-send"></i> 发送
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="{{ url_for('static', filename='js/chat.js') }}"></script>
</body>
</html>