Skip to content

Commit 3f1f184

Browse files
committed
fix: ensure parent call frame is of category none
Signed-off-by: Donnie Adams <[email protected]>
1 parent d86fc7e commit 3f1f184

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gptscript/run.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import httpx
66

7-
from gptscript.frame import PromptFrame, RunFrame, CallFrame, RunState, RunEventType, Program
7+
from gptscript.frame import PromptFrame, RunFrame, CallFrame, RunState, RunEventType, Program, ToolCategory
88
from gptscript.opts import Options
99
from gptscript.tool import ToolDef, Tool
1010

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

0 commit comments

Comments
 (0)