validate_api_answer_prompt() — langchain Function Reference
Architecture documentation for the validate_api_answer_prompt() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 008948f4_f327_2d60_320f_b5f336cf118e["validate_api_answer_prompt()"] b9a82d83_700a_c3c4_a4fd_29ab9cbe4112["APIChain"] 008948f4_f327_2d60_320f_b5f336cf118e -->|defined in| b9a82d83_700a_c3c4_a4fd_29ab9cbe4112 0393cea2_16ff_2ed6_ebe5_2e7f4968843e["langchain_community()"] 0393cea2_16ff_2ed6_ebe5_2e7f4968843e -->|calls| 008948f4_f327_2d60_320f_b5f336cf118e style 008948f4_f327_2d60_320f_b5f336cf118e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/chains/api/base.py lines 268–275
def validate_api_answer_prompt(self) -> Self:
"""Check that api answer prompt expects the right variables."""
input_vars = self.api_answer_chain.prompt.input_variables
expected_vars = {"question", "api_docs", "api_url", "api_response"}
if set(input_vars) != expected_vars:
msg = f"Input variables should be {expected_vars}, got {input_vars}"
raise ValueError(msg)
return self
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does validate_api_answer_prompt() do?
validate_api_answer_prompt() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/api/base.py.
Where is validate_api_answer_prompt() defined?
validate_api_answer_prompt() is defined in libs/langchain/langchain_classic/chains/api/base.py at line 268.
What calls validate_api_answer_prompt()?
validate_api_answer_prompt() is called by 1 function(s): langchain_community.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free