You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
text: "What are your thoughts on the latest AI chip manufacturer earnings reports that came out this week?",
105
+
text: "How can I manage user-specific data without retraining my model for every user?",
101
106
},
102
107
{
103
108
sender: "MemMachine Agent",
104
-
time: "1:17 PM",
105
-
text: "The reports show strong growth, particularly in the data center segment. However, I recall you mentioned last month that you're looking to decrease your exposure to hardware manufacturers and focus more on AI software and platform companies. Do you want me to filter these insights based on that strategy?",
109
+
text: "That's a key challenge for building personalized agents. MemMachine addresses this with its Personalization memory layer, which stores user-specific data independently of your core model. I recall you were building a financial advice agent for small businesses last month—this is a perfect use case for that.",
106
110
},
107
111
{
108
112
sender: "You",
109
-
time: "1:18 PM",
110
-
text: "Wow, good memory. Yes, please. Focus on the implications for software companies.",
113
+
text: "Wow, you remember that? That's exactly what I'm working on. How does that work under the hood?",
111
114
},
112
115
{
113
116
sender: "MemMachine Agent",
114
-
time: "1:18 PM",
115
-
text: "Understood. The strong hardware sales signal a surge in demand for advanced AI models, which is a bullish indicator for AI platform companies that leverage this new hardware.",
117
+
text: "The core of our memory system is designed to be model-agnostic, giving your agents stateful, context-aware conversations and the ability to recall user-specific facts over time. This is the foundation for building the next generation of AI solutions.",
118
+
},
119
+
{
120
+
sender: "You",
121
+
text: "Okay, that's exactly what I need.",
122
+
},
123
+
{
124
+
sender: "MemMachine Agent",
125
+
text: "You're welcome! Would you like to know how to get started with this kind of memory system? (Yes/No)",
116
126
},
117
127
];
118
128
119
-
// Function to add initial messages to the chat
120
-
functionloadInitialMessages(){
121
-
messages.forEach((message)=>addMessage(message));
122
-
}
123
-
124
129
functionaddMessage(message){
125
130
constchatItem=document.createElement("div");
126
131
chatItem.className="hero-chat-item";
@@ -134,50 +139,148 @@ if (chatList) {
134
139
</div>
135
140
`;
136
141
chatList.appendChild(chatItem);
137
-
chatItem.classList.add("fade-in");// Add fade-in class for animation
138
-
chatList.scrollTop=chatList.scrollHeight;// Scroll to the bottom
142
+
chatItem.classList.add("fade-in");
143
+
chatList.scrollTop=chatList.scrollHeight;
139
144
}
140
-
141
-
// Load initial messages on page load
142
-
loadInitialMessages();
143
-
144
-
sendButton.addEventListener("click",()=>{
145
-
submitMessage();
146
-
});
147
-
148
-
// Allow submitting message with Enter key
149
-
userInput.addEventListener("keypress",(event)=>{
150
-
if(event.key==="Enter"){
151
-
submitMessage();
145
+
146
+
// New function to load the entire conversation history
text: `Great! The best way to get started is with our comprehensive <a href="https://docs.memmachine.ai" target="_blank">documentation</a>. You can also <a href="https://discord.memmachine.ai" target="_blank">join our Discord server</a> to collaborate with other developers, or <a href="https://playground.memmachine.ai" target="_blank">try the Playground</a> to see a live demo.`,
196
+
});
197
+
}elseif(isNegative){
198
+
addMessage({
199
+
sender: "MemMachine Agent",
200
+
time: currentTime,
201
+
text: "No problem. If you change your mind, you can find our resources at any time in the navigation bar. We're here to help when you're ready!",
202
+
});
203
+
}else{
204
+
addMessage({
205
+
sender: "MemMachine Agent",
206
+
time: currentTime,
207
+
text: "That's a great question, but I'm not a full-fledged chat bot! If you're looking for more information, you can find our resources at any time in the navigation bar. We're here to help when you're ready!",
208
+
});
209
+
}
210
+
chatState=2;// End of the conversation flow
211
+
disableChatInput();
212
+
addRestartButton();
213
+
},500);// Reduced delay
214
+
}else{
215
+
// Default message for any interaction after the conversation is over
162
216
addMessage({
163
217
sender: "You",
164
218
time: currentTime,
165
-
text: userMessage,
219
+
text: userInput.value,
166
220
});
167
-
userInput.value="";// Clear input
221
+
userInput.value="";
168
222
169
-
// Simulate the agent response
170
223
setTimeout(()=>{
171
224
addMessage({
172
225
sender: "MemMachine Agent",
173
226
time: currentTime,
174
-
text: "Free quote limit reached. Please upgrade for unlimited access.",
227
+
text: "Thanks for visiting! Please use the links above to learn more about MemMachine."
0 commit comments