Last active
January 31, 2025 18:24
-
-
Save FredrikOseberg/c1e8ec83ade6e89ca84882e33caf599c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MessageParser starter code | |
class MessageParser { | |
constructor(actionProvider, state) { | |
this.actionProvider = actionProvider; | |
this.state = state; | |
} | |
parse(message) { | |
console.log(message) | |
} | |
} | |
export default MessageParser; | |
// ActionProvider starter code | |
class ActionProvider { | |
constructor( | |
createChatBotMessage, | |
setStateFunc, | |
createClientMessage, | |
stateRef, | |
createCustomMessage, | |
...rest | |
) { | |
this.createChatBotMessage = createChatBotMessage; | |
this.setState = setStateFunc; | |
this.createClientMessage = createClientMessage; | |
this.stateRef = stateRef; | |
this.createCustomMessage = createCustomMessage; | |
} | |
} | |
export default ActionProvider; | |
// Config starter code | |
import { createChatBotMessage } from "react-chatbot-kit"; | |
const config = { | |
initialMessages: [createChatBotMessage(`Hello world`)] | |
} | |
export default config |
@Iymanjpmc
The following css should give nicer output from the LLM.
.react-chatbot-kit-chat-bot-message {
white-space: pre-wrap;
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HI @FredrikOseberg , Anyway to parse message to show proper formatting. Like bullet points, new lines, paragraphs.
Example: the response from bot is :
Onboarding a client involves several steps and checks. Here are the detailed steps:\n\n1. All clients are required to be onboarded before any credit facilities are made available for utilization. Know Your Customer (KYC) requirements must be satisfied in accordance to requirements of the lending entity that the client is being onboarded to. Such requirements may vary depending on the product, client profile, and country-specific regulations.\n\n2. Check for the products that the client has been onboarded for. T.\n\n3. If it involves a core trade product onboarding .\n\n4. Obtain KYC confirmation email and safe keep in CPD shared drive. Confirmation from Business, RP Team or Trade Sales are acceptable.\n\n5. Download the latest template made available in CPD shared point.
instead it should be like this :
Onboarding a client involves several steps and checks. Here are the detailed steps: