Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 3, 2024
1 parent 466f965 commit 1118c32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions evals/evaluation/rag_eval/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,7 @@ def get_retrieved_documents(self, data, arguments):
query = self.get_query(data)
data = {"inputs": query}
headers = {"Content-Type": "application/json"}
response = requests.post(arguments.tei_embedding_endpoint + "/embed",
data=json.dumps(data),
headers=headers
)
response = requests.post(arguments.tei_embedding_endpoint + "/embed", data=json.dumps(data), headers=headers)
if response.ok:
embedding = response.json()[0]
else:
Expand Down
5 changes: 1 addition & 4 deletions evals/evaluation/rag_eval/examples/eval_multihop.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ def get_reranked_documents(self, query, docs, arguments):
def get_retrieved_documents(self, query, arguments):
data = {"inputs": query}
headers = {"Content-Type": "application/json"}
response = requests.post(arguments.tei_embedding_endpoint + "/embed",
data=json.dumps(data),
headers=headers
)
response = requests.post(arguments.tei_embedding_endpoint + "/embed", data=json.dumps(data), headers=headers)
if response.ok:
embedding = response.json()[0]
else:
Expand Down

0 comments on commit 1118c32

Please sign in to comment.