diff --git a/plugins/openai/oaieval.go b/plugins/openai/oaieval.go new file mode 100644 index 000000000..bfb6acf3f --- /dev/null +++ b/plugins/openai/oaieval.go @@ -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 OpenAIEvalsCLI() schema.Executable { + return schema.Executable{ + Name: "OpenAI Evals CLI", + Runs: []string{"oaieval"}, + DocsURL: sdk.URL("https://github.com/openai/evals/blob/main/docs/run-evals.md"), + NeedsAuth: needsauth.IfAll( + needsauth.NotForHelpOrVersion(), + needsauth.NotWithoutArgs(), + ), + Uses: []schema.CredentialUsage{ + { + Name: credname.APIKey, + }, + }, + } +} diff --git a/plugins/openai/oaievalset.go b/plugins/openai/oaievalset.go new file mode 100644 index 000000000..32e22f3db --- /dev/null +++ b/plugins/openai/oaievalset.go @@ -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/docs/run-evals.md"), + NeedsAuth: needsauth.IfAll( + needsauth.NotForHelpOrVersion(), + needsauth.NotWithoutArgs(), + ), + Uses: []schema.CredentialUsage{ + { + Name: credname.APIKey, + }, + }, + } +} diff --git a/plugins/openai/plugin.go b/plugins/openai/plugin.go index 297e1345f..17caee4e1 100644 --- a/plugins/openai/plugin.go +++ b/plugins/openai/plugin.go @@ -17,6 +17,8 @@ func New() schema.Plugin { }, Executables: []schema.Executable{ OpenAICLI(), + OpenAIEvalsCLI(), + OpenAIEvalSetCLI(), }, } }