Skip to content

Commit cc68a92

Browse files
committed
remove text from search
1 parent e5d1c96 commit cc68a92

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/servers/openai-mcp-server.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -110,25 +110,25 @@ export class OpenAIDeepResearchMCPServer extends BaseMCPServer {
110110
const isDeepResearch = deepResearchRegex.exec(query)?.groups?.isDeepResearch;
111111
console.log("[DEBUG] callSearch: isDeepResearch: ", isDeepResearch, "datasourceId: ", datasourceId, "queryWithoutDatasourceId: ", queryWithoutDatasourceId);
112112

113-
if (!isDeepResearch) {
114-
// If the query is not for deep research, get the answer for the question
115-
if (!datasourceId) {
116-
return this.createErrorResponse("No datasource id provided", "No datasource id provided");
117-
}
118-
const answer = await this.getThoughtSpotService().getAnswerForQuestion(queryWithoutDatasourceId, datasourceId!, false);
119-
if (answer.error) {
120-
return this.createErrorResponse(answer.error.message, `Error getting answer ${answer.error.message}`);
121-
}
122-
console.log("[DEBUG] returning from non deep research callSearch: answer: ", answer);
123-
const result = {
124-
id: `${datasourceId}: ${queryWithoutDatasourceId}`,
125-
title: queryWithoutDatasourceId,
126-
text: answer.data,
127-
url: `${this.ctx.props.instanceUrl}/#/insights/conv-assist?query=${queryWithoutDatasourceId.trim()}&worksheet=${datasourceId}&executeSearch=true`,
128-
}
113+
// if (!isDeepResearch) {
114+
// // If the query is not for deep research, get the answer for the question
115+
// if (!datasourceId) {
116+
// return this.createErrorResponse("No datasource id provided", "No datasource id provided");
117+
// }
118+
// const answer = await this.getThoughtSpotService().getAnswerForQuestion(queryWithoutDatasourceId, datasourceId!, false);
119+
// if (answer.error) {
120+
// return this.createErrorResponse(answer.error.message, `Error getting answer ${answer.error.message}`);
121+
// }
122+
// console.log("[DEBUG] returning from non deep research callSearch: answer: ", answer);
123+
// const result = {
124+
// id: `${datasourceId}: ${queryWithoutDatasourceId}`,
125+
// title: queryWithoutDatasourceId,
126+
// //text: answer.data,
127+
// url: `${this.ctx.props.instanceUrl}/#/insights/conv-assist?query=${queryWithoutDatasourceId.trim()}&worksheet=${datasourceId}&executeSearch=true`,
128+
// }
129129

130-
return this.createStructuredContentSuccessResponse(result, "Answer found");
131-
}
130+
// return this.createStructuredContentSuccessResponse(result, "Answer found");
131+
// }
132132

133133
if (datasourceId) {
134134
const relevantQuestions = await this.getThoughtSpotService().getRelevantQuestions(queryWithoutDatasourceId, [datasourceId], "");
@@ -143,7 +143,7 @@ export class OpenAIDeepResearchMCPServer extends BaseMCPServer {
143143
const results = relevantQuestions.questions.map(q => ({
144144
id: `${datasourceId}: ${q.question}`,
145145
title: q.question,
146-
text: q.question,
146+
//text: q.question,
147147
url: "",
148148
}));
149149

0 commit comments

Comments
 (0)