Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
yetamsft committed Apr 23, 2024
1 parent b0cd4cd commit 2719165
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ def __build_output_idx_to_embedding_mapping(self, response_data):
"""Build a mapping from output index to embedding."""
"""
Given response data, return a dictionary of the index and embedding info for each element of the batch.
Unsure if the responses are always in the correct order by input index, ensure output order by mapping out index.
Unsure if the responses are always in the correct order by input index,
ensure output order by mapping out index.
Args:
response_data: The list of outputs from the 'data' of API response.
Expand Down Expand Up @@ -143,8 +144,8 @@ def __tiktoken_estimates_succeeded(self, token_count_estimates: "tuple[int]", in
token_est_length = len(token_count_estimates)
length_matches = token_est_length == input_length
if not length_matches:
lu.get_logger().warn(f"Input length {input_length} does not match token estimate length {token_est_length}. "
"Skipping prompt_tokens count overrides.")
lu.get_logger().warn(f"Input length {input_length} does not match token estimate "
"length {token_est_length}. Skipping prompt_tokens count overrides.")
return length_matches

def __tiktoken_estimates_retry(self, request_obj: dict) -> "tuple[int]":
Expand Down

0 comments on commit 2719165

Please sign in to comment.