reduce_openapi_spec#
- langchain_community.agent_toolkits.openapi.spec.reduce_openapi_spec(spec: dict, dereference: bool = True) ReducedOpenAPISpec [source]#
Simplify/distill/minify a spec somehow.
I want a smaller target for retrieval and (more importantly) I want smaller results from retrieval. I was hoping https://openapi.tools/ would have some useful bits to this end, but doesnβt seem so.
- Parameters:
spec (dict) β The OpenAPI spec.
dereference (bool) β Whether to dereference the spec. Default is True.
- Returns:
The reduced OpenAPI spec.
- Return type:
Examples using reduce_openapi_spec