to_json() → Union[SerializedConstructor, SerializedNotImplemented]¶
to_json_not_implemented() → SerializedNotImplemented¶
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
classmethod validate(value: Any) → Model¶
with_fallbacks(fallbacks: ~typing.Sequence[~langchain.schema.runnable.Runnable[~langchain.schema.runnable.Input, ~langchain.schema.runnable.Output]], *, exceptions_to_handle: ~typing.Tuple[~typing.Type[BaseException]] = (<class 'Exception'>,)) → RunnableWithFallbacks[Input, Output]¶
property lc_attributes: Dict¶
Return a list of attribute names that should be included in the
serialized kwargs. These attributes must be accepted by the
constructor.
property lc_namespace: List[str]¶
Return the namespace of the langchain object.
eg. [“langchain”, “llms”, “openai”]
property lc_secrets: Dict[str, str]¶
Return a map of constructor argument names to secret ids.
eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool¶
Return whether or not the class is serializable.
Examples using ChatPromptTemplate¶
Anthropic
OpenAI
Google Cloud Platform Vertex AI PaLM 
JinaChat
Context
OpenAI Functions Metadata Tagger
Figma
Tagging
Structure answers with OpenAI functions
Extraction with OpenAI Functions
Multi-agent authoritarian speaker selection
How to add Memory to an LLMChain
Retry parser
Pydantic (JSON) parser
Few shot examples for chat models
Prompt Pipelining
Using OpenAI functions
Extraction
Retrieval QA using OpenAI functions