Pythagora-io / gpt-pilot

The first real AI developer
Other
30.18k stars 3.01k forks source link

fix issue when one of match groups is NoneType #975

Closed LeonOstrez closed 4 months ago

LeonOstrez commented 4 months ago

Fix for issue:

File core/cli/main.py, line 38, in runproject
    success = await orca.run()
File core/agents/orchestrator.py, line 64, in run
    response = await agent.run()
File core/agents/developer.py, line 79, in run
    await self.getrelevant_files()
File core/agents/developer.py, line 223, in get_relevant_files
    llm_response: list[str] = await llm(convo, parser=JSONParser(RelevantFiles), temperature=0)
File core/agents/base.py, line 173, in client
    response, request_log = await llm_client(convo, **kwargs)
File core/llm/base.py, line 192, in __call
    wait_time = self.rate_limit_sleep(err)
File core/llm/openai_client.py, line 107, in rate_limit_sleep
    seconds = int(match.group(1)) * 3600 + int(match.group(2)) * 60 + int(match.group(3))
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'