Skip to content

Commit

Permalink
Support oaievalset as another executable within the openai shell plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
arunsathiya committed Apr 24, 2023
1 parent 1df1633 commit 3dc5674
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions plugins/openai/oaievalset.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package openai

import (
"github.com/1Password/shell-plugins/sdk"
"github.com/1Password/shell-plugins/sdk/needsauth"
"github.com/1Password/shell-plugins/sdk/schema"
"github.com/1Password/shell-plugins/sdk/schema/credname"
)

func OpenAIEvalSetCLI() schema.Executable {
return schema.Executable{
Name: "OpenAI Eval Set CLI",
Runs: []string{"oaievalset"},
DocsURL: sdk.URL("https://github.com/openai/evals/blob/main/README.md"),
NeedsAuth: needsauth.IfAll(
needsauth.NotForHelpOrVersion(),
needsauth.NotWithoutArgs(),
),
Uses: []schema.CredentialUsage{
{
Name: credname.APIKey,
},
},
}
}
1 change: 1 addition & 0 deletions plugins/openai/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func New() schema.Plugin {
Executables: []schema.Executable{
OpenAICLI(),
OpenAIEvalsCLI(),
OpenAIEvalSetCLI(),
},
}
}

0 comments on commit 3dc5674

Please sign in to comment.