mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-05 14:55:18 +02:00
feat: +x-prerequisite
This commit is contained in:
parent
9b890275c4
commit
13eddeae2f
2 changed files with 11 additions and 7 deletions
|
|
@ -28,7 +28,7 @@ def text_to_image(text, size_type: str = "512x512", openai_api_key="", model_url
|
|||
"""
|
||||
initialize_environment()
|
||||
image_declaration = "data:image/png;base64,"
|
||||
if os.environ.get("METAGPT_TEXT_TO_IMAGE_MODEL") or model_url:
|
||||
if os.environ.get("METAGPT_TEXT_TO_IMAGE_MODEL_URL") or model_url:
|
||||
data = oas3_metagpt_text_to_image(text, size_type, model_url)
|
||||
return image_declaration + data if data else ""
|
||||
if os.environ.get("OPENAI_API_KEY") or openai_api_key:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue