Skip to content

Commit

Permalink
Add disabled to recording modes
Browse files Browse the repository at this point in the history
  • Loading branch information
janhartman committed Jan 9, 2025
1 parent 18e8e5b commit f811e9d
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions agent/src/cli/command-bench/command-bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,19 +336,27 @@ export const benchCommand = new commander.Command('bench')
},
})

const recordingMode =
process.env.CODY_RECORDING_MODE === 'passthrough' ? 'passthrough' : 'replay'
const recordingMode = (() => {
switch (process.env.CODY_RECORDING_MODE) {
case 'passthrough':
return 'passthrough'
case 'disabled':
return 'disabled'
default:
return 'replay'
}
})()
const recordingDirectory = path.join(path.dirname(options.evaluationConfig), 'recordings')
const polly =
recordingMode === 'replay'
? startPollyRecording({
recordingMode === 'disabled'
? null
: startPollyRecording({
recordingName: 'cody-bench',
recordingMode: recordingMode,
recordIfMissing: true,
recordingDirectory,
keepUnusedRecordings: true,
})
: null

try {
await Promise.all(
Expand Down

0 comments on commit f811e9d

Please sign in to comment.