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

add parameter to fix resource execution #1053

Conversation

Italosayan
Copy link
Contributor

Pull Request: Fix TypeError in generate_resource_report_prompt

Summary

This PR resolves the TypeError caused by passing an unexpected keyword argument language to the generate_resource_report_prompt function. The fix includes:

  1. Adding language as a parameter to the generate_resource_report_prompt function.
  2. Ensuring compatibility in all calls to this function.

Changes Made

Updated generate_resource_report_prompt Function

Added language as a parameter to align with its usage in generate_report.

Old Function Signature:

def generate_resource_report_prompt(
    question, context, report_source: str, report_format="apa", tone=None, total_words=1000
):

Reproduction Steps

To reproduce the error:

  1. Run the gpt-researcher application.

  2. Select "Resource Report" when asked, "What type of report would you like me to generate?"

  3. The application throws the following TypeError:

    TypeError: generate_resource_report_prompt() got an unexpected keyword argument 'language'
    
    

Copy link
Owner

@assafelovic assafelovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this!

@assafelovic assafelovic merged commit 25c1d36 into assafelovic:master Jan 2, 2025
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.

2 participants