Skip to content

chore: remote list_tools #48

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

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
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
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