-
Notifications
You must be signed in to change notification settings - Fork 20.3k
Closed
Description
System Info
LangChain version 0.0.201
Who can help?
Information
- The official example notebooks/scripts
- My own modified scripts
Related Components
- LLMs/Chat Models
- Embedding Models
- Prompts / Prompt Templates / Prompt Selectors
- Output Parsers
- Document Loaders
- Vector Stores / Retrievers
- Memory
- Agents / Agent Executors
- Tools / Toolkits
- Chains
- Callbacks/Tracing
- Async
Reproduction
Based on the documentation example, run the following script:
from langchain.llms import OpenAI
from langchain.chains import LLMRequestsChain, LLMChain
from langchain.prompts import PromptTemplate
template = """Here is a company website content :
----
{requests_result}
----
We want to learn more about a company's activity and the kind of
clients they target. Perform an analysis and write a short summary.
"""
PROMPT = PromptTemplate(
input_variables=["requests_result"],
template=template,
)
chain = LLMRequestsChain(llm_chain = LLMChain(llm=OpenAI(temperature=0), prompt=PROMPT))
print(chain.requests_wrapper)Gives
python3 bug-langchain-requests.py
headers=None aiosession=NoneExpected behavior
Provided headers should be enforced
python3 bug-langchain-requests.py
headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36'} aiosession=NoneMetadata
Metadata
Assignees
Labels
No labels