mirror of https://github.com/hwchase17/langchain
fix(openapi): openapi chain will work without/empty description/summa… (#8351)
Description: This PR will enable the Open API chain to work with valid Open API specifications missing `description` and `summary` properties for path and operation nodes in open api specs. Since both `description` and `summary` property are declared optional we cannot be sure they are defined. This PR resolves this problem by providing an empty (`''`) description as fallback. The previous behavior of the Open API chain was that the underlying LLM (OpenAI) throw ed an exception since `None` is not of type string: ``` openai.error.InvalidRequestError: None is not of type 'string' - 'functions.0.description' ``` Using this PR the Open API chain will succeed also using Open API specs lacking `description` and `summary` properties for path and operation nodes. Thanks for your amazing work ! Tag maintainer: @baskaryan --------- Co-authored-by: Lars Gersmann <lars.gersmann@cm4all.com> Co-authored-by: Bagatur <baskaryan@gmail.com>pull/8395/head
parent
caa6caeb8a
commit
e758e9e7f5
Loading…
Reference in New Issue