Add security note to API chain (#12452)

Add security note
pull/12461/head
Eugene Yurtsev 8 months ago committed by GitHub
parent 11505f95d3
commit 60d009f75a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,7 +17,22 @@ from langchain.utilities.requests import TextRequestsWrapper
class APIChain(Chain):
"""Chain that makes API calls and summarizes the responses to answer a question."""
"""Chain that makes API calls and summarizes the responses to answer a question.
*Security Note*: This API chain uses the requests toolkit
to make GET, POST, PATCH, PUT, and DELETE requests to an API.
Exercise care in who is allowed to use this chain. If exposing
to end users, consider that users will be able to make arbitrary
requests on behalf of the server hosting the code. For example,
users could ask the server to make a request to a private API
that is only accessible from the server.
Control access to who can submit issue requests using this toolkit and
what network access it has.
See https://python.langchain.com/docs/security for more information.
"""
api_request_chain: LLMChain
api_answer_chain: LLMChain

Loading…
Cancel
Save