On this page
Embeddings
Embed the chat from LookUp UI into your website
The following is the embed code that you can use to embed the chat from LookUp UI into your website.
html
<!- Paste this script tag at the head section of your webpage -->
<script src="https://chat.staging.onereach.ai/lib/richWebChat.umd.min.js"></script>
<!- This is the stylesheet for the web chat, paste it in the head section of your webpage -->
<link
rel="stylesheet"
href="https://chat.staging.onereach.ai/lib/richWebChat.css"
/>
<!- This div will act as the container for the web chat -->
<div id="rwc"></div>
<!- Configure and initialize the web chat inside a script tag, paste it in the body section of your webpage -->
<script>
document.addEventListener("DOMContentLoaded", function() {
var RWC = richWebChat.default;
var app = new RWC({
container: '#rwc',
chatUrl: "<Your Chat URL>,"
pageData: {
collectionSettings: {
frequencyPenalty: <Your desired frequencyPenalty>,
presencePenalty: <Your desired presencePenalty>,
temperature: <Your desired temperature>,
maxDistance: <Your maxDistance>,
modelName: "<Your modelName>",
answerInstruction: "<Your answerInstruction>",
questionInstruction: "<Your questionInstruction>",
properties: <Your properties object>,
accountId: "<Your account ID>",
collectionId: "<Your collection ID>",
where: <Your where object>,
mode: "<Your mode>",
}
})
});
</script><!- Paste this script tag at the head section of your webpage -->
<script src="https://chat.staging.onereach.ai/lib/richWebChat.umd.min.js"></script>
<!- This is the stylesheet for the web chat, paste it in the head section of your webpage -->
<link
rel="stylesheet"
href="https://chat.staging.onereach.ai/lib/richWebChat.css"
/>
<!- This div will act as the container for the web chat -->
<div id="rwc"></div>
<!- Configure and initialize the web chat inside a script tag, paste it in the body section of your webpage -->
<script>
document.addEventListener("DOMContentLoaded", function() {
var RWC = richWebChat.default;
var app = new RWC({
container: '#rwc',
chatUrl: "<Your Chat URL>,"
pageData: {
collectionSettings: {
frequencyPenalty: <Your desired frequencyPenalty>,
presencePenalty: <Your desired presencePenalty>,
temperature: <Your desired temperature>,
maxDistance: <Your maxDistance>,
modelName: "<Your modelName>",
answerInstruction: "<Your answerInstruction>",
questionInstruction: "<Your questionInstruction>",
properties: <Your properties object>,
accountId: "<Your account ID>",
collectionId: "<Your collection ID>",
where: <Your where object>,
mode: "<Your mode>",
}
})
});
</script>Replace all variables marked with < > with your actual values.
chatURLis the URL of your chatfrequencyPenalty,presencePenalty,temperature,maxDistanceare parameters for fine-tuning the AI's responsesmodelNameis the version of AI model you are using (e.g. GPT-3.5 or GPT-4)answerInstructionandquestionInstructionare instructions for the AI that shape the conversationpropertiesis the custom metadata about the collectionaccountIdandcollectionIdare your account and collection identifierswhereis the filtering objectmodecan beconversationorsearch
