Skip to content

Commit

Permalink
Update azure_openai.py
Browse files Browse the repository at this point in the history
  • Loading branch information
monk1337 authored Jul 29, 2023
1 parent 662a7da commit 340a764
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions promptify/models/text2text/api/azure_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(
request_timeout: Union[float, Tuple[float, float]] = None,
api_wait=60,
api_retry=6,
max_completion_length: int = 10,
json_depth_limit: int = 10,
):
super().__init__(api_key, model, api_wait, api_retry)

Expand All @@ -45,7 +45,7 @@ def __init__(
self.frequency_penalty = frequency_penalty
self.logit_bias = logit_bias or {}
self.request_timeout = request_timeout
self.max_completion_length = max_completion_length
self.json_depth_limit = json_depth_limit
self.engine = engine
self.set_key(api_key)
self._verify_model()
Expand Down Expand Up @@ -168,7 +168,7 @@ def model_output_raw(self, response: Dict) -> Dict:
data["usage"] = dict(response["usage"])
return data

def model_output(self, response, max_completion_length: int) -> Dict:
def model_output(self, response, json_depth_limit: int) -> Dict:
data = self.model_output_raw(response)
data["parsed"] = self.parser.fit(data["text"], max_completion_length)
return data
data["parsed"] = self.parser.fit(data["text"], json_depth_limit)
return data

0 comments on commit 340a764

Please sign in to comment.