File tree Expand file tree Collapse file tree 8 files changed +9
-7
lines changed
chatbot-server-mongodb-public Expand file tree Collapse file tree 8 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 14
14
"." : " ./build/lib.js"
15
15
},
16
16
"scripts" : {
17
+ "build:check" : " tsc --noEmit --project tsconfig.json" ,
18
+ "prebuild" : " npm run build:check" ,
17
19
"build" : " rm -rf ./build/ && tsc -b tsconfig.build.json" ,
18
20
"dev" : " nodemon src/index.ts" ,
19
21
"format" : " prettier ./src --write" ,
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ async function main({
124
124
) ;
125
125
const urlsNotIngested = await pageStore . getMissingPagesByUrl ( {
126
126
expectedUrls,
127
- urlTransformer : normalizeUrl ,
127
+ urlTransformer : ( url ) => normalizeUrl ( { url } ) ,
128
128
} ) ;
129
129
if ( urlsNotIngested . length > 0 ) {
130
130
console . warn (
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import fs from "fs";
11
11
import path from "path" ;
12
12
import { makeConversationEval } from "../ConversationEval" ;
13
13
import { makeGenerateResponse } from "../../config" ;
14
- import { addMessageToConversationStream } from "../../processors/generateResponseWithSearchTool" ;
15
14
16
15
async function conversationEval ( ) {
17
16
// Get all the conversation eval cases from YAML
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import fs from "fs";
11
11
import path from "path" ;
12
12
import { makeConversationEval } from "../ConversationEval" ;
13
13
import { makeGenerateResponse } from "../../config" ;
14
- import { addMessageToConversationStream } from "../../processors/generateResponseWithSearchTool" ;
15
14
16
15
async function conversationEval ( ) {
17
16
// Get ONLY architecture center conversations
Original file line number Diff line number Diff line change 9
9
} from "../evalHelpers" ;
10
10
import { makeConversationEval } from "../ConversationEval" ;
11
11
import { closeDbConnections , makeGenerateResponse } from "../../config" ;
12
- import { responsesApiStream } from "../../processors/generateResponseWithSearchTool" ;
13
12
14
13
const conversationEvalCases : ConversationEvalCase [ ] = [
15
14
// Test 1: Basic custom system prompt override
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import fs from "fs";
11
11
import path from "path" ;
12
12
import { makeConversationEval } from "../ConversationEval" ;
13
13
import { makeGenerateResponse } from "../../config" ;
14
- import { addMessageToConversationStream } from "../../processors/generateResponseWithSearchTool" ;
15
14
16
15
async function conversationEval ( ) {
17
16
// Get dotcom question set eval cases from YAML
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import "dotenv/config";
2
2
import {
3
3
Eval ,
4
4
EvalCase ,
5
+ EvalParameters ,
5
6
EvalScorer ,
6
7
EvalTask ,
7
8
} from "mongodb-rag-core/braintrust" ;
@@ -62,8 +63,10 @@ const { k } = retrievalConfig.findNearestNeighborsOptions;
62
63
const retrieveRelevantContentEvalTask : EvalTask <
63
64
RetrievalEvalCaseInput ,
64
65
RetrievalTaskOutput ,
65
- RetrievalEvalCaseExpected
66
- > = async function ( data ) {
66
+ RetrievalEvalCaseExpected ,
67
+ void ,
68
+ EvalParameters
69
+ > = async function ( data : RetrievalEvalCaseInput ) {
67
70
// TODO: (EAI-991) implement retrieval task for evaluation
68
71
const extractedMetadata : MongoDbSearchToolArgs = {
69
72
productName : null ,
Original file line number Diff line number Diff line change @@ -24,3 +24,4 @@ export * from "./VectorStore";
24
24
export * from "./arrayFilters" ;
25
25
export * from "./assertEnvVars" ;
26
26
export * from "./getEnv" ;
27
+ export * from "./mongoDbMetadata" ;
You can’t perform that action at this time.
0 commit comments