Add bilingual storyboard prompts and English MiniMax H3 submission
This commit is contained in:
@@ -21,6 +21,10 @@ class Mock(BaseHTTPRequestHandler):
|
||||
def do_POST(self):
|
||||
body=json.loads(self.rfile.read(int(self.headers['Content-Length'])))
|
||||
if self.path.endswith('/chat/completions'):
|
||||
if 'tools' not in body:
|
||||
translated='Maintain continuity. Do not read these visual instructions aloud. '+ ' '.join(re.findall(r'__HB_KEEP_\d+__',body['messages'][-1]['content']))
|
||||
raw=json.dumps({'choices':[{'message':{'content':json.dumps({'translation':translated})}}]}).encode()
|
||||
self.send_response(200);self.send_header('Content-Type','application/json');self.end_headers();self.wfile.write(raw);return
|
||||
chat_posts.append(body)
|
||||
if len(chat_posts)==1:
|
||||
tool=next(t['function']['name'] for t in body['tools'] if 'storyboard' in t['function']['name'].lower() and ('context' in t['function']['name'].lower()))
|
||||
@@ -99,7 +103,7 @@ try:
|
||||
result=wait_task(task,status='completed');assert len(posts)==2
|
||||
sent=posts[-1];images=[x for x in sent['content'] if x['type']=='image_url']
|
||||
assert len(images)==1 and images[0]['role']=='first_frame' and images[0]['image_url']['url'].startswith('data:image/')
|
||||
assert sent['gpu']=='gpu3' and '@图片1' not in sent['content'][0]['text'] and '禁止朗读' in sent['content'][0]['text']
|
||||
assert sent['gpu']=='gpu3' and '@图片1' not in sent['content'][0]['text'] and 'Do not read' in sent['content'][0]['text']
|
||||
params=json.loads(result['params']);assert params['continuity']['sourceId']==2 and params['continuity']['frameUrl']
|
||||
assert api('GET','/storyboards/3/continuity')['stale'] is False
|
||||
# Changing previous video flags the existing downstream output without replacing it.
|
||||
|
||||
Reference in New Issue
Block a user