🦜 Beak - LLM Trace Collection
Welcome to Beak, your LLM trace collection and storage system.
API Endpoint
POST /api/traces/[collection_name]/[flow_name]
Request Format
Send a multipart/form-data request with the following fields:
inputs- JSON string containing input dataoutputs- JSON string containing output dataconfiguration- JSON string containing configuration datafiles- (Optional) One or more files to attach to the trace
Example using cURL
curl -X POST http://localhost:3000/api/traces/my-collection/my-flow \
-F 'inputs={"prompt":"Hello, world!","model":"gpt-4"}' \
-F 'outputs={"response":"Hi there!","tokens":15}' \
-F 'configuration={"temperature":0.7,"max_tokens":100}' \
-F 'files=@/path/to/file1.pdf' \
-F 'files=@/path/to/file2.png'Response
{
"success": true,
"traceId": "550e8400-e29b-41d4-a716-446655440000",
"collection": "my-collection",
"flow": "my-flow",
"files": ["550e8400-e29b-41d4-a716-446655440000.trace.0001.pdf"],
"storagePath": "traces/my-collection/my-flow/550e8400-e29b-41d4-a716-446655440000.trace.json"
}Test the API
Use the form below to test the API endpoint:
Go to Test PageView Traces
Browse all traces in the database with advanced filtering and sorting:
View All Traces