refactor config

This commit is contained in:
geekan 2024-02-01 13:45:00 +08:00
parent f3cb2cfbed
commit 62ca2ca90d
4 changed files with 10 additions and 10 deletions

View file

@ -29,11 +29,11 @@ s3:
bucket: "test"
AZURE_TTS_SUBSCRIPTION_KEY: "YOUR_SUBSCRIPTION_KEY"
AZURE_TTS_REGION: "eastus"
azure_tts_subscription_key: "YOUR_SUBSCRIPTION_KEY"
azure_tts_region: "eastus"
IFLYTEK_APP_ID: "YOUR_APP_ID"
IFLYTEK_API_KEY: "YOUR_API_KEY"
IFLYTEK_API_SECRET: "YOUR_API_SECRET"
iflytek_api_id: "YOUR_APP_ID"
iflytek_api_key: "YOUR_API_KEY"
iflytek_api_secret: "YOUR_API_SECRET"
METAGPT_TEXT_TO_IMAGE_MODEL_URL: "YOUR_MODEL_URL"
metagpt_tti_url: "YOUR_MODEL_URL"

View file

@ -247,7 +247,7 @@ paths:
description: "Model url."
required:
allOf:
- METAGPT_TEXT_TO_IMAGE_MODEL_URL
- metagpt_tti_url
post:
summary: "Text to Image"
description: "Generate an image from the provided text using the MetaGPT Text-to-Image API."

View file

@ -109,7 +109,7 @@ entities:
required:
oneOf:
- OPENAI_API_KEY
- METAGPT_TEXT_TO_IMAGE_MODEL_URL
- metagpt_tti_url
parameters:
text:
description: 'The text used for image conversion.'

View file

@ -23,9 +23,9 @@ class TestSkillAction:
"type": "string",
"description": "OpenAI API key, For more details, checkout: `https://platform.openai.com/account/api-keys`",
},
"METAGPT_TEXT_TO_IMAGE_MODEL_URL": {"type": "string", "description": "Model url."},
"metagpt_tti_url": {"type": "string", "description": "Model url."},
},
"required": {"oneOf": ["OPENAI_API_KEY", "METAGPT_TEXT_TO_IMAGE_MODEL_URL"]},
"required": {"oneOf": ["OPENAI_API_KEY", "metagpt_tti_url"]},
},
parameters={
"text": Parameter(type="string", description="The text used for image conversion."),