Class

ChatService

ChatService(investigationId, userId)

Chat Service

Constructor

# new ChatService(investigationId, userId)

Constructor

Parameters:
Name Type Description
investigationId ObjectId | null

The investigation ID.

userId ObjectId | null

The user ID.

View Source services/chat.service.js, line 22

Classes

ChatService

Members

# aiAssistantService

AI Assistant Service

View Source services/chat.service.js, line 42

# grpcClient

gRPC Client

View Source services/chat.service.js, line 57

# investigationBuilder

Investigation Builder

View Source services/chat.service.js, line 52

# investigationId

Investigation ID

View Source services/chat.service.js, line 27

# investigationService

Investigation Service

View Source services/chat.service.js, line 47

Methods

# async continueConversation(data) → {Promise.<IChatResponseFormat>}

Continues a conversation with the AI Assistant.

Parameters:
Name Type Description
data IConversationData

Data containing the necessary parameters to continue the conversation.

View Source services/chat.service.js, line 141

If something goes wrong when requesting the LLM.

Error

The AI Assistant's response.

Promise.<IChatResponseFormat>

# async startConversation() → {Promise.<(object|boolean)>}

Starts a conversation with the AI Assistant.

View Source services/chat.service.js, line 83

If something goes wrong when requesting the LLM.

Error

The chat history if it exists; otherwise, a greeting message.

Promise.<(object|boolean)>