Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pass below parameters to avoid block? identifier, timestamp #91

Closed
nissansz opened this issue Jan 22, 2024 · 1 comment
Closed

Comments

@nissansz
Copy link

https://github.com/ptrstn/deepl-translate/blob/ca61c63ff23031291fbaf220de92018fb85a57f0/deepl/hacks.py#L21-L22

def generate_translation_request_data(
source_language,
target_language,
sentences,
identifier=MAGIC_NUMBER,
alternatives=1,
formality_tone=None,
):
return {
"jsonrpc": "2.0",
"method": "LMT_handle_jobs",
"params": {
"jobs": generate_jobs(sentences, beams=alternatives),
"lang": {
"user_preferred_langs": [target_language, source_language],
"source_lang_computed": source_language,
"target_lang": target_language,
},
"priority": 1,
"commonJobParams": generate_common_job_params(formality_tone),
"timestamp": generate_timestamp(sentences),
},
"id": identifier,
}

@missuo
Copy link
Member

missuo commented Jan 23, 2024

The code you sent is not from this repository.

@missuo missuo closed this as not planned Won't fix, can't repro, duplicate, stale Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants