cli html renderer
This commit is contained in:
@@ -2,6 +2,7 @@ import dotenv from 'dotenv';
|
||||
import { createClients } from './src/clients.js';
|
||||
import { getConfig, validateConfig } from './src/config/env.js';
|
||||
import { createSearchService } from './src/services/searchService.js';
|
||||
import { renderHTML } from './src/utils/htmlConsoleRenderer.js';
|
||||
|
||||
// Load environment variables from .env file
|
||||
dotenv.config();
|
||||
@@ -49,13 +50,11 @@ async function runCLI() {
|
||||
|
||||
const result = await searchService.search(question);
|
||||
|
||||
|
||||
console.log(result);
|
||||
console.log('');
|
||||
console.log('═══════════════════════════════════════════════════════════');
|
||||
console.log('FINAL ANSWER:');
|
||||
console.log('═══════════════════════════════════════════════════════════');
|
||||
console.log(result.fullAnswerHTMLSnippet || result.answer || 'No answer generated');
|
||||
console.log(renderHTML(result.fullAnswerHTMLSnippet) || 'No answer generated');
|
||||
console.log('');
|
||||
|
||||
if (result.mostRelevantSources && result.mostRelevantSources.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user