-
-
Notifications
You must be signed in to change notification settings - Fork 782
Modified the _config_get function to properly handle nested YAML values. #845
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
Conversation
…lues. @todo: Move config import functions to parent class to consolidate code.
@todo: Move config import functions to parent class to consolidate code.
…onfigGPT). - Added `rgx_capture` variable to config file. Provide a regex string with capture group(s), provides customizable approach to filtering GPT response (concatenates multiple capture groups, if provided). (Default: capture all.) - Improved `_config_get` to handle `n`-nested keys (e.g. `ollama.deepseek.rgx_capture`) Revamping of `ollama.py` - Removal of esoteric translation refusal handling and other such fixes. - Made child class of ConfigGPT - Use rgx_capture to filter output - Added `OLLAMA_MODEL_CONF` variable to imported keys - Due to `ollama` being an interface rather than a specific model, different config options are desirable depending on the model used. This additional key allows one to specify a sub-set of configs (e.g. `ollama.deepseek`, `ollama.llama`, etc.)
@SamuelWN |
@popcion I have never actually used the web mode and haven't ever gotten that message when using the command line. I searched for that error message, and the most likely culprit I found was: manga-image-translator/manga_translator/translators/__init__.py Lines 67 to 69 in 9cc3908
Though introduced only in a later merge (not this one), I could imagine that warning being triggered if the user provides manga-image-translator/manga_translator/config.py Lines 138 to 143 in 9cc3908
If changing the translator to |
The OmegaConf's
get
function does not appear to handle nested YAML values as expected.Instead of interpreting the value to the left of
.
as the parent key, it seems to interpret it literally (e.g. searches for a key namedchatgpt.chat_system_template
).The
select
function is able to handle nested values (and searches top-level keys with.
if_CONFIG_KEY
is empty). However, it will not search upward for thekey
, and instead returnsNone
, soget
is still required.ToDo: Move
gpt_config
stuff to a parent class