Use Yahoo Finance company descriptions

This commit is contained in:
2026-03-13 00:28:24 -04:00
parent a3d4c97f4e
commit 61282ec380
3 changed files with 273 additions and 1 deletions

View File

@@ -74,6 +74,7 @@ import { synthesizeCompanyOverview } from '@/lib/server/company-overview-synthes
import { getRecentDevelopments } from '@/lib/server/recent-developments';
import { deriveValuationSnapshot, getSecCompanyProfile, toCompanyProfile } from '@/lib/server/sec-company-profile';
import { getCompanyDescription } from '@/lib/server/sec-description';
import { getYahooCompanyDescription } from '@/lib/server/yahoo-company-profile';
import { answerSearchQuery, searchKnowledgeBase } from '@/lib/server/search';
import {
enqueueTask,
@@ -1424,10 +1425,12 @@ export const app = new Elysia({ prefix: '/api' })
: null
};
const annualFiling = redactedFilings.find((entry) => entry.filing_type === '10-K') ?? null;
const [description, synthesizedDevelopments] = await Promise.all([
const [secDescription, yahooDescription, synthesizedDevelopments] = await Promise.all([
getCompanyDescription(annualFiling),
getYahooCompanyDescription(ticker),
getRecentDevelopments(ticker, { filings: redactedFilings })
]);
const description = yahooDescription ?? secDescription;
const latestFilingSummary = latestFiling
? {
accessionNumber: latestFiling.accession_number,