File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
dev-packages/browser-integration-tests/suites/tracing/ai-providers Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,12 @@ const client = Sentry.instrumentAnthropicAiClient(mockClient);
9
9
10
10
// Test that manual instrumentation doesn't crash the browser
11
11
// The instrumentation automatically creates spans
12
- await client . messages . create ( {
12
+ const response = await client . messages . create ( {
13
13
model : 'claude-3-haiku-20240307' ,
14
14
messages : [ { role : 'user' , content : 'What is the capital of France?' } ] ,
15
15
temperature : 0.7 ,
16
16
max_tokens : 100 ,
17
17
} ) ;
18
+
19
+ // eslint-disable-next-line no-console
20
+ console . log ( JSON . stringify ( response ) ) ;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const client = Sentry.instrumentOpenAiClient(mockClient);
9
9
10
10
// Test that manual instrumentation doesn't crash the browser
11
11
// The instrumentation automatically creates spans
12
- await client . chat . completions . create ( {
12
+ const response = await client . chat . completions . create ( {
13
13
model : 'gpt-3.5-turbo' ,
14
14
messages : [
15
15
{ role : 'system' , content : 'You are a helpful assistant.' } ,
@@ -18,3 +18,9 @@ await client.chat.completions.create({
18
18
temperature : 0.7 ,
19
19
max_tokens : 100 ,
20
20
} ) ;
21
+
22
+ // eslint-disable-next-line no-console
23
+ console . log ( JSON . stringify ( response ) ) ;
24
+
25
+
26
+
You can’t perform that action at this time.
0 commit comments