Pulls a prompt from the LangSmith hub and returns a [Prompt] that can be invoked with input variables.
public Prompt pull(String promptIdentifier, Boolean includeModel)Pulls a prompt from the LangSmith hub and returns a [Prompt] that can be invoked with input variables. This is the primary method for working with prompts. The returned [Prompt] has an invoke method that formats the prompt with variable values, producing a [PromptValue] that can be converted to provider-specific formats using [convertToOpenAIParams] or [convertToAnthropicParams].
Prompt prompt = promptClient.pull("my-org/joke-generator");
PromptValue formatted = prompt.invoke(Map.of("topic", "cats"));
ChatCompletion completion = openai.chat().completions().create(
convertToOpenAIParams(formatted).model(ChatModel.GPT_4_1_MINI).build());
"owner/name", "name",
"owner/name:commit_hash")