Crate braintrust_sdk_rust

Crate braintrust_sdk_rust 

Source

Structs§

BraintrustClient
BraintrustClientBuilder
Builder for creating a BraintrustClient with configuration.
BraintrustStream
A stream aggregator that collects streaming chunks and produces a final value.
ChatMessage
A chat message in the output.
CompletionTokensDetails
FinalizedStream
Aggregated result from a streaming response.
FunctionCall
Function details in a tool call.
InvalidSpanObjectType
Error returned when an invalid u8 value is converted to SpanObjectType.
LoginState
Logged-in state containing API key and org info.
OrgInfo
Organization info returned from login.
OutputChoice
A choice in the output array (matches OpenAI response format).
PromptTokensDetails
SpanBuilder
SpanHandle
SpanLog
Event data to log to a span. All fields are optional. Multiple calls to log() will merge data.
StreamMetadata
Stream metadata with typed known fields and passthrough for extras.
ToolCall
A tool call in a chat message.
Usage
Usage statistics that can deserialize from both OpenAI and Anthropic formats.
UsageMetrics

Enums§

BraintrustError
ParentSpanInfo
SpanObjectType
The type of span object, serialized as its integer representation for wire compatibility.
SpanType
The type of span.

Functions§

extract_anthropic_usage
extract_openai_usage
wrap_stream_with_span
Wrap a stream with span logging.

Type Aliases§

Result