Skip to content

Commit

Permalink
fix: ensure parent call frame is of category none
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Nov 2, 2024
1 parent d86fc7e commit 3f1f184
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gptscript/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import httpx

from gptscript.frame import PromptFrame, RunFrame, CallFrame, RunState, RunEventType, Program
from gptscript.frame import PromptFrame, RunFrame, CallFrame, RunState, RunEventType, Program, ToolCategory
from gptscript.opts import Options
from gptscript.tool import ToolDef, Tool

Expand Down Expand Up @@ -179,7 +179,7 @@ async def _request(self, tool: Any):
if self._calls is None:
self._calls = {}
self._calls[event.id] = event
if event.parentID == "" and self._parentCallID == "":
if event.parentID == "" and self._parentCallID == "" and event.toolCategory != ToolCategory.none:
self._parentCallID = event.id
if self.event_handlers is not None:
for event_handler in self.event_handlers:
Expand Down

0 comments on commit 3f1f184

Please sign in to comment.