You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I executed the sample code listed in the Quickstart, I encountered an error that said “httpcore.ProxyError: 407 Proxy Authentication Required.” I have entered the actual API key in “your-openai-key.”
Code Examples
from datasets import Dataset
import os
from ragas import evaluate
from ragas.metrics import faithfulness, answer_correctness
os.environ["OPENAI_API_KEY"] = "your-openai-key"
data_samples = {
'question': ['When was the first super bowl?', 'Who won the most super bowls?'],
'answer': ['The first superbowl was held on Jan 15, 1967', 'The most super bowls have been won by The New England Patriots'],
'contexts' : [['The First AFL–NFL World Championship Game was an American football game played on January 15, 1967, at the Los Angeles Memorial Coliseum in Los Angeles,'],
['The Green Bay Packers...Green Bay, Wisconsin.','The Packers compete...Football Conference']],
'ground_truth': ['The first superbowl was held on January 15, 1967', 'The New England Patriots have won the Super Bowl a record six times']
}
dataset = Dataset.from_dict(data_samples)
score = evaluate(dataset,metrics=[faithfulness,answer_correctness])
score.to_pandas()
Error trace
Evaluating: 0%| | 0/4 [00:02<?, ?it/s]
Exception in thread Thread-7:
Traceback (most recent call last):
File "[C:\Users\********\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpx\_transports\default.py", line 69](file:///C:/Users/********/AppData/Local/Programs/Python/Python312/Lib/site-packages/httpx/_transports/default.py#line=68), in map_httpcore_exceptions
yield
...
File "[C:\Users\********\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpcore\_sync\http_proxy.py", line 298](file:///C:/Users/********/AppData/Local/Programs/Python/Python312/Lib/site-packages/httpcore/_sync/http_proxy.py#line=297), in handle_request
raise ProxyError(msg)
httpcore.ProxyError: 407 Proxy Authentication Required
The above exception was the direct cause of the following exception:
Infos
The proxy server settings have been completed as follows, and since the installation of Python libraries is possible, it is presumed that additional authentication information is required for API calls.
$env:HTTP_PROXY=“http://...:8080”
$env:HTTPS_PROXY=“http://...:8080”
Could you please advise on how to proceed?
The text was updated successfully, but these errors were encountered:
When I executed the sample code listed in the Quickstart, I encountered an error that said “httpcore.ProxyError: 407 Proxy Authentication Required.” I have entered the actual API key in “your-openai-key.”
Code Examples
Error trace
Infos
The proxy server settings have been completed as follows, and since the installation of Python libraries is possible, it is presumed that additional authentication information is required for API calls.
$env:HTTP_PROXY=“http://...:8080”
$env:HTTPS_PROXY=“http://...:8080”
Could you please advise on how to proceed?
The text was updated successfully, but these errors were encountered: