Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Fix company report problem (#73) #77

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ui/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ VITE_UNSTRUCTURED_IMPORT_BACKEND_ENDPOINT=http://localhost:7860/
VITE_KG_CHAT_BACKEND_ENDPOINT=ws://localhost:7860/text2text
VITE_HAS_API_KEY_ENDPOINT=http://localhost:7860/hasapikey
VITE_KG_CHAT_SAMPLE_QUESTIONS_ENDPOINT=http://localhost:7860/questionProposalsForCurrentDb
VITE_REPORT_DATA_ENDPOINT=http://localhost:7860
VITE_REPORT_DATA_ENDPOINT=http://localhost:7860/companyReport
VITE_REPORT_COMPANY_LIST_ENDPOINT=http://localhost:7860/companyReport/list
7 changes: 5 additions & 2 deletions ui/src/report-generation/utils/fetch-example-companies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ type JSONResponse = {
};

export const getCompanies = async () => {
const response = await fetch(
`${import.meta.env.VITE_REPORT_DATA_ENDPOINT}/companyReport/list`,
const LIST_EXAMPLE_COMPANIES_URI =
import.meta.env.VITE_REPORT_COMPANY_LIST_ENDPOINT ??
"http://localhost:7860/companyReport/list";

const response = await fetch(LIST_EXAMPLE_COMPANIES_URI,
{
method: "POST",
}
Expand Down
7 changes: 5 additions & 2 deletions ui/src/report-generation/utils/fetch-report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ export const getReportData = async (company: string, apiKey?: string) => {
api_key: apiKey ? apiKey : undefined,
};

const response = await fetch(
`${import.meta.env.VITE_REPORT_DATA_ENDPOINT}/companyReport`,
const COMPANY_REPORT_URI =
import.meta.env.VITE_REPORT_DATA_ENDPOINT ??
"http://localhost:7860/companyReport";

const response = await fetch(COMPANY_REPORT_URI,
{
method: "POST",
headers: {
Expand Down