diff --git a/404.html b/404.html index 8ffd0ca58..f2066d5fb 100644 --- a/404.html +++ b/404.html @@ -13,7 +13,7 @@ - +
diff --git a/assets/js/c214479d.031ee1fe.js b/assets/js/c214479d.031ee1fe.js deleted file mode 100644 index e431ced87..000000000 --- a/assets/js/c214479d.031ee1fe.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3555],{88096:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>p,contentTitle:()=>x,default:()=>g,frontMatter:()=>h,metadata:()=>u,toc:()=>m});var r=n(74848),a=n(28453),l=n(24033),t=n(50363),i=n(15781),o=n(78478),d=n(19365),c=n(11470);const h={sidebar_position:6},x="Messages",u={id:"docs/messages/messages",title:"Messages",description:"Properties related to messages.",source:"@site/docs/docs/messages/messages.mdx",sourceDirName:"docs/messages",slug:"/docs/messages/",permalink:"/docs/messages/",draft:!1,unlisted:!1,editUrl:"https://github.com/OvidijusParsiunas/deep-chat/tree/main/website/docs/docs/messages/messages.mdx",tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"docs",previous:{title:"Styles",permalink:"/docs/styles"},next:{title:"Styles",permalink:"/docs/messages/styles"}},p={},m=[{value:"history
",id:"history",level:3},{value:"Example",id:"example",level:4},{value:"introMessage
",id:"introMessage",level:3},{value:"Example",id:"example-1",level:4},{value:"avatars
",id:"avatars",level:3},{value:"Example",id:"example-2",level:4},{value:"Avatar
",id:"Avatar",level:4},{value:"Example",id:"example-3",level:4},{value:"names
",id:"names",level:3},{value:"Example",id:"example-4",level:4},{value:"Name
",id:"Name",level:4},{value:"Example",id:"example-5",level:4},{value:"displayLoadingBubble
",id:"displayLoadingBubble",level:3},{value:"Example",id:"example-6",level:4},{value:"errorMessages
",id:"errorMessages",level:3},{value:"Example",id:"example-7",level:4},{value:"Types",id:"types",level:2},{value:"MessageContent
",id:"MessageContent",level:3},{value:"Example",id:"example-8",level:4},{value:"MessageRole
",id:"MessageRole",level:3},{value:"MessageFile
",id:"MessageFile",level:3},{value:"Example",id:"example-9",level:4},{value:"MessageFileType
",id:"MessageFileType",level:3},{value:"Code messages",id:"code-messages",level:2},{value:"Example",id:"example-10",level:4}];function j(e){const s={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"messages",children:"Messages"})}),"\n",(0,r.jsx)(s.p,{children:"Properties related to messages."}),"\n",(0,r.jsx)(s.h3,{id:"history",children:(0,r.jsx)(s.code,{children:"history"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Type: ",(0,r.jsx)(s.a,{href:"#MessageContent",children:(0,r.jsx)(s.code,{children:"MessageContent[]"})})]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Messages that are pre-populated when the chat loads up. Use ",(0,r.jsx)(s.a,{href:"/docs/interceptors#loadHistory",children:(0,r.jsx)(s.code,{children:"loadHistory"})})," to load messages asynchronously. ",(0,r.jsx)("br",{})]}),"\n","\n",(0,r.jsx)(o.A,{children:()=>n(61886).readdAutoNavShadowToggle()}),"\n",(0,r.jsx)(o.A,{children:()=>n(9475).OI()}),"\n",(0,r.jsx)(s.h4,{id:"example",children:"Example"}),"\n",(0,r.jsx)(l.A,{children:(0,r.jsx)(t.A,{demo:!0,history:[{text:"Show me a modern city",role:"user"},{files:[{src:"/img/city.jpeg",type:"image"}],role:"ai"},{text:"Whats on your mind?",role:"user"},{text:"Peace and tranquility",role:"ai"}],style:{height:"370px",borderRadius:"8px"}})}),"\n",(0,r.jsxs)(c.A,{children:[(0,r.jsx)(d.A,{value:"js",label:"Sample code",children:(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-html",children:'history
",id:"history",level:3},{value:"Example",id:"example",level:4},{value:"introMessage
",id:"introMessage",level:3},{value:"Example",id:"example-1",level:4},{value:"avatars
",id:"avatars",level:3},{value:"Example",id:"example-2",level:4},{value:"Avatar
",id:"Avatar",level:4},{value:"Example",id:"example-3",level:4},{value:"names
",id:"names",level:3},{value:"Example",id:"example-4",level:4},{value:"Name
",id:"Name",level:4},{value:"Example",id:"example-5",level:4},{value:"displayLoadingBubble
",id:"displayLoadingBubble",level:3},{value:"Example",id:"example-6",level:4},{value:"errorMessages
",id:"errorMessages",level:3},{value:"Example",id:"example-7",level:4},{value:"Types",id:"types",level:2},{value:"MessageContent
",id:"MessageContent",level:3},{value:"Example",id:"example-8",level:4},{value:"MessageRole
",id:"MessageRole",level:3},{value:"MessageFile
",id:"MessageFile",level:3},{value:"Example",id:"example-9",level:4},{value:"MessageFileType
",id:"MessageFileType",level:3},{value:"Code messages",id:"code-messages",level:2},{value:"Example",id:"example-10",level:4}];function j(e){const s={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"messages",children:"Messages"})}),"\n",(0,r.jsx)(s.p,{children:"Properties related to messages."}),"\n",(0,r.jsx)(s.h3,{id:"history",children:(0,r.jsx)(s.code,{children:"history"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Type: ",(0,r.jsx)(s.a,{href:"#MessageContent",children:(0,r.jsx)(s.code,{children:"MessageContent[]"})})]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Messages that are pre-populated when the chat loads up. Use ",(0,r.jsx)(s.a,{href:"/docs/interceptors#loadHistory",children:(0,r.jsx)(s.code,{children:"loadHistory"})})," to load messages asynchronously. ",(0,r.jsx)("br",{})]}),"\n","\n",(0,r.jsx)(o.A,{children:()=>n(61886).readdAutoNavShadowToggle()}),"\n",(0,r.jsx)(o.A,{children:()=>n(9475).OI()}),"\n",(0,r.jsx)(s.h4,{id:"example",children:"Example"}),"\n",(0,r.jsx)(l.A,{children:(0,r.jsx)(t.A,{demo:!0,history:[{text:"Show me a modern city",role:"user"},{files:[{src:"/img/city.jpeg",type:"image"}],role:"ai"},{text:"Whats on your mind?",role:"user"},{text:"Peace and tranquility",role:"ai"}],style:{height:"370px",borderRadius:"8px"}})}),"\n",(0,r.jsxs)(c.A,{children:[(0,r.jsx)(d.A,{value:"js",label:"Sample code",children:(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-html",children:'introMessage
text?: string
, html?: string
}text?: string
, html?: string
} | Array
Initial ai
message that is displayed when the chat is loaded. It is different to history
as it will not trigger
the onMessage
listener, will not be part of the returned messages when getMessages
is called and
is not taken into consideration when calculating requestBodyLimits
.
html
is used to render custom code and can be coupled with a deep-chat-temporary-message
-class to make this message disappear after a new one is added.
<deep-chat introMessage='{"text": "Hi I am your assistant, ask me anything!"}'></deep-chat>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<deep-chat
introMessage='{"text": "Hi I am your assistant, ask me anything!"}'
demo="true"
style="border-radius: 8px"
></deep-chat>