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_prompt
Method●Since v0.3

create_prompt

Copy
create_prompt( self, prompt_identifier: str, *, description: Optional[str] = None
View source on GitHub
,
readme
:
Optional
[
str
]
=
None
,
tags
:
Optional
[
Sequence
[
str
]
]
=
None
,
is_public
:
bool
=
False
)
->
ls_schemas
.
Prompt

Parameters

NameTypeDescription
prompt_identifier*str

The identifier of the prompt.

The identifier should be in the format of owner/name:hash, name:hash, owner/name, or name

descriptionOptional[str]
Default:None

A description of the prompt.

readmeOptional[str]
Default:None
tagsOptional[Sequence[str]]
Default:None
is_publicbool
Default:False

Create a new prompt.

Does not attach prompt object, just creates an empty prompt.

A readme for the prompt.

A list of tags for the prompt.

Whether the prompt should be public.