MCPcopy Create free account

hub / github.com/docker/model-test / functions

Functions68 in github.com/docker/model-test

↓ 4 callersMethodgetOrCreateCart
getOrCreateCart gets an existing cart or creates a new one for the session
services/cart_service.go:115
↓ 3 callersMethodgetModelName
getModelName returns the model name to use for test results
services/test_runner.go:253
↓ 3 callersMethodupdateCartTotals
updateCartTotals recalculates the cart totals
services/cart_service.go:131
↓ 2 callersMethodGetCartSummary
GetCartSummary returns the current cart summary for the given session
services/cart_service.go:82
↓ 2 callersFunctionNewTestRunnerWithLogger
NewTestRunnerWithLogger creates a new test runner instance with logging
services/test_runner.go:30
↓ 2 callersFunctionanalyzeBatches
analyzeBatches analyzes all result files across multiple batch directories
cmd/analyze-batch/main.go:111
↓ 2 callersFunctionanalyzeModelWithSource
analyzeModelWithSource analyzes all result files for a single model with batch source info
cmd/analyze-batch/main.go:267
↓ 2 callersFunctioncalculateMetrics
calculateMetrics calculates precision, recall, and F1 from confusion matrix values
cmd/analyze-batch/main.go:456
↓ 2 callersMethodgetProductPrice
getProductPrice returns a mock price for a product
services/cart_service.go:191
↓ 2 callersMethodwriteLogEntry
writeLogEntry writes a log entry to the file
services/request_logger.go:100
↓ 1 callersMethodAddToCart
AddToCart adds a product to the cart for the given session
services/cart_service.go:24
↓ 1 callersMethodCheckoutCart
CheckoutCart processes checkout for the given session and clears the cart
services/cart_service.go:91
↓ 1 callersMethodClose
Close closes the log file
services/request_logger.go:120
↓ 1 callersMethodExecuteToolCalls
ExecuteToolCalls executes the tool calls from OpenAI
services/tool_executor.go:27
↓ 1 callersMethodGetToolDefinitions
GetToolDefinitions returns the tool definitions for OpenAI function calling
tools/shopping_tools.go:22
↓ 1 callersMethodInitializeCartForTest
InitializeCartForTest initializes the cart with predefined state for testing
services/openai_service.go:229
↓ 1 callersMethodInitializeCartState
InitializeCartState sets up the cart with predefined items for testing
services/cart_service.go:146
↓ 1 callersMethodLogError
LogError logs a failed request
services/request_logger.go:79
↓ 1 callersMethodLogRequest
LogRequest logs a successful request/response pair
services/request_logger.go:59
↓ 1 callersFunctionNewCartService
NewCartService creates a new cart service
services/cart_service.go:17
↓ 1 callersFunctionNewOpenAIServiceWithLogger
NewOpenAIServiceWithLogger creates a new OpenAI service instance with logging
services/openai_service.go:31
↓ 1 callersFunctionNewProductService
NewProductService creates a new product service with mock data
services/product_service.go:14
↓ 1 callersFunctionNewRequestLogger
NewRequestLogger creates a new request logger with the specified log file
services/request_logger.go:41
↓ 1 callersFunctionNewShoppingTools
NewShoppingTools creates a new instance of shopping tools
tools/shopping_tools.go:15
↓ 1 callersFunctionNewToolExecutor
NewToolExecutor creates a new tool executor
services/tool_executor.go:19
↓ 1 callersMethodProcessChatMessage
ProcessChatMessage processes a chat message with test case context for logging
services/openai_service.go:61
↓ 1 callersMethodRemoveFromCart
RemoveFromCart removes a product from the cart for the given session
services/cart_service.go:63
↓ 1 callersMethodRunAgentTestSuite
RunAgentTestSuite executes a test suite using the agent loop approach
services/test_runner.go:40
↓ 1 callersMethodSaveResults
SaveResults saves test results to a JSON file
services/test_runner.go:261
↓ 1 callersMethodSearchProducts
SearchProducts searches for products based on the provided filter
services/product_service.go:21
↓ 1 callersMethodbuildMessagesFromSession
buildMessagesFromSession converts chat session messages to OpenAI format
services/openai_service.go:181
↓ 1 callersFunctioncalculateAverageResponseTime
calculateAverageResponseTime calculates the average response time in seconds
cmd/analyze-batch/main.go:440
↓ 1 callersFunctioncalculateToolInvocationMetrics
calculateToolInvocationMetrics calculates binary tool invocation metrics
cmd/analyze-batch/main.go:318
↓ 1 callersFunctioncalculateToolSelectionMetrics
calculateToolSelectionMetrics calculates specific tool selection metrics
cmd/analyze-batch/main.go:347
↓ 1 callersMethodevaluateAgentResponse
evaluateAgentResponse checks if the agent response matches expected tool calls
services/test_runner.go:175
↓ 1 callersMethodexecuteToolCall
executeToolCall executes a single tool call
services/tool_executor.go:39
↓ 1 callersFunctionfindResultFiles
findResultFiles finds all agent test result files in the directory
cmd/analyze-batch/main.go:162
↓ 1 callersMethodgenerateSessionID
generateSessionID generates a random session ID
services/openai_service.go:234
↓ 1 callersFunctiongenerateSummary
generateSummary generates a summary of the analysis
cmd/analyze-batch/main.go:539
↓ 1 callersFunctiongenerateTextReport
generateTextReport generates a human-readable text report
cmd/analyze-batch/main.go:483
↓ 1 callersFunctiongetActualTools
getActualTools gets all actual tool names called
cmd/analyze-batch/main.go:402
↓ 1 callersFunctiongetExpectedTools
getExpectedTools gets all expected tools from all variants
cmd/analyze-batch/main.go:391
↓ 1 callersFunctiongetMockProducts
getMockProducts returns a list of mock products for testing
services/product_service.go:59
↓ 1 callersMethodgetSystemPrompt
getSystemPrompt returns the system prompt for the shopping assistant
services/openai_service.go:208
↓ 1 callersMethodgetToolDefinitions
getToolDefinitions returns the tool definitions for OpenAI function calling
services/openai_service.go:224
↓ 1 callersFunctiongroupFilesByModelWithSource
groupFilesByModelWithSource groups result files by model name and determines batch source
cmd/analyze-batch/main.go:211
↓ 1 callersMethodhandleAddToCart
handleAddToCart handles add to cart tool calls
services/tool_executor.go:115
↓ 1 callersMethodhandleCheckout
handleCheckout handles checkout tool calls
services/tool_executor.go:204
↓ 1 callersMethodhandleRemoveFromCart
handleRemoveFromCart handles remove from cart tool calls
services/tool_executor.go:156
↓ 1 callersMethodhandleSearchProducts
handleSearchProducts handles product search tool calls
services/tool_executor.go:67
↓ 1 callersMethodhandleViewCart
handleViewCart handles view cart tool calls
services/tool_executor.go:192
↓ 1 callersMethodisPathSuccessful
isPathSuccessful checks if actual tool calls match a specific expected path
services/test_runner.go:214
↓ 1 callersMethodisToolCallCorrect
isToolCallCorrect checks if an actual tool call matches an expected one
services/test_runner.go:231
↓ 1 callersFunctionloadResultFile
loadResultFile loads test results from a JSON file
cmd/analyze-batch/main.go:303
↓ 1 callersFunctionloadTestCases
loadTestCases loads test cases from a JSON file, optionally filtering by test case name
main.go:102
↓ 1 callersFunctionmatchesAnyVariant
matchesAnyVariant checks if actual tools match any expected variant
cmd/analyze-batch/main.go:415
↓ 1 callersFunctionmatchesVariant
matchesVariant checks if actual tools match a specific variant
cmd/analyze-batch/main.go:425
↓ 1 callersMethodparseArguments
parseArguments parses the arguments string into a map
services/test_runner.go:201
↓ 1 callersFunctionprintAgentSummary
printAgentSummary prints a summary of the agent test results
main.go:136
↓ 1 callersMethodrunAgentTest
runAgentTest executes a single test case using the agent loop
services/test_runner.go:116
↓ 1 callersFunctionsanitizeModelName
sanitizeModelName sanitizes the model name for use in filenames
main.go:220
↓ 1 callersFunctionshouldCallAnyTool
shouldCallAnyTool determines if any tool should be called for a test case
cmd/analyze-batch/main.go:381
FunctionNewTestRunner
NewTestRunner creates a new test runner instance
services/test_runner.go:25
FunctionanalyzeBatch
analyzeBatch analyzes all result files in a batch directory
cmd/analyze-batch/main.go:157
FunctionanalyzeModel
analyzeModel analyzes all result files for a single model
cmd/analyze-batch/main.go:262
FunctiongroupFilesByModel
groupFilesByModel groups result files by model name
cmd/analyze-batch/main.go:180
Functionmain
()
main.go:17
Functionmain
()
cmd/analyze-batch/main.go:50