langsmith.client.Client.create_run#

Client.create_run(name: str, inputs: Dict[str, Any], run_type: Literal['tool', 'chain', 'llm', 'retriever', 'embedding', 'prompt', 'parser'], *, project_name: str | None = None, revision_id: str | None = None, **kwargs: Any) None[source]#

Persist a run to the LangSmith API.

Parameters:
  • name (str) – The name of the run.

  • inputs (Dict[str, Any]) – The input values for the run.

  • run_type (str) – The type of the run, such as tool, chain, llm, retriever, embedding, prompt, or parser.

  • revision_id (ID_TYPE or None, default=None) – The revision ID of the run.

  • **kwargs (Any) – Additional keyword arguments.

  • Raises

  • ------

  • LangSmithUserError – If the API key is not provided when using the hosted service.

  • project_name (str | None) –

Return type:

None