The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Add security note to API chain (#12452)
Eugene Yurtsev60d009f75a3c
diff --git a/libs/langchain/langchain/chains/api/base.py b/libs/langchain/langchain/chains/api/base.pyindex 52f4afecfe..01a0e24d6e 100644--- a/libs/langchain/langchain/chains/api/base.py+++ b/libs/langchain/langchain/chains/api/base.py@@ -17,7 +17,22 @@ from langchain.utilities.requests import TextRequestsWrapperclass 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: LLMChainapi_answer_chain: LLMChain