Skip to content

Commit

Permalink
Merge pull request #48 from thedadams/remove-list-tools
Browse files Browse the repository at this point in the history
chore: remote list_tools
  • Loading branch information
thedadams authored Aug 30, 2024
2 parents fa26c2f + eefd71d commit 404e44f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,6 @@ Aside from the list methods there are `exec` and `exec_file` methods that allow
responses. Those functions also provide a streaming version of execution if you want to process the output streams in
your code as the tool is running.

### `list_tools()`

This function lists the available tools.

```python
from gptscript.gptscript import GPTScript


async def list_tools():
gptscript = GPTScript()
tools = await gptscript.list_tools()
print(tools)
gptscript.close()
```

### `list_models()`

This function lists the available GPT models.
Expand Down
3 changes: 0 additions & 3 deletions gptscript/gptscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,6 @@ async def _run_basic_command(self, sub_command: str, request_body: Any = None):
async def version(self) -> str:
return await self._run_basic_command("version")

async def list_tools(self) -> str:
return await self._run_basic_command("list-tools")

async def list_models(self, providers: list[str] = None, credential_overrides: list[str] = None) -> list[str]:
if self.opts.DefaultModelProvider != "":
if providers is None:
Expand Down
6 changes: 0 additions & 6 deletions tests/test_gptscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,6 @@ async def test_list_models_from_default_provider():
g.close()


@pytest.mark.asyncio
async def test_list_tools(gptscript):
out = await gptscript.list_tools()
assert out is not None, "Expected some output from list_tools"


@pytest.mark.asyncio
async def test_abort_run(gptscript):
async def abort_run(run: Run, e: CallFrame | RunFrame | PromptFrame):
Expand Down

0 comments on commit 404e44f

Please sign in to comment.