Endpoints
Fetch Experiment Logs
Endpoints
Fetch Experiment Logs
Fetches experiment trace logs
POST
/
api
/
parea
/
v1
/
experiment
/
{experiment_uuid}
/
trace_logs
p = Parea(api_key="PAREA_API_KEY") # replace with your API key
trace_logs = p.get_experiment_trace_logs(
"experiment_uuid", # replace with experiment UUID
TraceLogFilters(
filter_field='is_correct',
filter_operator=FilterOperator.EQUALS,
filter_value="1.0"
)
)
[
{
configuration: {
model: null,
provider: null,
model_params: null,
messages: [ [Object] ],
functions: null,
function_call: null
},
inputs: { name: 'Bar' },
output: 'Hello! How can I assist you today?',
target: 'Hello Bar',
latency: 0.721968,
time_to_first_token: null,
input_tokens: 2,
output_tokens: 9,
total_tokens: 11,
cost: 0.00002,
trace_id: '94d6cf08-3b8a-4084-bba3-7a2960cc5b8d',
start_timestamp: '2024-04-15T22:19:13.381503+00:00',
parent_trace_id: '94d6cf08-3b8a-4084-bba3-7a2960cc5b8d',
root_trace_id: '94d6cf08-3b8a-4084-bba3-7a2960cc5b8d',
organization_id: '...',
project_uuid: '...',
error: null,
status: 'success',
deployment_id: null,
cache_hit: false,
output_for_eval_metrics: null,
evaluation_metric_names: null,
scores: [
{
name: 'levenshtein',
score: 0.205882,
evaluation_metric_id: null,
reason: null
}
],
feedback_score: null,
apply_eval_frac: 1,
trace_name: 'greeting',
children: [ 'c8463d31-a9cf-4e74-9e40-d638b2f731da' ],
children_ids: [ 15075 ],
end_timestamp: '2024-04-15T22:19:14.103471+00:00',
end_user_identifier: null,
session_id: null,
metadata: null,
tags: null,
experiment_uuid: '...',
images: [],
comments: null,
annotations: null,
evaluation_metric_ids: null,
}
]
Body
filter_field
string
Field of the log to filter on.
filter_operator
string
Operator to use for filtering. One of: equals
, not_equals
, like
, greater_than_or_equal
, less_than_or_equal
, greater_than
, less_than
, is_null
, exists
, in
.
filter_value
string
Value to filter on.
Was this page helpful?
p = Parea(api_key="PAREA_API_KEY") # replace with your API key
trace_logs = p.get_experiment_trace_logs(
"experiment_uuid", # replace with experiment UUID
TraceLogFilters(
filter_field='is_correct',
filter_operator=FilterOperator.EQUALS,
filter_value="1.0"
)
)
[
{
configuration: {
model: null,
provider: null,
model_params: null,
messages: [ [Object] ],
functions: null,
function_call: null
},
inputs: { name: 'Bar' },
output: 'Hello! How can I assist you today?',
target: 'Hello Bar',
latency: 0.721968,
time_to_first_token: null,
input_tokens: 2,
output_tokens: 9,
total_tokens: 11,
cost: 0.00002,
trace_id: '94d6cf08-3b8a-4084-bba3-7a2960cc5b8d',
start_timestamp: '2024-04-15T22:19:13.381503+00:00',
parent_trace_id: '94d6cf08-3b8a-4084-bba3-7a2960cc5b8d',
root_trace_id: '94d6cf08-3b8a-4084-bba3-7a2960cc5b8d',
organization_id: '...',
project_uuid: '...',
error: null,
status: 'success',
deployment_id: null,
cache_hit: false,
output_for_eval_metrics: null,
evaluation_metric_names: null,
scores: [
{
name: 'levenshtein',
score: 0.205882,
evaluation_metric_id: null,
reason: null
}
],
feedback_score: null,
apply_eval_frac: 1,
trace_name: 'greeting',
children: [ 'c8463d31-a9cf-4e74-9e40-d638b2f731da' ],
children_ids: [ 15075 ],
end_timestamp: '2024-04-15T22:19:14.103471+00:00',
end_user_identifier: null,
session_id: null,
metadata: null,
tags: null,
experiment_uuid: '...',
images: [],
comments: null,
annotations: null,
evaluation_metric_ids: null,
}
]