Skip to content

Commit

Permalink
chore: make workspace ID required when deleting a workspace
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Oct 28, 2024
1 parent b9b481e commit c3d4ba7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions gptscript/gptscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ async def create_workspace(self, provider_type: str, from_workspaces: list[str]
}
)

async def delete_workspace(self, workspace_id: str = ""):
async def delete_workspace(self, workspace_id: str):
if workspace_id == "":
workspace_id = os.environ["GPTSCRIPT_WORKSPACE_ID"]
raise ValueError("workspace_id cannot be empty")

await self._run_basic_command(
"workspaces/delete",
Expand Down
6 changes: 3 additions & 3 deletions tests/test_gptscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ def gptscript():


# Simple tool for testing
@pytest.fixture
@pytest.fixture(scope="function")
def simple_tool():
return ToolDef(
instructions="What is the capital of the united states?"
)


# Complex tool for testing
@pytest.fixture
@pytest.fixture(scope="function")
def complex_tool():
return ToolDef(
jsonResponse=True,
Expand All @@ -68,7 +68,7 @@ def complex_tool():


# Fixture for a list of tools
@pytest.fixture
@pytest.fixture(scope="function")
def tool_list():
shebang = "#!/bin/bash"
if platform.system().lower() == "windows":
Expand Down

0 comments on commit c3d4ba7

Please sign in to comment.