Skip to content

Commit

Permalink
fix query
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrandaws committed Mar 14, 2024
1 parent e3ba8cf commit 02b5e42
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/cdk/lib/dashboard-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,11 @@ export class DashboardStack extends Stack {
logGroupNames: [logGroup.logGroupName],
view: cw.LogQueryVisualizationType.TABLE,
queryLines: [
"filter @logStream = 'aws/bedrock/modelinvocations'",
'filter input.inputBodyJson.prompt like /Human: .*/',
'filter input.inputBodyJson.prompt not like /Human: <conversation>.*/',
'fields @timestamp, input.inputBodyJson.prompt',
'filter @logStream = \'aws/bedrock/modelinvocations\'',
'filter schemaType like \'ModelInvocationLog\'',
'filter concat(input.inputBodyJson.prompt, input.inputBodyJson.messages.0.content.0.text) not like /.*<conversation>.*/',
'sort @timestamp desc',
'fields @timestamp, concat(input.inputBodyJson.prompt, input.inputBodyJson.messages.0.content.0.text) as input, modelId',
],
})
);
Expand Down

0 comments on commit 02b5e42

Please sign in to comment.