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
  • RemoteGraph
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDKRemoteGraph
Language
Theme
PythonlangsmithclientClientcreate_presigned_feedback_tokens
Method●Since v0.1

create_presigned_feedback_tokens

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.

Copy
create_presigned_feedback_tokens(
  self,
  run_id: ID_TYPE,
  feedback_keys: Sequence[str],
  *,
  expiration: Optional[datetime.datetime | datetime.timedelta] = None,
  feedback_configs: Optional[Sequence[Optional[ls_schemas.FeedbackConfig]]] = None
) -> Sequence[ls_schemas.FeedbackIngestToken]

Parameters

NameTypeDescription
run_id*Union[UUID, str]

The ID of the run.

feedback_keys*Sequence[str]

The key of the feedback to create.

expirationOptional[datetime.datetime | datetime.timedelta]
Default:None

The expiration time of the pre-signed URL. Either a datetime or a timedelta offset from now. Default to 3 hours.

feedback_configsOptional[Sequence[Optional[FeedbackConfig]]]
Default: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.

View source on GitHub