Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add language support to reports and frontend input #1213

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hurxxxx
Copy link
Contributor

@hurxxxx hurxxxx commented Feb 27, 2025

This PR introduces support for specifying the language of generated reports by adding a language parameter. The default value is set to "english", ensuring backward compatibility while enabling multi-language support.

Changes

Backend

  • Added language parameter to BasicReport and DetailedReport classes
  • Updated GPTResearcher to store language in the Config object for use in report generation
  • Modified server_utils.py and websocket_manager.py to extract and pass the language parameter

Frontend

  • Added a new input field for selecting the report language (index.html, scripts.js)
  • Ensured the selected language is sent to the backend when starting the report generation

Review

  • Verified that the language parameter is correctly propagated from frontend → server → backend → GPTResearcher
  • Maintained backward compatibility by defaulting to "english"
  • Followed existing patterns in the codebase for consistency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant