-
Notifications
You must be signed in to change notification settings - Fork 25
/
index.html
65 lines (65 loc) · 2.81 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="description" content="Azure OpenAI JavaScript Chat Sample" />
<link rel="icon" type="image/svg+xml" href="/icon.svg" />
<title>OpenAI Chat App JavaScript</title>
</head>
<body>
<main class="chat__main">
<h1>Welcome to this Azure OpenAI JavaScript Chat Sample</h1>
<!-- When using this sample chat app as part of an existing app, you only need the section below.
However, you will need to replace the data-attribute values hardcoded in the chat-component tag with your own data-binded values.
-->
<section class="chat__container">
<chat-component
title="Ask anything or try an example"
data-input-position="sticky"
data-interaction-model="chat"
data-api-url="%VITE_SEARCH_API_URI%"
data-use-stream="true"
data-approach="rrr"
data-overrides="{"retrieval_mode":"hybrid","top":3,"semantic_ranker":true,"semantic_captions":false,"exclude_category":"","prompt_template":"","prompt_template_prefix":"","prompt_template_suffix":"","suggest_followup_questions":true}"
data-custom-styles="{"AccentHigh":"#692b61","AccentLight":"#f6d5f2","AccentDark":"#5e3c7d","TextColor":"#123f58","BackgroundColor":"#e3e3e3","ForegroundColor":"#4e5288","FormBackgroundColor":"#f5f5f5","BorderRadius":"10px","BorderWidth":"3px","FontBaseSize":"14px"}"
data-custom-branding="true"
data-theme="light"
></chat-component>
</section>
</main>
<style>
@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap');
html,
body {
font-family: 'Roboto', sans-serif;
background-color: var(--secondary-color);
color: var(--text-color);
}
chat-component {
display: block;
width: 100%;
}
.chat__main {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
padding: 10px 20px;
padding: 10px 20px;
}
.chat__container {
width: 100%;
}
@media screen and (min-width: 768px) {
.chat__main {
width: 80%;
padding: 50px;
margin: 0 auto;
}
}
</style>
<script type="module" src="/src/index.ts"></script>
</body>
</html>