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

Fix/gpt all star #176

Merged
merged 2 commits into from
Mar 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions gpt_all_star/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ def chat(self, message: str) -> None:
if step.__class__ is Specification:
step.instructions = message
step.app_type = self._("Client-Side Web Application")
for agent in self.agents.to_array():
agent.set_executor(step.working_directory)
Comment on lines +161 to +162

Choose a reason for hiding this comment

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

Image description CodeRabbit

self.agents.to_array()メソッドの戻り値が空の場合、set_executorメソッドが存在しないオブジェクトに対して呼び出される可能性があります。エージェントが存在することを確認するための条件を追加することを検討してみてください。

+             if self.agents.to_array():
                 for agent in self.agents.to_array():
                     agent.set_executor(step.working_directory)

supervisor_name = (
Chain()
.create_assign_supervisor_chain(members=self.agents.to_array())
Expand Down Expand Up @@ -185,6 +187,8 @@ def chat(self, message: str) -> None:
for task in step.additional_tasks():
tasks["plan"].append(task)

yield {"tasks": tasks}

count = 1
while len(tasks["plan"]) > 0:
task = tasks["plan"][0]
Expand Down
Loading