Fix steamship import error (#7133)

Description: Fix steamship import error

When running multi_modal_output_agent:
field "steamship" not yet prepared so type is still a ForwardRef, you
might need to call SteamshipImageGenerationTool.update_forward_refs().

Tag maintainer: @hinthornw

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
pull/7218/head
Hyoseung Kim 1 year ago committed by GitHub
parent 7d92e9407b
commit 9abf1847f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,7 +27,7 @@ from langchain.tools.steamship_image_generation.utils import make_image_public
from langchain.utils import get_from_dict_or_env
if TYPE_CHECKING:
pass
from steamship import Steamship
class ModelName(str, Enum):
@ -44,12 +44,9 @@ SUPPORTED_IMAGE_SIZES = {
class SteamshipImageGenerationTool(BaseTool):
try:
from steamship import Steamship
except ImportError:
pass
"""Tool used to generate images from a text-prompt."""
model_name: ModelName
size: Optional[str] = "512x512"
steamship: Steamship

Loading…
Cancel
Save