Skip to content

Commit

Permalink
feat: all either dict or interface class to be passed
Browse files Browse the repository at this point in the history
  • Loading branch information
nsantacruz committed Feb 22, 2024
1 parent 3f8c76d commit df739db
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TopicPromptInput:
topic: Topic
sources: List[TopicPromptSource]

def __init__(self, lang: str, topic: dict, sources: List[Union[dict, TopicPromptSource]]):
def __init__(self, lang: str, topic: Union[dict, Topic], sources: List[Union[dict, TopicPromptSource]]):
self.lang = lang
self.topic = Topic(**topic)
self.sources = [s if isinstance(s, TopicPromptSource) else TopicPromptSource(**s) for s in sources]

0 comments on commit df739db

Please sign in to comment.