Skip to content

Commit

Permalink
Adding method for removing a run from an annotation queue (#1027)
Browse files Browse the repository at this point in the history
Closes #1026

Co-authored-by: mhoecke1 <mhoecker1@paychex.com>
  • Loading branch information
MaxHoecker and mhoecke1 authored Sep 20, 2024
1 parent 6b3ea0b commit 4d5b5f5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions python/langsmith/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4681,6 +4681,22 @@ def add_runs_to_annotation_queue(
)
ls_utils.raise_for_status_with_text(response)

def delete_run_from_annotation_queue(
self, queue_id: ID_TYPE, *, run_id: ID_TYPE
) -> None:
"""Deletes a run from an annotation queue with the specified queue ID and run ID.
Args:
queue_id (ID_TYPE): The ID of the annotation queue.
run_id (ID_TYPE): The ID of the run to be added to the annotation
queue.
"""
response = self.request_with_retries(
"DELETE",
f"/annotation-queues/{_as_uuid(queue_id, 'queue_id')}/runs/{_as_uuid(run_id, 'run_id')}",
)
ls_utils.raise_for_status_with_text(response)

def get_run_from_annotation_queue(
self, queue_id: ID_TYPE, *, index: int
) -> ls_schemas.RunWithAnnotationQueueInfo:
Expand Down

0 comments on commit 4d5b5f5

Please sign in to comment.