mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-04 10:52:27 +02:00
fix: linter cleanup on flow service implementations
Minor fixes from linter: readonly modifiers, unused parameter prefixes, type narrowing in graph-rag BFS traversal and edge scoring. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b6536eca38
commit
0042f9259c
7 changed files with 21 additions and 19 deletions
|
|
@ -31,7 +31,7 @@ export class DocumentRag {
|
|||
|
||||
async query(
|
||||
queryText: string,
|
||||
options?: {
|
||||
_options?: {
|
||||
collection?: string;
|
||||
streaming?: boolean;
|
||||
chunkCallback?: ChunkCallback;
|
||||
|
|
|
|||
|
|
@ -12,19 +12,19 @@
|
|||
*/
|
||||
|
||||
import type {
|
||||
RequestResponse,
|
||||
TextCompletionRequest,
|
||||
TextCompletionResponse,
|
||||
EmbeddingsRequest,
|
||||
EmbeddingsResponse,
|
||||
GraphEmbeddingsRequest,
|
||||
GraphEmbeddingsResponse,
|
||||
TriplesQueryRequest,
|
||||
TriplesQueryResponse,
|
||||
PromptRequest,
|
||||
PromptResponse,
|
||||
RequestResponse,
|
||||
Term,
|
||||
TextCompletionRequest,
|
||||
TextCompletionResponse,
|
||||
Triple,
|
||||
TriplesQueryRequest,
|
||||
TriplesQueryResponse,
|
||||
} from "@trustgraph/base";
|
||||
|
||||
export interface GraphRagConfig {
|
||||
|
|
@ -87,9 +87,11 @@ export class GraphRag {
|
|||
const scoredEdges = await this.scoreEdges(queryText, subgraph);
|
||||
|
||||
// Step 6: Synthesize answer
|
||||
const answer = await this.synthesize(queryText, scoredEdges, options?.chunkCallback);
|
||||
|
||||
return answer;
|
||||
return await this.synthesize(
|
||||
queryText,
|
||||
scoredEdges,
|
||||
options?.chunkCallback
|
||||
);
|
||||
}
|
||||
|
||||
private async extractConcepts(query: string): Promise<string[]> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue