Skip to content

Commit

Permalink
fix(DfsTulip): use copy instead of deepcopy to keep references to oth…
Browse files Browse the repository at this point in the history
…er nodes intact
  • Loading branch information
felixocker committed Sep 9, 2024
1 parent 3b4e365 commit 0c3704d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/tulip_agent/tulip_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import json
import logging
from abc import ABC
from copy import deepcopy
from typing import Optional

from openai.types.chat.chat_completion_message_tool_call import (
Expand Down Expand Up @@ -1310,7 +1309,7 @@ def recurse(
paraphrased_description = (
self._get_response(msgs=messages).choices[0].message.content
)
task.paraphrased_variants.append(deepcopy(task))
task.paraphrased_variants.append(copy.copy(task))
task.description = paraphrased_description
return self.recurse(task=task, recursion_level=recursion_level)
elif len(task.generated_tools) == 0:
Expand Down

0 comments on commit 0c3704d

Please sign in to comment.