Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillatrev committed Dec 20, 2023
1 parent 98a877c commit ec67023
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rev_ai/models/asynchronous/summarization_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ def __init__(

@classmethod
def from_json(cls, json):
if json is None:
return None

return cls(
json.get('prompt'),
json.get('model'),
Expand Down
2 changes: 2 additions & 0 deletions src/rev_ai/models/asynchronous/translation_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def __init__(

@classmethod
def from_json(cls, json):
if json is None:
return None
return cls(
[TranslationLanguage.from_json(tl) for tl in json.get('target_languages')],
json.get('completed_on')
Expand Down

0 comments on commit ec67023

Please sign in to comment.