media-agent-mcp 0.1.1__py3-none-any.whl → 0.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- media_agent_mcp/ai_models/seedance.py +4 -4
- media_agent_mcp/ai_models/seedream.py +1 -1
- media_agent_mcp/media_selectors/image_selector.py +1 -0
- media_agent_mcp/media_selectors/video_selector.py +1 -0
- media_agent_mcp/server.py +3 -1
- {media_agent_mcp-0.1.1.dist-info → media_agent_mcp-0.2.1.dist-info}/METADATA +1 -1
- {media_agent_mcp-0.1.1.dist-info → media_agent_mcp-0.2.1.dist-info}/RECORD +9 -9
- {media_agent_mcp-0.1.1.dist-info → media_agent_mcp-0.2.1.dist-info}/WHEEL +0 -0
- {media_agent_mcp-0.1.1.dist-info → media_agent_mcp-0.2.1.dist-info}/entry_points.txt +0 -0
@@ -222,21 +222,21 @@ def _poll_video_status(task_id: str, api_key: str, max_wait_time: int = 90) -> D
|
|
222
222
|
|
223
223
|
elif status in ['queued', 'running']:
|
224
224
|
# Continue polling
|
225
|
-
time.sleep(5)
|
225
|
+
time.sleep(0.5)
|
226
226
|
continue
|
227
227
|
|
228
228
|
else:
|
229
229
|
logger.warning(f"Unknown status: {status}")
|
230
|
-
time.sleep(5)
|
230
|
+
time.sleep(0.5)
|
231
231
|
continue
|
232
232
|
|
233
233
|
except requests.exceptions.RequestException as e:
|
234
234
|
logger.error(f"Error polling status: {str(e)}")
|
235
|
-
time.sleep(5)
|
235
|
+
time.sleep(0.5)
|
236
236
|
continue
|
237
237
|
except Exception as e:
|
238
238
|
logger.error(f"Unexpected error polling status: {str(e)}")
|
239
|
-
time.sleep(5)
|
239
|
+
time.sleep(0.5)
|
240
240
|
continue
|
241
241
|
|
242
242
|
return f"Error: Video generation timed out after {max_wait_time} seconds"
|
@@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
|
|
15
15
|
|
16
16
|
|
17
17
|
def generate_image(prompt: str, size: str = "1024x1024", guidance_scale: float = 2.5,
|
18
|
-
watermark: bool =
|
18
|
+
watermark: bool = False, seed: int = -1, **kwargs) -> Dict[str, Any]:
|
19
19
|
"""Generate an image using Seedream model.
|
20
20
|
|
21
21
|
Args:
|
@@ -110,6 +110,7 @@ def select_best_video(video_urls: List[str], prompt: str) -> dict:
|
|
110
110
|
|
111
111
|
try:
|
112
112
|
response = process_vlm_task(messages, is_json=True)
|
113
|
+
response = response['data']['response']
|
113
114
|
logger.info(f"model response: {response}")
|
114
115
|
|
115
116
|
except Exception as e:
|
media_agent_mcp/server.py
CHANGED
@@ -17,6 +17,7 @@ import argparse
|
|
17
17
|
import logging
|
18
18
|
from typing import Optional, Dict, Any
|
19
19
|
import json
|
20
|
+
from dotenv import load_dotenv
|
20
21
|
|
21
22
|
from mcp.server.fastmcp import FastMCP
|
22
23
|
|
@@ -34,6 +35,7 @@ logging.basicConfig(level=logging.INFO)
|
|
34
35
|
logger = logging.getLogger(__name__)
|
35
36
|
|
36
37
|
# Initialize FastMCP server (will be configured in main function)
|
38
|
+
load_dotenv()
|
37
39
|
mcp = FastMCP("Media Agent MCP")
|
38
40
|
|
39
41
|
|
@@ -361,7 +363,7 @@ def main():
|
|
361
363
|
"""Main entry point for the MCP server."""
|
362
364
|
# Parse command line arguments
|
363
365
|
parser = argparse.ArgumentParser(description='Media Agent MCP Server')
|
364
|
-
parser.add_argument('--transport', type=str, choices=['sse', 'stdio'], default='
|
366
|
+
parser.add_argument('--transport', type=str, choices=['sse', 'stdio'], default='sse',
|
365
367
|
help='Transport method: sse or stdio (default: stdio)')
|
366
368
|
parser.add_argument('--host', type=str, default='127.0.0.1',
|
367
369
|
help='Host for SSE transport (default: 127.0.0.1)')
|
@@ -1,18 +1,18 @@
|
|
1
1
|
media_agent_mcp/__init__.py,sha256=xOmCIpPlIRJH3RiA-dlBOhKlwyJp51XQRt2eeyU5EtI,255
|
2
|
-
media_agent_mcp/server.py,sha256=
|
2
|
+
media_agent_mcp/server.py,sha256=dQvc_hAdUTpvq8OrJmD6d83VTKfTh4AJv19VVraAQBc,13714
|
3
3
|
media_agent_mcp/ai_models/__init__.py,sha256=WN8JDSJbj2-sNwaQg3MDwmm9mvJTC1mqpWliac3sHoc,427
|
4
4
|
media_agent_mcp/ai_models/seed16.py,sha256=P3KHNF_SfLryJz6qFP7UUtBfw_28ubdrj2lJkt3WsY8,4989
|
5
|
-
media_agent_mcp/ai_models/seedance.py,sha256=
|
5
|
+
media_agent_mcp/ai_models/seedance.py,sha256=fv7hdxlwRtFqMnOG9o7Kx_-k2ihB6VBgN3wCoo-Y-Qs,9024
|
6
6
|
media_agent_mcp/ai_models/seededit.py,sha256=eLOox-8lZudTYe0CpWyONGHC8D12r7nakhkXIXmE7H4,3245
|
7
|
-
media_agent_mcp/ai_models/seedream.py,sha256=
|
7
|
+
media_agent_mcp/ai_models/seedream.py,sha256=lKWMRzV-ZjZ2JB93A3XYUOF7QfzP3zFMQleBtEOkuW8,4467
|
8
8
|
media_agent_mcp/media_selectors/__init__.py,sha256=eN3wyTPdHTsbW_xDyPXBLDaMA15YuI9qeiy-zeY7ZBQ,260
|
9
|
-
media_agent_mcp/media_selectors/image_selector.py,sha256=
|
10
|
-
media_agent_mcp/media_selectors/video_selector.py,sha256=
|
9
|
+
media_agent_mcp/media_selectors/image_selector.py,sha256=jVPgk3LiruMK2SJ4gPqCGkRmum2ahObTRbQ7q1sjvhg,4625
|
10
|
+
media_agent_mcp/media_selectors/video_selector.py,sha256=xgTyvuVSBTeZHQGFB6mjLvpYPGTodlHGuGZT3n8D2gA,6268
|
11
11
|
media_agent_mcp/storage/__init__.py,sha256=eio7ZiSeLjCxICSZwZisiR7wKJfXlT2PV7aDEQKBUQQ,215
|
12
12
|
media_agent_mcp/storage/tos_client.py,sha256=9c3GPmQe2stvxgZzsWYjVqKzVyvluZqYneCXYj-FQ3M,3174
|
13
13
|
media_agent_mcp/video/__init__.py,sha256=4ILnqYaUaYKI4GWOSg2SNZqt10UM1Y-8Q2SVvjoijqY,277
|
14
14
|
media_agent_mcp/video/processor.py,sha256=5ABPyj1IoD2xyIiB8dkEx4ZssPTXKHtuoFjy-dmnFks,11866
|
15
|
-
media_agent_mcp-0.
|
16
|
-
media_agent_mcp-0.
|
17
|
-
media_agent_mcp-0.
|
18
|
-
media_agent_mcp-0.
|
15
|
+
media_agent_mcp-0.2.1.dist-info/METADATA,sha256=t1XiDuJhEgQjyjYIKtxLzXtQNKDe1YgmGuptpudnwAI,10974
|
16
|
+
media_agent_mcp-0.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
17
|
+
media_agent_mcp-0.2.1.dist-info/entry_points.txt,sha256=kHB6iLdmnTsqibMZGfsGJzbj_ZU2uJiOfAMA8rYX8bg,64
|
18
|
+
media_agent_mcp-0.2.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|