langchain.chains.openai_functions.openapi
.get_openapi_chainΒΆ
- langchain.chains.openai_functions.openapi.get_openapi_chain(spec: Union[OpenAPISpec, str], llm: Optional[BaseLanguageModel] = None, prompt: Optional[BasePromptTemplate] = None, request_chain: Optional[Chain] = None, llm_chain_kwargs: Optional[Dict] = None, verbose: bool = False, headers: Optional[Dict] = None, params: Optional[Dict] = None, **kwargs: Any) SequentialChain [source]ΒΆ
Create a chain for querying an API from a OpenAPI spec.
- Parameters
spec (Union[OpenAPISpec, str]) β OpenAPISpec or url/file/text string corresponding to one.
llm (Optional[BaseLanguageModel]) β language model, should be an OpenAI function-calling model, e.g. ChatOpenAI(model=βgpt-3.5-turbo-0613β).
prompt (Optional[BasePromptTemplate]) β Main prompt template to use.
request_chain (Optional[Chain]) β Chain for taking the functions output and executing the request.
llm_chain_kwargs (Optional[Dict]) β
verbose (bool) β
headers (Optional[Dict]) β
params (Optional[Dict]) β
kwargs (Any) β
- Return type