Download OpenAPI specification:Download
{- "version": "string",
- "whylogs_logger_status": {
- "property1": {
- "dataset_timestamps": 0,
- "dataset_profiles": 0,
- "segment_caches": 0,
- "writers": 0,
- "pending_writables": 0,
- "pending_views": [
- "string"
], - "views": [
- "string"
]
}, - "property2": {
- "dataset_timestamps": 0,
- "dataset_profiles": 0,
- "segment_caches": 0,
- "writers": 0,
- "pending_writables": 0,
- "pending_views": [
- "string"
], - "views": [
- "string"
]
}
}, - "config": { }
}
null
null
null
Profile tabular data. The Swagger UI isn't able to call this currently.
curl -X 'POST' -H "X-API-Key: <password>" -H "Content-Type: application/json" 'http://localhost:8000/log' --data-raw '{
"datasetId": "model-62",
"multiple": {
"columns": [ "age", "workclass", "fnlwgt", "education" ],
"data": [
[ 25, "Private", 226802, "11th" ]
]
}
}'
from whylogs_container_client import AuthenticatedClient
import whylogs_container_client.api.profile.log as Log
from whylogs_container_client.models import LogRequest, LogMultiple
from datetime import datetime
client = AuthenticatedClient(base_url="http://localhost:8000", token="password", prefix="", auth_header_name="X-API-Key")
data = LogRequest(
dataset_id="model-1",
timestamp=int(datetime.now().timestamp() * 1000),
multiple=LogMultiple(
columns=["col1", "col2"],
data=[[1, 2], [3, 4]],
)
)
response = Log.sync_detailed(client=client, json_body=data)
if response.status_code != 200:
raise Exception(f"Failed to log data. Status code: {response.status_code}")
# API is async, it won't fail and has no return body
requests
):import requests
# Define your API key
api_key = "<password>"
# API endpoint
url = 'http://localhost:8000/log'
# Sample data
data = {
"datasetId": "model-62",
"multiple": {
"columns": ["age", "workclass", "fnlwgt", "education"],
"data": [
[25, "Private", 226802, "11th"]
]
}
}
# Make the POST request
headers = {"X-API-Key": api_key}
response = requests.post(url, json=data, headers=headers)
datasetId required | string (Datasetid) |
required | object (LogMultiple) |
integer or null (Timestamp) |
{- "datasetId": "string",
- "multiple": {
- "columns": [
- "string"
], - "data": [
- [
- "string"
]
]
}, - "timestamp": 0
}
null
This endpoint requires a custom configuration to set up before hand. See https://docs.whylabs.ai/docs/integrations-whylogs-container/ for setting up embeddings support.
Log embeddings data. The Swagger UI isn't able to call this currently.
curl -X 'POST' -H "X-API-Key: <password>" -H "Content-Type: application/octet-stream" 'http://localhost:8000/log-embeddings' --data-raw '{
"datasetId": "model-62",
"timestamp": 1634235000,
"embeddings": {
"embeddings": [[0.12, 0.45, 0.33, 0.92]]
}
}'
requests
):import requests
# Define your API key
api_key = "<password>"
# API endpoint
url = 'http://localhost:8000/log-embeddings'
# Sample data
data = {
"datasetId": "model-62",
"timestamp": 1634235000, # an example timestamp
"embeddings": {
"embeddings": [[0.12, 0.45, 0.33, 0.92]]
}
}
# Make the POST request
headers = {"X-API-Key": api_key, "Content-Type": "application/octet-stream"}
response = requests.post(url, json=data, headers=headers)
dataset_id required | string (Dataset Id) |
timestamp required | integer (Timestamp) |
required | object (Embeddings) |
{- "dataset_id": "string",
- "timestamp": 0,
- "embeddings": {
- "property1": [
- [
- 0
]
], - "property2": [
- [
- 0
]
]
}
}
null
null
null
This is a convenience wrapper around the llm request type for calling /log, which accepts bulk data.
string or null (Prompt) | |
string or null (Response) | |
InputContext (object) or null | |
string or null (Id) | |
datasetId required | string (Datasetid) |
timestamp | integer (Timestamp) |
object (Additional Data) | |
RunOptions (object) or null | |
object or null (Metadata) |
{- "prompt": "string",
- "response": "string",
- "context": {
- "entries": [
- {
- "content": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "id": "string",
- "datasetId": "string",
- "timestamp": 0,
- "additional_data": {
- "property1": "string",
- "property2": "string"
}, - "options": {
- "metric_filter": {
- "by_required_inputs": [
- [
- "string"
]
], - "allow_empty_results": true
}, - "remote_metric_timeout_sec": 20
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
null
string or null (Prompt) | |
string or null (Response) | |
InputContext (object) or null | |
string or null (Id) | |
datasetId required | string (Datasetid) |
timestamp | integer (Timestamp) |
object (Additional Data) | |
RunOptions (object) or null | |
object or null (Metadata) |
{- "prompt": "string",
- "response": "string",
- "context": {
- "entries": [
- {
- "content": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "id": "string",
- "datasetId": "string",
- "timestamp": 0,
- "additional_data": {
- "property1": "string",
- "property2": "string"
}, - "options": {
- "metric_filter": {
- "by_required_inputs": [
- [
- "string"
]
], - "allow_empty_results": true
}, - "remote_metric_timeout_sec": 20
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
null
Run langkit evaluation and return the validation results, as well as the generated metrics.
Args: log (bool, optional): Determines if logging to WhyLabs is enabled for the request. Defaults to True.
log | boolean (Log) Default: true |
perf_info | boolean (Perf Info) Default: false |
trace | boolean (Trace) Default: true |
metadata_info | boolean (Metadata Info) Default: false |
string or null (Prompt) | |
string or null (Response) | |
InputContext (object) or null | |
string or null (Id) | |
datasetId required | string (Datasetid) |
timestamp | integer (Timestamp) |
object (Additional Data) | |
RunOptions (object) or null | |
object or null (Metadata) |
{- "prompt": "string",
- "response": "string",
- "context": {
- "entries": [
- {
- "content": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "id": "string",
- "datasetId": "string",
- "timestamp": 0,
- "additional_data": {
- "property1": "string",
- "property2": "string"
}, - "options": {
- "metric_filter": {
- "by_required_inputs": [
- [
- "string"
]
], - "allow_empty_results": true
}, - "remote_metric_timeout_sec": 20
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
{- "metrics": [
- { }
], - "validation_results": {
- "report": [
- {
- "id": "string",
- "metric": "string",
- "details": "string",
- "value": 0,
- "upper_threshold": 0,
- "lower_threshold": 0,
- "allowed_values": [
- "string"
], - "disallowed_values": [
- "string"
], - "must_be_none": true,
- "must_be_non_none": true,
- "failure_level": "block"
}
]
}, - "perf_info": {
- "init_total_sec": 0,
- "metrics_time_sec": {
- "property1": 0,
- "property2": 0
}, - "metrics_total_sec": 0,
- "context_time_sec": {
- "property1": 0,
- "property2": 0
}, - "context_total_sec": 0,
- "validation_total_sec": 0,
- "workflow_total_sec": 0
}, - "action": {
- "action_type": "flag",
- "message": "string"
}, - "score_perf_info": {
- "init_total_sec": 0,
- "metrics_time_sec": {
- "property1": 0,
- "property2": 0
}, - "metrics_total_sec": 0,
- "context_time_sec": {
- "property1": 0,
- "property2": 0
}, - "context_total_sec": 0,
- "validation_total_sec": 0,
- "workflow_total_sec": 0
}, - "scores": [ ],
- "metadata": { }
}
{ }
Run langkit evaluation and return the validation results, as well as the generated metrics.
Args: log (bool, optional): Determines if logging to WhyLabs is enabled for the request. Defaults to True.
log | boolean (Log) Default: true |
perf_info | boolean (Perf Info) Default: false |
trace | boolean (Trace) Default: true |
metadata_info | boolean (Metadata Info) Default: false |
string or null (Prompt) | |
string or null (Response) | |
InputContext (object) or null | |
string or null (Id) | |
datasetId required | string (Datasetid) |
timestamp | integer (Timestamp) |
object (Additional Data) | |
RunOptions (object) or null | |
object or null (Metadata) |
{- "prompt": "string",
- "response": "string",
- "context": {
- "entries": [
- {
- "content": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "id": "string",
- "datasetId": "string",
- "timestamp": 0,
- "additional_data": {
- "property1": "string",
- "property2": "string"
}, - "options": {
- "metric_filter": {
- "by_required_inputs": [
- [
- "string"
]
], - "allow_empty_results": true
}, - "remote_metric_timeout_sec": 20
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
{- "metrics": [
- { }
], - "validation_results": {
- "report": [
- {
- "id": "string",
- "metric": "string",
- "details": "string",
- "value": 0,
- "upper_threshold": 0,
- "lower_threshold": 0,
- "allowed_values": [
- "string"
], - "disallowed_values": [
- "string"
], - "must_be_none": true,
- "must_be_non_none": true,
- "failure_level": "block"
}
]
}, - "perf_info": {
- "init_total_sec": 0,
- "metrics_time_sec": {
- "property1": 0,
- "property2": 0
}, - "metrics_total_sec": 0,
- "context_time_sec": {
- "property1": 0,
- "property2": 0
}, - "context_total_sec": 0,
- "validation_total_sec": 0,
- "workflow_total_sec": 0
}, - "action": {
- "action_type": "flag",
- "message": "string"
}, - "score_perf_info": {
- "init_total_sec": 0,
- "metrics_time_sec": {
- "property1": 0,
- "property2": 0
}, - "metrics_total_sec": 0,
- "context_time_sec": {
- "property1": 0,
- "property2": 0
}, - "context_total_sec": 0,
- "validation_total_sec": 0,
- "workflow_total_sec": 0
}, - "scores": [ ],
- "metadata": { }
}
string or null (Prompt) | |
string or null (Response) | |
InputContext (object) or null | |
string or null (Id) | |
datasetId required | string (Datasetid) |
timestamp | integer (Timestamp) |
object (Additional Data) | |
RunOptions (object) or null | |
object or null (Metadata) | |
policy required | string (Policy) |
{- "prompt": "string",
- "response": "string",
- "context": {
- "entries": [
- {
- "content": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "id": "string",
- "datasetId": "string",
- "timestamp": 0,
- "additional_data": {
- "property1": "string",
- "property2": "string"
}, - "options": {
- "metric_filter": {
- "by_required_inputs": [
- [
- "string"
]
], - "allow_empty_results": true
}, - "remote_metric_timeout_sec": 20
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "policy": "string"
}
{- "metrics": [
- { }
], - "validation_results": {
- "report": [
- {
- "id": "string",
- "metric": "string",
- "details": "string",
- "value": 0,
- "upper_threshold": 0,
- "lower_threshold": 0,
- "allowed_values": [
- "string"
], - "disallowed_values": [
- "string"
], - "must_be_none": true,
- "must_be_non_none": true,
- "failure_level": "block"
}
]
}, - "perf_info": {
- "init_total_sec": 0,
- "metrics_time_sec": {
- "property1": 0,
- "property2": 0
}, - "metrics_total_sec": 0,
- "context_time_sec": {
- "property1": 0,
- "property2": 0
}, - "context_total_sec": 0,
- "validation_total_sec": 0,
- "workflow_total_sec": 0
}, - "action": {
- "action_type": "flag",
- "message": "string"
}, - "score_perf_info": {
- "init_total_sec": 0,
- "metrics_time_sec": {
- "property1": 0,
- "property2": 0
}, - "metrics_total_sec": 0,
- "context_time_sec": {
- "property1": 0,
- "property2": 0
}, - "context_total_sec": 0,
- "validation_total_sec": 0,
- "workflow_total_sec": 0
}, - "scores": [ ],
- "metadata": { }
}
string or null (Prompt) | |
string or null (Response) | |
InputContext (object) or null |
{- "prompt": "string",
- "response": "string",
- "context": {
- "entries": [
- {
- "content": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
{- "metrics": [
- { }
], - "validation_results": {
- "report": [
- {
- "id": "string",
- "metric": "string",
- "details": "string",
- "value": 0,
- "upper_threshold": 0,
- "lower_threshold": 0,
- "allowed_values": [
- "string"
], - "disallowed_values": [
- "string"
], - "must_be_none": true,
- "must_be_non_none": true,
- "failure_level": "block"
}
]
}, - "perf_info": {
- "init_total_sec": 0,
- "metrics_time_sec": {
- "property1": 0,
- "property2": 0
}, - "metrics_total_sec": 0,
- "context_time_sec": {
- "property1": 0,
- "property2": 0
}, - "context_total_sec": 0,
- "validation_total_sec": 0,
- "workflow_total_sec": 0
}, - "action": {
- "action_type": "flag",
- "message": "string"
}, - "score_perf_info": {
- "init_total_sec": 0,
- "metrics_time_sec": {
- "property1": 0,
- "property2": 0
}, - "metrics_total_sec": 0,
- "context_time_sec": {
- "property1": 0,
- "property2": 0
}, - "context_total_sec": 0,
- "validation_total_sec": 0,
- "workflow_total_sec": 0
}, - "scores": [ ],
- "metadata": { }
}
{ }
Run langkit evaluation and return the validation results, as well as the generated metrics.
Args: log (bool, optional): Determines if logging to WhyLabs is enabled for the request. Defaults to True.
log | boolean (Log) Default: true |
perf_info | boolean (Perf Info) Default: false |
trace | boolean (Trace) Default: true |
metadata_info | boolean (Metadata Info) Default: false |
string or null (Prompt) | |
string or null (Response) | |
InputContext (object) or null | |
string or null (Id) | |
datasetId required | string (Datasetid) |
timestamp | integer (Timestamp) |
object (Additional Data) | |
RunOptions (object) or null | |
object or null (Metadata) |
{- "prompt": "string",
- "response": "string",
- "context": {
- "entries": [
- {
- "content": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "id": "string",
- "datasetId": "string",
- "timestamp": 0,
- "additional_data": {
- "property1": "string",
- "property2": "string"
}, - "options": {
- "metric_filter": {
- "by_required_inputs": [
- [
- "string"
]
], - "allow_empty_results": true
}, - "remote_metric_timeout_sec": 20
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
{- "metrics": [
- { }
], - "validation_results": {
- "report": [
- {
- "id": "string",
- "metric": "string",
- "details": "string",
- "value": 0,
- "upper_threshold": 0,
- "lower_threshold": 0,
- "allowed_values": [
- "string"
], - "disallowed_values": [
- "string"
], - "must_be_none": true,
- "must_be_non_none": true,
- "failure_level": "block"
}
]
}, - "perf_info": {
- "init_total_sec": 0,
- "metrics_time_sec": {
- "property1": 0,
- "property2": 0
}, - "metrics_total_sec": 0,
- "context_time_sec": {
- "property1": 0,
- "property2": 0
}, - "context_total_sec": 0,
- "validation_total_sec": 0,
- "workflow_total_sec": 0
}, - "action": {
- "action_type": "flag",
- "message": "string"
}, - "score_perf_info": {
- "init_total_sec": 0,
- "metrics_time_sec": {
- "property1": 0,
- "property2": 0
}, - "metrics_total_sec": 0,
- "context_time_sec": {
- "property1": 0,
- "property2": 0
}, - "context_total_sec": 0,
- "validation_total_sec": 0,
- "workflow_total_sec": 0
}, - "scores": [ ],
- "metadata": { }
}
Run langkit evaluation and return the validation results, as well as the generated metrics.
Args: log (bool, optional): Determines if logging to WhyLabs is enabled for the request. Defaults to True.
log | boolean (Log) Default: true |
perf_info | boolean (Perf Info) Default: false |
trace | boolean (Trace) Default: true |
metadata_info | boolean (Metadata Info) Default: false |
string or null (Prompt) | |
string or null (Response) | |
InputContext (object) or null | |
string or null (Id) | |
datasetId required | string (Datasetid) |
timestamp | integer (Timestamp) |
object (Additional Data) | |
RunOptions (object) or null | |
object or null (Metadata) |
{- "prompt": "string",
- "response": "string",
- "context": {
- "entries": [
- {
- "content": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "id": "string",
- "datasetId": "string",
- "timestamp": 0,
- "additional_data": {
- "property1": "string",
- "property2": "string"
}, - "options": {
- "metric_filter": {
- "by_required_inputs": [
- [
- "string"
]
], - "allow_empty_results": true
}, - "remote_metric_timeout_sec": 20
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}
}
{- "metrics": [
- { }
], - "validation_results": {
- "report": [
- {
- "id": "string",
- "metric": "string",
- "details": "string",
- "value": 0,
- "upper_threshold": 0,
- "lower_threshold": 0,
- "allowed_values": [
- "string"
], - "disallowed_values": [
- "string"
], - "must_be_none": true,
- "must_be_non_none": true,
- "failure_level": "block"
}
]
}, - "perf_info": {
- "init_total_sec": 0,
- "metrics_time_sec": {
- "property1": 0,
- "property2": 0
}, - "metrics_total_sec": 0,
- "context_time_sec": {
- "property1": 0,
- "property2": 0
}, - "context_total_sec": 0,
- "validation_total_sec": 0,
- "workflow_total_sec": 0
}, - "action": {
- "action_type": "flag",
- "message": "string"
}, - "score_perf_info": {
- "init_total_sec": 0,
- "metrics_time_sec": {
- "property1": 0,
- "property2": 0
}, - "metrics_total_sec": 0,
- "context_time_sec": {
- "property1": 0,
- "property2": 0
}, - "context_total_sec": 0,
- "validation_total_sec": 0,
- "workflow_total_sec": 0
}, - "scores": [ ],
- "metadata": { }
}