File tree Expand file tree Collapse file tree 1 file changed +0
-6
lines changed
packages/core/src/utils/anthropic-ai Expand file tree Collapse file tree 1 file changed +0
-6
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ import type { AnthropicAiStreamingEvent } from './types';
16
16
*/
17
17
18
18
interface StreamingState {
19
- /** Types of events encountered in the stream. */
20
- eventTypes : string [ ] ;
21
19
/** Collected response text fragments (for output recording). */
22
20
responseTexts : string [ ] ;
23
21
/** Reasons for finishing the response, as reported by the API. */
@@ -52,8 +50,6 @@ function isErrorEvent(
52
50
span : Span ,
53
51
) : boolean {
54
52
if ( 'type' in event && typeof event . type === 'string' ) {
55
- state . eventTypes . push ( event . type ) ;
56
-
57
53
// If the event is an error, set the span status and capture the error
58
54
// These error events are not rejected by the API by default, but are sent as metadata of the response
59
55
if ( event . type === 'error' ) {
@@ -129,7 +125,6 @@ function processEvent(
129
125
span : Span ,
130
126
) : void {
131
127
if ( ! ( event && typeof event === 'object' ) ) {
132
- state . eventTypes . push ( 'unknown:non-object' ) ;
133
128
return ;
134
129
}
135
130
@@ -150,7 +145,6 @@ export async function* instrumentStream(
150
145
recordOutputs : boolean ,
151
146
) : AsyncGenerator < AnthropicAiStreamingEvent , void , unknown > {
152
147
const state : StreamingState = {
153
- eventTypes : [ ] ,
154
148
responseTexts : [ ] ,
155
149
finishReasons : [ ] ,
156
150
responseId : '' ,
You can’t perform that action at this time.
0 commit comments