trulens.core.schema.base¶
trulens.core.schema.base
¶
Common/shared serializable classes.
Attributes¶
MAX_DILL_SIZE
module-attribute
¶
MAX_DILL_SIZE: int = 1024 * 1024
Max size in bytes of pickled objects.
Classes¶
Cost
¶
Bases: SerialModel
, BaseModel
Costs associated with some call or set of calls.
Attributes¶
n_successful_requests
class-attribute
instance-attribute
¶
n_successful_requests: int = 0
Number of successful requests.
n_completion_requests
class-attribute
instance-attribute
¶
n_completion_requests: int = 0
Number of completion requests.
n_classification_requests
class-attribute
instance-attribute
¶
n_classification_requests: int = 0
Number of classification requests.
n_embedding_requests
class-attribute
instance-attribute
¶
n_embedding_requests: int = 0
Number of embedding requests.
n_embeddings
class-attribute
instance-attribute
¶
n_embeddings: int = 0
Number of embeddings retrieved.
n_stream_chunks
class-attribute
instance-attribute
¶
n_stream_chunks: int = 0
In streaming mode, number of chunks produced.
n_prompt_tokens
class-attribute
instance-attribute
¶
n_prompt_tokens: int = 0
Number of prompt tokens supplied.
n_completion_tokens
class-attribute
instance-attribute
¶
n_completion_tokens: int = 0
Number of completion tokens generated.
n_cortex_guardrails_tokens
class-attribute
instance-attribute
¶
n_cortex_guardrails_tokens: int = 0
Number of guardrails tokens generated. i.e. available in Cortex endpoint.
Functions¶
Perf
¶
Bases: SerialModel
, BaseModel
Performance information.
Presently only the start and end times, and thus latency.
Attributes¶
start_ns_timestamp
property
¶
start_ns_timestamp: int
EXPERIMENTAL: otel-tracing
Start time in number of nanoseconds since the epoch.
end_ns_timestamp
property
¶
end_ns_timestamp: int
EXPERIMENTAL: otel-tracing
End time in number of nanoseconds since the epoch.