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
PythonlangsmithclientClientlist_prompts
Method●Since v0.1

list_prompts

List prompts with pagination.

Copy
list_prompts(
  self,
  *,
  limit: int = 100,
  offset: int = 0,
  is_public: Optional[bool] = None,
  is_archived: Optional[bool] = False,
  sort_field: ls_schemas.PromptSortField = ls_schemas.PromptSortField.updated_at,
  sort_direction: Literal['desc', 'asc'] = 'desc',
  query: Optional[str] = None
) -> ls_schemas.ListPromptsResponse

Parameters

NameTypeDescription
limitint, default=100
Default:100

The maximum number of prompts to return. Defaults to 100.

offsetint, default=0
Default:0

The number of prompts to skip. Defaults to 0.

is_publicOptional[bool]
Default:None

Filter prompts by if they are public.

is_archivedOptional[bool]
Default:False

Filter prompts by if they are archived.

sort_fieldPromptSortField
Default:ls_schemas.PromptSortField.updated_at

The field to sort by. Defaults to "updated_at".

sort_directionLiteral["desc", "asc"], default="desc"
Default:'desc'

The order to sort by. Defaults to "desc".

queryOptional[str]
Default:None

Filter prompts by a search query.

View source on GitHub