langsmith.async_client.AsyncClient.create_feedback#

async AsyncClient.create_feedback(run_id: UUID | str | None, key: str, score: float | None = None, value: Any | None = None, comment: str | None = None, **kwargs: Any) Feedback[source]#

Create feedback for a run.

Parameters:
  • run_id (Optional[ls_client.ID_TYPE]) – The ID of the run to provide feedback for. Can be None for project-level feedback.

  • key (str) – The name of the metric or aspect this feedback is about.

  • score (Optional[float]) – The score to rate this run on the metric or aspect.

  • value (Optional[Any]) – The display value or non-numeric value for this feedback.

  • comment (Optional[str]) – A comment about this feedback.

  • **kwargs – Additional keyword arguments to include in the feedback data.

Returns:

The created feedback object.

Return type:

ls_schemas.Feedback

Raises:

httpx.HTTPStatusError – If the API request fails.