mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-10 05:27:54 -05:00
Fix
This commit is contained in:
@@ -229,12 +229,20 @@ class CodeMonkey(FileDiffMixin, BaseAgent):
|
||||
task = self.current_state.current_task
|
||||
current_task_index = self.current_state.tasks.index(task)
|
||||
|
||||
related_api_endpoints = task.get("related_api_endpoints", [])
|
||||
# TODO: Temp fix for old projects
|
||||
if not (
|
||||
related_api_endpoints
|
||||
and len(related_api_endpoints) > 0
|
||||
and all(isinstance(api, dict) and "endpoint" in api for api in related_api_endpoints)
|
||||
):
|
||||
related_api_endpoints = []
|
||||
convo = AgentConvo(self).template(
|
||||
"breakdown",
|
||||
task=task,
|
||||
iteration=None,
|
||||
current_task_index=current_task_index,
|
||||
related_api_endpoints=task.get("related_api_endpoints", []),
|
||||
related_api_endpoints=related_api_endpoints,
|
||||
)
|
||||
# TODO: We currently show last iteration to the code monkey; we might need to show the task
|
||||
# breakdown and all the iterations instead? To think about when refactoring prompts
|
||||
|
||||
@@ -219,6 +219,7 @@ class Developer(ChatWithBreakdownMixin, RelevantFilesMixin, BaseAgent):
|
||||
await self.ui.start_breakdown_stream()
|
||||
related_api_endpoints = current_task.get("related_api_endpoints", [])
|
||||
llm = self.get_llm(TASK_BREAKDOWN_AGENT_NAME, stream_output=True)
|
||||
# TODO: Temp fix for old projects
|
||||
if not (
|
||||
related_api_endpoints
|
||||
and len(related_api_endpoints) > 0
|
||||
|
||||
@@ -151,6 +151,15 @@ class Troubleshooter(ChatWithBreakdownMixin, IterationPromptMixin, RelevantFiles
|
||||
task = self.current_state.current_task
|
||||
current_task_index = self.current_state.tasks.index(task)
|
||||
|
||||
related_api_endpoints = task.get("related_api_endpoints", [])
|
||||
# TODO: Temp fix for old projects
|
||||
if not (
|
||||
related_api_endpoints
|
||||
and len(related_api_endpoints) > 0
|
||||
and all(isinstance(api, dict) and "endpoint" in api for api in related_api_endpoints)
|
||||
):
|
||||
related_api_endpoints = []
|
||||
|
||||
return (
|
||||
AgentConvo(self)
|
||||
.template(
|
||||
@@ -158,7 +167,7 @@ class Troubleshooter(ChatWithBreakdownMixin, IterationPromptMixin, RelevantFiles
|
||||
task=task,
|
||||
iteration=None,
|
||||
current_task_index=current_task_index,
|
||||
related_api_endpoints=task.get("related_api_endpoints", []),
|
||||
related_api_endpoints=related_api_endpoints,
|
||||
)
|
||||
.assistant(self.current_state.current_task["instructions"])
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user