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

Enable user setting of language tag parameter #8

Open
castedo opened this issue Jan 14, 2024 · 2 comments
Open

Enable user setting of language tag parameter #8

castedo opened this issue Jan 14, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@castedo
Copy link
Owner

castedo commented Jan 14, 2024

Let lang_tag act as a standard parameter to be automatically passed to prompt (request) settings. This is for values per https://datatracker.ietf.org/doc/html/rfc5646
https://www.rfc-editor.org/info/bcp47
https://en.wikipedia.org/wiki/IETF_language_tag
and the HTML lang tag.

Check a top-level key in the user config file (copyaid.toml) for lang_tag if a user wants to set it.

Extra nice addition feature is to

import locale
'-'.join(locale.getlocale()[0].split('_'))

to automatically populate this parameter if it is not specified in the config file.

@castedo castedo added the enhancement New feature or request label Jan 14, 2024
@castedo
Copy link
Owner Author

castedo commented Jan 14, 2024

Or maybe the key should be under [parameters] like:

[parameters]
lang_tag = 'en-US'

@castedo
Copy link
Owner Author

castedo commented Jan 18, 2024

Or maybe within a descriptive defaults tables like:

[defaults.instruction]
parameters = { lang_tag = "en-GB" }

An advanced hook to allow special cases is a per task-instruction setting like

tasks.foobarit.instructions]
on = { prompt = "foobar.toml", parameters = { lang_tag = "en-GB" } }

or equiv

[tasks.foobarit.instructions.on.parameters]
lang_tag = "en-GB"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant