Classes
Methods
# async defaultMessageProcessor(message, history, lessonDataWithInvestigation, investigation) → {Promise.<(string|null)>}
Default message processor used for the "AnotherIntent", when the user is not asking to generate an investigation.
Parameters:
| Name | Type | Description |
|---|---|---|
message |
string
|
The user's message from which the lesson must be detected. |
history |
Array.<IFormattedHistory>
|
The chat history between the user and the assistant. |
lessonDataWithInvestigation |
string
|
Lesson data with investigation detected from the user's message. |
investigation |
ICreateInvestigationDto
|
The current investigation, if it exists. |
If a required prompt is missing or something goes wrong when requesting the LLM.
Error
The AI Assistant's response.
Promise.<(string|null)>
# async processMessage(message, chatHistory, investigation, lessonWithoutInvestigation) → {Promise.<IAssistantResponseFormat>}
Processes messages sent by the user.
Parameters:
| Name | Type | Description |
|---|---|---|
message |
string
|
The user's message from which the lesson must be detected. |
chatHistory |
Array.<IChatHistory>
|
The chat history between the user and the assistant. |
investigation |
IInvestigation
|
The current investigation, if it exists. |
lessonWithoutInvestigation |
string
|
Lesson data that does not contain an investigation. |
If something goes wrong when processing the message.
Error
The processed response to the user's message.
Promise.<IAssistantResponseFormat>