Skip to content

Commit

Permalink
✨ Support union output types.
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Jan 22, 2024
1 parent 26bee8a commit da14b32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/funcchain/schema/signature.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from types import UnionType
from typing import Any, Generic, TypeVar

from langchain_core.messages import BaseMessage
Expand Down Expand Up @@ -27,7 +28,7 @@ class Signature(BaseModel, Generic[T]):
# -> e.g. Callbacks adds custom callbacks
# -> e.g. SystemMessage adds a system message

output_type: type[T]
output_type: type[T] | UnionType
""" Type to parse the output into. """

# todo: is history really needed? maybe this could be a background optimization
Expand Down

0 comments on commit da14b32

Please sign in to comment.