diff options
| author | Martin Bielik <mx.bielik@gmail.com> | 2023-03-22 22:14:25 +0100 |
|---|---|---|
| committer | Martin Bielik <mx.bielik@gmail.com> | 2023-03-22 22:14:25 +0100 |
| commit | 08036fb76c437b705d916708d903c7c6c2eef0ba (patch) | |
| tree | f8d1c4f3f652c13c265d2f75e104f3b3907c4551 /py/utils.py | |
| parent | 9b707d99b106c6535e476f00095053b470428bcc (diff) | |
| download | vim-ai-08036fb76c437b705d916708d903c7c6c2eef0ba.tar.gz | |
completion configuration
Diffstat (limited to '')
| -rw-r--r-- | py/utils.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/py/utils.py b/py/utils.py index c9e88f2..8366eec 100644 --- a/py/utils.py +++ b/py/utils.py @@ -10,3 +10,12 @@ def load_api_key(): except Exception: pass return api_key.strip() + +def make_options(): + options_default = vim.eval("options_default") + options_user = vim.eval("options") + options = {**options_default, **options_user} + options['request_timeout'] = float(options['request_timeout']) + options['temperature'] = float(options['temperature']) + options['max_tokens'] = int(options['max_tokens']) + return options |