Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AgentEvaluation/NHD
/ functions
Functions
247 in github.com/AgentEvaluation/NHD
⨍
Functions
247
◇
Types & classes
130
↓ 77 callers
Function
cn
(...inputs: ClassValue[])
src/lib/utils.ts:5
↓ 19 callers
Function
withApiHandler
(handler: ApiHandler<T>)
src/lib/api-utils.ts:25
↓ 17 callers
Method
get
* Make a GET request
src/lib/api-client.ts:73
↓ 16 callers
Function
useErrorContext
()
src/hooks/useErrorContext.ts:60
↓ 6 callers
Method
createLangchainModel
(modelId: string, apiKey: string, extraParams: Record<string, any> = {})
src/services/llm/modelfactory.ts:8
↓ 6 callers
Method
getSelectedModelConfig
()
src/services/llm/modelfactory.ts:53
↓ 6 callers
Function
logError
(error: unknown, context?: string)
src/lib/errors.ts:100
↓ 5 callers
Function
dispatch
(action: Action)
src/hooks/use-toast.tsx:133
↓ 5 callers
Method
getPersonaMappingByAgentId
(agentId: string)
src/services/db/personaMappingService.ts:4
↓ 5 callers
Method
loadMemoryVariables
()
src/lib/langchain/memory/conversationMemory.ts:26
↓ 4 callers
Function
getPersonaName
(personaId: string)
src/services/db/testRunService.ts:18
↓ 4 callers
Function
handleErrorResponse
* Handles error responses from fetch calls
src/lib/api-client.ts:50
↓ 4 callers
Method
saveConversationMessage
(message: { id: string; conversationId: string; role: string; content: string
src/services/db/conversationService.ts:5
↓ 3 callers
Method
clear
()
src/lib/langchain/memory/conversationMemory.ts:46
↓ 3 callers
Function
deleteTestCases
(idsToDelete: string[])
src/components/tools/TestCaseVariations.tsx:189
↓ 3 callers
Method
extractChatResponse
* Extract chat response from API response using rule configuration * Made more robust to handle different response structures
src/services/agents/claude/conversationHandler.ts:58
↓ 3 callers
Method
formatConversationHistory
* Format conversation history into a string * Useful for prompts that need formatted history
src/services/agents/claude/conversationHandler.ts:138
↓ 3 callers
Function
formatErrorResponse
(error: unknown)
src/lib/errors.ts:73
↓ 3 callers
Method
formatInput
(message: string, inputFormat: Record<string, any>)
src/services/agents/claude/apiHandler.ts:27
↓ 3 callers
Method
getAgentConfigAll
(id: string)
src/services/db/agentConfigService.ts:53
↓ 3 callers
Function
safeValidateRequest
(schema: z.ZodSchema<T>, data: unknown)
src/lib/validations/api.ts:83
↓ 3 callers
Method
saveContext
( inputValues: { input: string }, outputValues: { output: string } )
src/lib/langchain/memory/conversationMemory.ts:36
↓ 2 callers
Function
addToRemoveQueue
(toastId: string)
src/hooks/use-toast.tsx:58
↓ 2 callers
Method
callEndpoint
( endpointUrl: string, headers: Record<string, string>, input: Record<string, any>, si
src/services/agents/claude/apiHandler.ts:2
↓ 2 callers
Method
createTestVariation
(variation: TestVariation)
src/services/db/testService.ts:27
↓ 2 callers
Method
delete
* Make a DELETE request
src/lib/api-client.ts:153
↓ 2 callers
Method
extractUserMessage
* Extract just the user message from the model output * Removes any control signals or formatting
src/services/agents/claude/qaAgent.ts:166
↓ 2 callers
Method
getTestVariations
(testId: string)
src/services/db/testService.ts:5
↓ 2 callers
Function
getTimeColor
(ms: number)
src/components/tools/ResponseTime.tsx:9
↓ 2 callers
Method
getUserModelConfigs
()
src/services/llm/modelfactory.ts:36
↓ 2 callers
Function
handlePersonaSelect
(personaId: string)
src/components/tools/personaSelector.tsx:64
↓ 2 callers
Method
processTurn
(message: string, chatId: string)
src/services/agents/claude/qaAgent.ts:186
↓ 2 callers
Function
renderJsonTree
(obj: any, path: string = '', level: number = 0, isInputSelection: boolean = false)
src/components/tools/AgentConfigWizard.tsx:127
↓ 2 callers
Method
safeJsonParse
(str: string)
src/services/db/agentConfigService.ts:224
↓ 2 callers
Method
saveAgentConfig
(config: { id?: string; name: string; endpoint: string; headers: Record<string, string>; a
src/services/db/agentConfigService.ts:100
↓ 2 callers
Function
startEditing
(testCase: TestCase)
src/components/tools/TestCaseVariations.tsx:213
↓ 2 callers
Function
updateHeader
(index: number, field: "key" | "value", value: string)
src/components/tools/AgentSetup.tsx:45
↓ 2 callers
Function
updateRule
(index: number, updates: Partial<Rule>)
src/components/tools/AgentRules.tsx:39
↓ 2 callers
Method
updateTestConversationStatus
( conversationId: string, status: string, errorMessage?: string, validationResult?: { isCorr
src/services/db/testRunService.ts:281
↓ 2 callers
Function
validateAndProcessData
(data: any[])
src/components/tools/ScenarioFileUpload.tsx:124
↓ 2 callers
Method
validateFullConversation
* Validate a conversation without running a new test * Used for evaluating existing conversations
src/services/agents/claude/qaAgent.ts:410
↓ 1 callers
Function
addRule
(path = "")
src/components/tools/AgentRules.tsx:24
↓ 1 callers
Function
addRun
(newRun: TestRun)
src/hooks/useTestRuns.ts:30
↓ 1 callers
Function
checkRules
(response: any)
src/components/tools/AgentRules.tsx:45
↓ 1 callers
Function
createErrorFromResponse
* Creates a typed error based on HTTP status code
src/lib/api-client.ts:31
↓ 1 callers
Method
createPersonaMapping
(agentId: string, personaId: string)
src/services/db/personaMappingService.ts:16
↓ 1 callers
Method
createTestConversation
(data: { runId: string; scenarioId: string; personaId: string; status: string;
src/services/db/conversationService.ts:54
↓ 1 callers
Method
createTestRun
(run: TestRun)
src/services/db/testRunService.ts:118
↓ 1 callers
Method
deleteAgentConfig
(configId: string)
src/services/db/agentConfigService.ts:233
↓ 1 callers
Method
deletePersonaMapping
(agentId: string, personaId: string)
src/services/db/personaMappingService.ts:48
↓ 1 callers
Method
deleteTestScenarios
(testId: string, scenarioIds: string[])
src/services/db/testService.ts:80
↓ 1 callers
Method
detectHallucination
( context: string, query: string, response: string )
src/services/metrics/hallucinationDetector.ts:57
↓ 1 callers
Function
dismiss
()
src/hooks/use-toast.tsx:150
↓ 1 callers
Function
executeTest
(testId: string)
src/hooks/useTestExecution.ts:41
↓ 1 callers
Function
extractJSON
(text: string)
src/app/api/tools/generate-tests/route.ts:10
↓ 1 callers
Function
fetchMapping
()
src/components/tools/personaSelector.tsx:50
↓ 1 callers
Function
fetchPersonas
()
src/components/tools/personaSelector.tsx:32
↓ 1 callers
Function
fetchSavedTests
()
src/app/tools/test-cases/page.tsx:77
↓ 1 callers
Function
genId
()
src/hooks/use-toast.tsx:27
↓ 1 callers
Method
generateInitialMessage
(scenario: string, expectedOutput: string)
src/services/agents/claude/qaAgent.ts:85
↓ 1 callers
Method
generateNextMessage
* Generate subsequent messages for the conversation * Responds as a human user would to the AI's previous message
src/services/agents/claude/qaAgent.ts:120
↓ 1 callers
Method
getAllAgentConfigs
()
src/services/db/agentConfigService.ts:5
↓ 1 callers
Method
getAllTestRuns
(limit: number = 20, offset: number = 0)
src/services/db/testRunService.ts:23
↓ 1 callers
Function
getConditionDisplayName
(condition: string)
src/components/tools/AgentRules.tsx:144
↓ 1 callers
Method
getConversationMessages
(conversationId: string)
src/services/db/conversationService.ts:78
↓ 1 callers
Function
getCriticalityColor
(metricName: string)
src/components/tools/test-runs/MetricsView.tsx:64
↓ 1 callers
Function
getIcon
()
src/components/config/WarningDialog.tsx:42
↓ 1 callers
Function
getJsonPath
(obj: any, key: string, line: string)
src/components/tools/AgentResponse.tsx:115
↓ 1 callers
Method
getLLMHeaders
* Generate LLM model API headers
src/lib/api-client.ts:180
↓ 1 callers
Function
getMetricIcon
(score: number)
src/components/tools/test-runs/MetricsView.tsx:56
↓ 1 callers
Method
getMetricsForAgent
(agentId: string)
src/services/db/metricsService.ts:32
↓ 1 callers
Method
getPersonaById
(personaId: string)
src/services/db/personaService.ts:72
↓ 1 callers
Method
getPersonas
()
src/services/db/personaService.ts:67
↓ 1 callers
Function
getResponseTimeLevel
(time: number)
src/components/tools/metrics/MetricsPanel.tsx:26
↓ 1 callers
Function
getStatusIcon
(status: string)
src/components/tools/test-runs/RunsList.tsx:96
↓ 1 callers
Function
getStatusIcon
()
src/components/tools/test-runs/RunDetail.tsx:87
↓ 1 callers
Function
getStatusVariant
(status: string)
src/components/tools/test-runs/RunsList.tsx:109
↓ 1 callers
Function
getValueByPath
(obj: any, path: string)
src/components/tools/AgentRules.tsx:96
↓ 1 callers
Function
getValueFromPath
(obj: any, path: string)
src/components/tools/AgentResponse.tsx:138
↓ 1 callers
Function
getValueFromPath
(obj: any, path: string)
src/components/tools/AgentConfigWizard.tsx:71
↓ 1 callers
Function
getVariant
()
src/components/common/ErrorDisplay.tsx:34
↓ 1 callers
Function
handleCaseSelect
(test: AgentConfig)
src/app/tools/test-cases/page.tsx:95
↓ 1 callers
Function
handleDeleteConfig
(id: string)
src/components/config/ApiKeyConfig.tsx:103
↓ 1 callers
Function
handleError
(event: ErrorEvent)
src/components/common/ErrorBoundary.tsx:101
↓ 1 callers
Function
handleLoadAgent
(agentId: string)
src/app/tools/page.tsx:25
↓ 1 callers
Function
handleSelectModel
(modelId: string)
src/components/config/ApiKeyConfig.tsx:94
↓ 1 callers
Function
loadConfigs
()
src/hooks/useTestExecution.ts:23
↓ 1 callers
Method
loadPersona
* Load persona information and update prompt accordingly * Called early in the test process to ensure persona integration
src/services/agents/claude/qaAgent.ts:66
↓ 1 callers
Function
loadRuns
(signal?: AbortSignal)
src/hooks/useTestRuns.ts:19
↓ 1 callers
Method
post
* Make a POST request
src/lib/api-client.ts:99
↓ 1 callers
Function
processCSV
(file: File)
src/components/tools/ScenarioFileUpload.tsx:78
↓ 1 callers
Function
processExcel
(file: File)
src/components/tools/ScenarioFileUpload.tsx:93
↓ 1 callers
Function
reducer
(state: State, action: Action)
src/hooks/use-toast.tsx:74
↓ 1 callers
Function
removeHeader
(index: number)
src/components/tools/AgentSetup.tsx:37
↓ 1 callers
Function
removeRule
(index: number)
src/components/tools/AgentRules.tsx:35
↓ 1 callers
Function
renderObject
(obj: any, path = "")
src/components/tools/AgentRules.tsx:100
↓ 1 callers
Function
renderStepContent
()
src/components/tools/AgentConfigWizard.tsx:175
↓ 1 callers
Function
resetForm
()
src/components/config/ApiKeyConfig.tsx:123
↓ 1 callers
Function
resetState
()
src/components/tools/ScenarioFileUpload.tsx:32
↓ 1 callers
Method
runTest
(scenario: string, expectedOutput: string)
src/services/agents/claude/qaAgent.ts:304
next →
1–100 of 247, ranked by callers