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: ensure parent call frame is of category none #65

Merged
merged 1 commit into from
Nov 2, 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: 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