Create a pre-signed URL to send feedback data to.
This is useful for giving browser-based clients a way to upload feedback data directly to LangSmith without accessing the API key.
create_presigned_feedback_token(
self,
run_id: ID_TYPE,
feedback_key: str,
*,
expiration: Optional[datetime.datetime | datetime.timedelta] = None,
feedback_config: Optional[ls_schemas.FeedbackConfig] = None,
feedback_id: Optional[ID_TYPE] = None
) -> ls_schemas.FeedbackIngestToken| Name | Type | Description |
|---|---|---|
run_id* | Union[UUID, str] | The ID of the run. |
feedback_key* | str | The key of the feedback to create. |
expiration | Optional[datetime.datetime | datetime.timedelta] | Default: NoneThe expiration time of the pre-signed URL. Either a datetime or a timedelta offset from now. Default to 3 hours. |
feedback_config | Optional[FeedbackConfig] | Default: NoneIf creating a feedback_key for the first time, this defines how the metric should be interpreted, such as a continuous score (w/ optional bounds), or distribution over categorical values. |
feedback_id | Optional[Union[UUID, str] | Default: NoneThe ID of the feedback to create. If not provided, a new feedback will be created. |