-
Notifications
You must be signed in to change notification settings - Fork 0
/
.env.example
92 lines (80 loc) · 5.57 KB
/
.env.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# .env.example file to be copied to .evn file and adapted to your needs
# set log level (DEBUG, INFO, WARNING, ERROR, CRITICAL). This can be overriden on the
# command line (-v = INFO, -vv = DEBUG). Default is WARNING.
LOG_LEVEL=INFO
# input.po file context
# The input file itself. Usually provided on the command line but can also be set in the .env
# INPUT_PO=tests/input/input.po
# The output file. Usually provided on the command line but can also be set in the .env. Use auto_po_lyglot -h to see
# how the file name is computed if not provided.
# OUTPUT_PO=tests/output/output.po
# Primary language (msgids). Can be overriden on the command line
ORIGINAL_LANGUAGE=English
# And translation language (msgstrs). Can be overriden on the command line
CONTEXT_LANGUAGE=French
# Set the LLM client, can be openai, ollama, claude or claude_cached. Default is ollama.Can be overriden on the command line
# LLM_CLIENT=ollama
# Set the model, must be consistent with the LLM client. Leave undefined to use the default model for the client.
# Default values are for the ollama client: llama3.1:8b, openai: gpt-4o-2024-08-06 and claude:claude-3-5-sonnet-20240620
# Can be overriden on the command line
# LLM_MODEL="gemma2:2b"
# Depending on the LLM provider you chose, give below the proper API_KEY. No key needed for Ollama (free)
# Note these values will override the ones in the environment if they exist so put in comment if you want to use
# the ones in the environment.
# for OpenAI models, set:
OPENAI_API_KEY=[your API key goes here]
# for Claude models, set:
ANTHROPIC_API_KEY=[your API key goes here]
# for Grok models, set:
XAI_API_KEY=[your API key goes here]
# for Gemini models, set:
GEMINI_API_KEY=[your API key goes here]
# OLLAMA server URL when used with OpenAI API; The default value is for the Ollama local server
# There is no command line argument for this setting, so if your server does not run locally, please change it
OLLAMA_BASE_URL="http://localhost:11434/v1"
# the target languages to test for translation. Give a list of comma separated languages
# Can be overriden on the command line (only one laguage in this case)
TARGET_LANGUAGES=Italian,Spanish,German,Portuguese
# set the temperature of the LLM (ie its randomness). Value between 0 and 1. The higher the value, the more "creative" the translation.
# Can be overriden on the command line (-t)
TEMPERATURE=0.2
# The owner of the project containing the PO file. Can be overriden on the command line (--owner)
# OWNER=<OWNER>
# The email of the owner. Can be overriden on the command line (--owner_mail)
# OWNER_EMAIL=<OWNER EMAIL>
# Translate fuzzy entries in the PO file. Can be overriden on the command line (--fuzzy). Default is False
# FUZZY=False
# Force translating already translated entries. Can be overriden on the command line (-f or --force). Default is False
# FORCE=False
# Overwrite the output po file. Can be overriden on the command line (-o or --overwrite). Default is False
# OVERWRITE_OUTPUT=False
# Compile the output po file to an mo file. Can be overriden on the command line (-c or --compile). Default is False
# COMPILE=False
############################ PROMPTS ####################################################
# One prebuilt system and user prompts are provided by default in `default_prompts.py`. If you want, you can create
# below your own system and user prompts. The system prompt can use the following placeholders:
# {original_language}, {context_language}, {target_language}, {simple_original_phrase}, {simple_context_translation},
# {simple_target_translation}, {ambiguous_original_phrase}, {ambiguous_context_translation}, {ambiguous_target_translation},
# {ambiguous_explanation}, {po_placeholder_original_phrase_1}, {po_placeholder_original_phrase_2}, {po_placeholder_original_phrase_3},
# {po_placeholder_context_translation_1}, {po_placeholder_context_translation_2}, {po_placeholder_context_translation_3},
# {po_placeholder_target_translation_1}, {po_placeholder_target_translation_2}, {po_placeholder_target_translation_3}.
# (all phrases, explanations and translations are taken from the examples below),
#SYSTEM_PROMPT="You are a highly skilled translator with expertise in {original_language}, {context_language}, and {target_language}..."
# The user prompt can use only the following placeholders: {original_language}, {original_phrase}, {context_language}, {context_translation},
# also taken from the examples below.
#USER_PROMPT="{original_language} sentence: \"{original_phrase}\", {context_language} translation: \"{context_translation}\""
######################### STREAMLIT UI #######################################################
# Used only in streamlit UI, the list of models to show in the 'Model' select box per LMM.
# The format is a list of semi-colon separated strings, each string being formated like this <llm>|[llm|...]<comma separated list of models>.
# The models must the technical name used in the APIs of the LLMs. Default value is:
# MODELS_PER_LLM="
# ollama|llama3.1:8b,phi3,gemma2:2b;
# openai|gpt-4o-mini,chatgpt-4o-latest,gpt-4o,gpt-4-turbo,gpt-4-turbo-preview,gpt-4,gpt-3.5-turbo;
# claude|claude_cached|claude-3-5-sonnet-20240620,claude-3-opus-20240229,claude-3-sonnet-20240229,claude-3-haiku-20240307;
# gemini|gemini-1b,gemini-1.5b,gemini-2b,gemini-6b,gemini-12b;
# grok|grok-1b,grok-1.5b,grok-2b,grok-6b,grok-12b
# "
########################## DJANGO TRANSLATION ######################################################
# Used only when translating a django project.
# The path to the Django project directory. Can be overriden on the command line (--path)
# PATH=<PATH TO DJANGO PROJECT> # default is the current directory