more episodes 1 2 3 4
This commit is contained in:
@@ -163,19 +163,15 @@ Reply with ONLY the Chinese translations, one per line, numbered the same way:
|
||||
response = client.chat.completions.create(
|
||||
model=model,
|
||||
messages=[
|
||||
{"role": "system", "content": "You translate children's show dialogue to Chinese. Reply with ONLY the translations."},
|
||||
{"role": "user", "content": prompt}
|
||||
],
|
||||
temperature=0.3,
|
||||
max_tokens=1000
|
||||
max_tokens=1000,
|
||||
extra_body={"thinking": {"type": "disabled"}} # Disable thinking
|
||||
)
|
||||
|
||||
message = response.choices[0].message
|
||||
result = message.content or ""
|
||||
|
||||
# GLM models may put response in reasoning_content
|
||||
if not result and hasattr(message, 'reasoning_content') and message.reasoning_content:
|
||||
result = message.reasoning_content
|
||||
result = message.content.strip() if message.content else ""
|
||||
|
||||
# Parse the numbered responses
|
||||
translations = []
|
||||
|
||||
Reference in New Issue
Block a user