langchain/libs/core/langchain_core/utils
Paresh Chiramel 9be08a1956
Update _retrieve_ref inside json_schema.py to include an isdigit() check (#14745)
- **Description:** Update _retrieve_ref inside json_schema.py to include
an isdigit() check
- **Issue:** This library is used inside dereference_refs inside
langchain_community.agent_toolkits.openapi.spec. When I read in a yaml
file which has references for "400", "401" etc; the line "out =
out[component]" causes a KeyError. The isdigit() check ensures that if
it is an integer like "400" or "401"; it converts it into integer before
using it as a key to prevent the error.
  - **Dependencies:** No dependencies
  - **Tag maintainer:** @baskaryan

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-01-01 16:25:42 -08:00
..
__init__.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
aiter.py Separate out langchain_core package (#13577) 2023-11-20 13:09:30 -08:00
env.py Improve: remove extra spaces in get_from_env error (#15064) 2023-12-22 11:50:03 -08:00
formatting.py [core] prompt changes (#15186) 2023-12-26 15:52:17 -08:00
html.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
input.py Separate out langchain_core package (#13577) 2023-11-20 13:09:30 -08:00
iter.py Separate out langchain_core package (#13577) 2023-11-20 13:09:30 -08:00
json_schema.py Update _retrieve_ref inside json_schema.py to include an isdigit() check (#14745) 2024-01-01 16:25:42 -08:00
loading.py Separate out langchain_core package (#13577) 2023-11-20 13:09:30 -08:00
pydantic.py Separate out langchain_core package (#13577) 2023-11-20 13:09:30 -08:00
strings.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
utils.py Separate out langchain_core package (#13577) 2023-11-20 13:09:30 -08:00