File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed
src/langtrace_python_sdk/utils Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -327,20 +327,6 @@ async def __anext__(self):
327327 self .cleanup ()
328328 raise StopAsyncIteration
329329
330- def process_anthropic_chunk (self , chunk ):
331- if hasattr (chunk , "message" ) and chunk .message is not None :
332- if self ._response_model is None :
333- self ._response_model = chunk .message .model
334-
335- self .prompt_tokens = chunk .message .usage .input_tokens
336-
337- if hasattr (chunk , "usage" ) and chunk .usage is not None :
338- self .completion_tokens = chunk .usage .output_tokens
339-
340- if hasattr (chunk , "delta" ):
341- if hasattr (chunk .delta , "text" ) and chunk .delta .text is not None :
342- self .build_streaming_response (chunk .delta .text )
343-
344330 def set_response_model (self , chunk ):
345331 if self ._response_model :
346332 return
@@ -416,10 +402,6 @@ def set_usage_attributes(self, chunk):
416402 self .prompt_tokens = chunk .usage_metadata .prompt_token_count
417403
418404 def process_chunk (self , chunk ):
419-
420- # 2. We save the completion text from the chunk
421- # 3. We save the prompt + completions tokens from the chunk
422-
423405 self .set_response_model (chunk = chunk )
424406 self .build_streaming_response (chunk = chunk )
425407 self .set_usage_attributes (chunk = chunk )
You can’t perform that action at this time.
0 commit comments