Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libs/labelbox/src/labelbox/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,7 @@ def create_ontology(
normalized,
media_type: MediaType = None,
ontology_kind: OntologyKind = None,
ontology_id: str = None,
) -> Ontology:
"""
Creates an ontology from normalized data
Expand All @@ -1354,6 +1355,7 @@ def create_ontology(
media_type (MediaType or None): Media type of a new ontology
ontology_kind (OntologyKind or None): set to OntologyKind.ModelEvaluation if the ontology is for chat evaluation or
OntologyKind.ResponseCreation if ontology is for response creation, leave as None otherwise.
ontology_id (str): The id of the ontology to update

Returns:
The created Ontology
Expand Down Expand Up @@ -1390,6 +1392,8 @@ def create_ontology(
"mediaType": media_type_value,
}
}
if ontology_id is not None:
params["data"]["id"] = ontology_id
if editor_task_type_value:
params["data"]["editorTaskType"] = editor_task_type_value

Expand Down