Skip to content

Commit

Permalink
fix: erroneous if statement (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerHYang authored Feb 1, 2024
1 parent 37335ca commit e92afc1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def _prompt_template(serialized: Optional[Mapping[str, Any]]) -> Iterator[Tuple[
return
assert isinstance(kwargs, dict), f"expected dict, found {type(kwargs)}"
for obj in kwargs.values():
if not hasattr(obj, "get") or (id_ := obj.get("id")):
if not hasattr(obj, "get") or not (id_ := obj.get("id")):
continue
# The `id` field of the object is a list indicating the path to the
# object's class in the LangChain package, e.g. `PromptTemplate` in
Expand Down

0 comments on commit e92afc1

Please sign in to comment.