diff options
| author | Martin Bielik <mx.bielik@gmail.com> | 2023-04-09 19:41:41 +0200 |
|---|---|---|
| committer | Martin Bielik <mx.bielik@gmail.com> | 2023-04-09 19:41:41 +0200 |
| commit | e0c2ed98264372476ca081eca18ffef17337c869 (patch) | |
| tree | 8558c65792422c1eef5c3c09fff6708c6957df95 /py/utils.py | |
| parent | b459db087fbef3b1fac21846b6cb7e9a5e778259 (diff) | |
| download | vim-ai-e0c2ed98264372476ca081eca18ffef17337c869.tar.gz | |
parse chat header options
Diffstat (limited to 'py/utils.py')
| -rw-r--r-- | py/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/py/utils.py b/py/utils.py index 68a4ee9..bcc5309 100644 --- a/py/utils.py +++ b/py/utils.py @@ -11,11 +11,11 @@ def load_api_key(): pass return api_key.strip() -def make_options(): - return vim.eval("options") +def make_options(options_custom = {}): + options_config = vim.eval("options") + return {**options_config, **options_custom} -def make_request_options(): - options = make_options() +def make_request_options(options): request_options = {} request_options['model'] = options['model'] request_options['max_tokens'] = int(options['max_tokens']) |