Skip to main content

synthesizeScenarioSuggestion

chainalign-backend


chainalign-backend / services/ScenarioSuggestionService / synthesizeScenarioSuggestion

Function: synthesizeScenarioSuggestion()

synthesizeScenarioSuggestion(userPrompt, ragContext, tenantId, user): Promise<string>

Defined in: services/ScenarioSuggestionService.js:12

Synthesizes a scenario suggestion based on a given prompt and RAG context.

Parameters

userPrompt

string

The user's current context or a specific question about scenarios.

ragContext

string[]

An array of relevant text chunks from the RAG system.

tenantId

string

The ID of the tenant making the request.

user

any

The user object (e.g., from req.user).

Returns

Promise<string>

A synthesized scenario suggestion.