Skip to content

Passing "detailed_report" in GPTResearcher constructor (still) results in key error #442

Closed
@Handschrift

Description

@Handschrift

I already opened an issue (see #431) but the issue got closed.

The mentioned problem still exists. So running the code:

report_type = "detailed_report" # using ReportType.DetailedReport.value does not work aswell
researcher = GPTResearcher(query, report_type, config_path="config.json")
await researcher.conduct_research()
report = await researcher.write_report()

does produce a KeyError because:

    report_type_mapping = {
        ReportType.ResearchReport.value: generate_report_prompt,
        ReportType.ResourceReport.value: generate_resource_report_prompt,
        ReportType.OutlineReport.value: generate_outline_report_prompt,
        ReportType.CustomReport.value: generate_custom_report_prompt,
        ReportType.SubtopicReport.value: generate_subtopic_report_prompt
    }

does not contain the "detailed_report" key.

This error still exists even if I use the latest version (the master branch, currently at commit 53f2da7) of the package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions