POST
/
datasets
import honeyhive
from honeyhive.models import components

s = honeyhive.HoneyHive(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.datasets.create_dataset(request=components.CreateDatasetRequest(
    project='New Project',
    name='test-dataset',
    description='A test dataset',
    type=components.CreateDatasetRequestType.EVALUATION,
    datapoints=[
        '66369748b5773befbdc661e2',
    ],
    linked_evals=[
        '<value>',
    ],
    saved=False,
    pipeline_type=components.CreateDatasetRequestPipelineType.EVENT,
    metadata={
        'source': 'dev',
    },
))

if res.object is not None:
    # handle response
    pass
{
  "inserted": true,
  "result": {
    "insertedId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
project
string
required

Name of the project associated with this dataset like New Project

name
string
required

Name of the dataset

description
string

A description for the dataset

type
enum<string>

What the dataset is to be used for - "evaluation" (default) or "fine-tuning"

Available options:
evaluation,
fine-tuning
datapoints
string[]

List of unique datapoint ids to be included in this dataset

linked_evals
string[]

List of unique evaluation run ids to be associated with this dataset

saved
boolean
pipeline_type
enum<string>

The type of data included in the dataset - "event" (default) or "session"

Available options:
event,
session
metadata
object

Any helpful metadata to track for the dataset

Response

200 - application/json
Successful creation
inserted
boolean
result
object