Fixes #6282 

1 liner to fix default http headers not passed by `LLMRequestsChain`
This commit is contained in:
Pierre Alexandre SCHEMBRI 2023-06-17 01:21:01 +02:00 committed by GitHub
parent 23cdebddc4
commit 9ca11c06b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,8 @@ class LLMRequestsChain(Chain):
llm_chain: LLMChain llm_chain: LLMChain
requests_wrapper: TextRequestsWrapper = Field( requests_wrapper: TextRequestsWrapper = Field(
default_factory=TextRequestsWrapper, exclude=True default_factory=lambda: TextRequestsWrapper(headers=DEFAULT_HEADERS),
exclude=True,
) )
text_length: int = 8000 text_length: int = 8000
requests_key: str = "requests_result" #: :meta private: requests_key: str = "requests_result" #: :meta private: