Skip to content
Merged
Changes from 1 commit
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
Next Next commit
Add docs link and remove unneeded type
  • Loading branch information
sgoedecke committed Jun 5, 2025
commit 0ae63f6cb71699485befeb894e687725cf2c0683
10 changes: 4 additions & 6 deletions cmd/eval/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ import (
"github.com/spf13/cobra"
)

// EvaluationPromptFile represents the structure of a prompt.yml file for evaluation
// It extends the base prompt.File with evaluation-specific fields
type EvaluationPromptFile = prompt.File

// TestResult represents the result of running a test case
type TestResult struct {
TestCase map[string]interface{} `json:"testCase"`
Expand Down Expand Up @@ -61,6 +57,8 @@ func NewEvalCommand(cfg *command.Config) *cobra.Command {
- name: contains-hello
string:
contains: "hello"

See https://docs.github.com/github-models/use-github-models/storing-prompts-in-github-repositories#supported-file-format for more information.
`),
Example: "gh models eval my_prompt.prompt.yml",
Args: cobra.ExactArgs(1),
Expand Down Expand Up @@ -90,10 +88,10 @@ func NewEvalCommand(cfg *command.Config) *cobra.Command {
type evalCommandHandler struct {
cfg *command.Config
client azuremodels.Client
evalFile *EvaluationPromptFile
evalFile *prompt.File
}

func loadEvaluationPromptFile(filePath string) (*EvaluationPromptFile, error) {
func loadEvaluationPromptFile(filePath string) (*prompt.File, error) {
evalFile, err := prompt.LoadFromFile(filePath)
if err != nil {
return nil, fmt.Errorf("failed to load prompt file: %w", err)
Expand Down