LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithasync_clientAsyncClientcreate_presigned_feedback_token
Methodā—Since v0.1

create_presigned_feedback_token

Copy
create_presigned_feedback_token(
  self,
  run_id: ls_client.ID_TYPE,
  feedback_key: str,
  *,
  expiration:
View source on GitHub
Optional
[
datetime
.
datetime
|
datetime
.
timedelta
]
=
None
,
feedback_config
:
Optional
[
ls_schemas
.
FeedbackConfig
]
=
None
,
feedback_id
:
Optional
[
ls_client
.
ID_TYPE
]
=
None
)
->
ls_schemas
.
FeedbackIngestToken

Parameters

NameTypeDescription
run_id*Union[UUID, str]

The ID of the run to provide feedback for.

feedback_key*str

The name of the metric or aspect this feedback is about.

expirationOptional[datetime.datetime | datetime.timedelta]
Default:None
feedback_configOptional[ls_schemas.FeedbackConfig]
Default:None
feedback_idOptional[ls_client.ID_TYPE]
Default:None

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.

The expiration time of the pre-signed URL.

Either a datetime or a timedelta offset from now.

Default to 3 hours.

FeedbackConfig or None.

If 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.

The ID of the feedback to create.

If not provided, a new feedback will be created.