Class: Anthropic::Internal::TracedStream Private
- Inherits:
-
Object
- Object
- Anthropic::Internal::TracedStream
- Includes:
- Anthropic::Internal::Type::BaseStream
- Defined in:
- lib/anthropic/internal/tracing.rb,
sig/anthropic/internal/tracing.rbs
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
What a streaming method returns when its API call has a recording span. Reading or closing it reads or closes the SDK's own stream, and ends the span.
Instance Attribute Summary collapse
-
#streamed_message ⇒ Object?
readonly
private
What a recorder that follows this stream has read of it.
Attributes included from Anthropic::Internal::Type::BaseStream
Instance Method Summary collapse
-
#initialize(stream, iterator, streamed_message) ⇒ TracedStream
constructor
private
A new instance of TracedStream.
Methods included from Anthropic::Internal::Type::BaseStream
#close, #each, #inspect, #request_id, #to_enum, #workspace_id
Constructor Details
#initialize(stream, iterator, streamed_message) ⇒ TracedStream
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of TracedStream.
25 26 27 28 29 30 31 |
# File 'lib/anthropic/internal/tracing.rb', line 25 def initialize(stream, iterator, ) @model = stream.instance_variable_get(:@model) @status = stream.status @headers = stream.headers @iterator = iterator @streamed_message = end |
Instance Attribute Details
#streamed_message ⇒ Object? (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
What a recorder that follows this stream has read of it.
16 17 18 |
# File 'lib/anthropic/internal/tracing.rb', line 16 def @streamed_message end |