langchain/libs/community/langchain_community/utilities
Eun Hye Kim 70761af8cf
community: Fix #22975 (Add SSL Verification Option to Requests Class in langchain_community) (#22977)
- **PR title**: "community: Fix #22975 (Add SSL Verification Option to
Requests Class in langchain_community)"
- **PR message**: 
    - **Description:**
- Added an optional verify parameter to the Requests class with a
default value of True.
- Modified the get, post, patch, put, and delete methods to include the
verify parameter.
- Updated the _arequest async context manager to include the verify
parameter.
- Added the verify parameter to the GenericRequestsWrapper class and
passed it to the Requests class.
    - **Issue:** This PR fixes issue #22975.
- **Dependencies:** No additional dependencies are required for this
change.
    - **Twitter handle:** @lunara_x

You can check this change with below code.
```python
from langchain_openai.chat_models import ChatOpenAI
from langchain.requests import RequestsWrapper
from langchain_community.agent_toolkits.openapi import planner
from langchain_community.agent_toolkits.openapi.spec import reduce_openapi_spec

with open("swagger.yaml") as f:
    data = yaml.load(f, Loader=yaml.FullLoader)
swagger_api_spec = reduce_openapi_spec(data)

llm = ChatOpenAI(model='gpt-4o')
swagger_requests_wrapper = RequestsWrapper(verify=False) # modified point
superset_agent = planner.create_openapi_agent(swagger_api_spec, swagger_requests_wrapper, llm, allow_dangerous_requests=True, handle_parsing_errors=True)

superset_agent.run(
    "Tell me the number and types of charts and dashboards available."
)
```

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-06-18 03:12:40 +00:00
..
__init__.py community[major], experimental[patch]: Remove Python REPL from community (#22904) 2024-06-14 17:53:29 +00:00
alpha_vantage.py community[minor]: Add Alpha Vantage API Tool (#14332) 2024-03-30 00:44:01 +00:00
anthropic.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
apify.py community: fix missing apify_api_token field in ApifyWrapper (#22421) 2024-06-03 14:32:57 +00:00
arcee.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
arxiv.py infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
asknews.py community[minor]: add AskNews retriever and AskNews tool (#21581) 2024-05-20 18:23:06 -07:00
astradb.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
awslambda.py infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
bibtex.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
bing_search.py docs: clean up link to bing search (#21825) 2024-05-17 19:06:56 +00:00
brave_search.py infra: add -p to mkdir in lint steps (#17013) 2024-02-05 11:22:06 -08:00
cassandra_database.py community[patch]: Refactor CassandraDatabase wrapper (#21075) 2024-05-02 13:13:08 -04:00
cassandra.py community[minor]: Add Cassandra ByteStore (#22064) 2024-05-23 10:46:23 -04:00
clickup.py docs: community docstring updates (#21040) 2024-04-29 17:40:23 -04:00
dalle_image_generator.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
dataforseo_api_search.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
dataherald.py community[minor]: Add Datahareld tool (#19680) 2024-04-13 23:27:16 +00:00
dria_index.py community[minor]: Add Dria retriever (#17098) 2024-04-01 12:04:19 -07:00
duckduckgo_search.py docs: duckduckgosearch options listed (#22568) 2024-06-05 23:29:47 +00:00
github.py docs: remove repetitive words (#21058) 2024-05-01 01:10:42 +00:00
gitlab.py GITLAB_URL should take default https://gitlab.com instead of error (#14638) 2024-01-01 16:55:52 -08:00
golden_query.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
google_finance.py docs: docstrings langchain_community update (#14889) 2023-12-19 08:58:24 -05:00
google_jobs.py docs: docstrings langchain_community update (#14889) 2023-12-19 08:58:24 -05:00
google_lens.py community[patch]: Fix for github issue #17690 (#20117) 2024-04-30 00:10:08 +00:00
google_places_api.py (all): update removal in deprecation warnings from 0.2 to 0.3 (#21265) 2024-05-03 14:29:36 -04:00
google_scholar.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
google_search.py (all): update removal in deprecation warnings from 0.2 to 0.3 (#21265) 2024-05-03 14:29:36 -04:00
google_serper.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
google_trends.py community: Handling missing key in Google Trends API response. (#15864) 2024-01-21 18:11:45 -08:00
graphql.py community[patch]: Allow override of 'fetch_schema_from_transport' in the GraphQL tool (#17649) 2024-02-21 15:32:43 -08:00
infobip.py community[minor]: Infobip tool integration (#16805) 2024-03-29 19:01:27 +00:00
jira.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
max_compute.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
merriam_webster.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
metaphor_search.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
mojeek_search.py community[patch]: Add missing type annotations (#22758) 2024-06-10 16:59:28 -04:00
nasa.py docs: docstrings langchain_community update (#14889) 2023-12-19 08:58:24 -05:00
nvidia_riva.py community[patch]: flattening imports 3 (#18939) 2024-03-12 15:18:54 -07:00
opaqueprompts.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
openapi.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
openweathermap.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
oracleai.py community[minor]: Oraclevs integration (#21123) 2024-05-04 03:15:35 +00:00
outline.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
passio_nutrition_ai.py docs: community docstring updates (#21040) 2024-04-29 17:40:23 -04:00
pebblo.py [Community][Minor]: Fetch loader_source of GoogleDriveLoader in PebbloSafeLoader. (#21314) 2024-05-07 14:45:58 -07:00
polygon.py community: Add PolygonAggregates tool (#18882) 2024-03-11 11:58:10 -07:00
portkey.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
powerbi.py infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
pubmed.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
python.py community[major], experimental[patch]: Remove Python REPL from community (#22904) 2024-06-14 17:53:29 +00:00
reddit_search.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
redis.py community[patch]: upgrade to recent version of mypy (#21616) 2024-05-13 14:55:07 -04:00
rememberizer.py community[minor]: Adds a vector store for Azure Cosmos DB for NoSQL (#21676) 2024-06-11 10:34:01 -07:00
requests.py community: Fix #22975 (Add SSL Verification Option to Requests Class in langchain_community) (#22977) 2024-06-18 03:12:40 +00:00
scenexplain.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
searchapi.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
searx_search.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
semanticscholar.py community: Semanticscholar tool to search 200M+ scientific articles (#15151) 2024-01-02 15:36:03 -08:00
serpapi.py community[minor]: import fix (#20995) 2024-04-29 10:32:50 -04:00
spark_sql.py community[minor]: import fix (#20995) 2024-04-29 10:32:50 -04:00
sql_database.py community[patch]: fix database uri type in SQLDatabase (#22661) 2024-06-12 15:11:00 -04:00
stackexchange.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
steam.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
tavily_search.py infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
tensorflow_datasets.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
twilio.py infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
vertexai.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
wikidata.py community: Wikidata tool support (#16691) 2024-01-28 16:45:21 -08:00
wikipedia.py community[minor]: Implement lazy_load() for WikipediaLoader (#18680) 2024-03-06 13:03:21 -05:00
wolfram_alpha.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
you.py community(you): Better support for You.com News API (#22622) 2024-06-15 20:05:19 +00:00
zapier.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00