diff options
Diffstat (limited to 'src/server/ApiManagers/AssistantManager.ts')
-rw-r--r-- | src/server/ApiManagers/AssistantManager.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/server/ApiManagers/AssistantManager.ts b/src/server/ApiManagers/AssistantManager.ts index 4d2068014..b53581aa2 100644 --- a/src/server/ApiManagers/AssistantManager.ts +++ b/src/server/ApiManagers/AssistantManager.ts @@ -23,7 +23,6 @@ import { AI_Document } from '../../client/views/nodes/chatbot/types/types'; import { Method } from '../RouteManager'; import { filesDirectory, publicDirectory } from '../SocketData'; import ApiManager, { Registration } from './ApiManager'; -import { getServerPath } from '../../client/util/reportManager/reportManagerUtils'; // Enumeration of directories where different file types are stored export enum Directory { @@ -157,7 +156,7 @@ export default class AssistantManager extends ApiManager { try { // Fetch initial search results let response = await fetchSearchResults(startIndex); - let initialResults = + const initialResults = response.data.items?.map(item => ({ url: item.link, snippet: item.snippet, @@ -531,7 +530,7 @@ function spawnPythonProcess(jobId: string, file_name: string, file_data: string) try { const errorOutput = JSON.parse(lastLine); jobResults[jobId] = errorOutput; - } catch (err) { + } catch { jobResults[jobId] = { error: 'Python process failed' }; } } else { |