Skip to content

Commit

Permalink
chore: remove ListTools
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <donnie@acorn.io>
  • Loading branch information
thedadams committed Aug 30, 2024
1 parent b51e30e commit 14735f9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 47 deletions.
26 changes: 0 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,32 +47,6 @@ As noted above, the Global Options are also available to specify here. These opt

## Functions

### listTools

Lists all the available built-in tools.

**Usage:**

```go
package main

import (
"context"

"github.com/gptscript-ai/go-gptscript"
)

func listTools(ctx context.Context) (string, error) {
g, err := gptscript.NewGPTScript(gptscript.GlobalOptions{})
if err != nil {
return "", err
}
defer g.Close()

return g.ListTools(ctx)
}
```

### listModels

Lists all the available models, returns a list.
Expand Down
10 changes: 0 additions & 10 deletions gptscript.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,16 +268,6 @@ func (g *GPTScript) Version(ctx context.Context) (string, error) {
return out, nil
}

// ListTools will list all the available tools.
func (g *GPTScript) ListTools(ctx context.Context) (string, error) {
out, err := g.runBasicCommand(ctx, "list-tools", nil)
if err != nil {
return "", err
}

return out, nil
}

type ListModelsOptions struct {
Providers []string
CredentialOverrides []string
Expand Down
11 changes: 0 additions & 11 deletions gptscript_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,6 @@ func TestVersion(t *testing.T) {
}
}

func TestListTools(t *testing.T) {
tools, err := g.ListTools(context.Background())
if err != nil {
t.Errorf("Error listing tools: %v", err)
}

if len(tools) == 0 {
t.Error("No tools found")
}
}

func TestListModels(t *testing.T) {
models, err := g.ListModels(context.Background())
if err != nil {
Expand Down

0 comments on commit 14735f9

Please sign in to comment.