diff options
| author | Martin Bielik <mx.bielik@gmail.com> | 2023-03-27 22:49:07 +0200 |
|---|---|---|
| committer | Martin Bielik <mx.bielik@gmail.com> | 2023-03-27 22:49:07 +0200 |
| commit | c1868ed4dcbb8acaf637b129f8a0f717a41cf5f2 (patch) | |
| tree | 3b28d61905b9aa640ae99183508073ffd982b556 /py/utils.py | |
| parent | 8af2250ee04a228e064a750f341812c02134081d (diff) | |
| download | vim-ai-c1868ed4dcbb8acaf637b129f8a0f717a41cf5f2.tar.gz | |
chat initial prompt poc
Diffstat (limited to 'py/utils.py')
| -rw-r--r-- | py/utils.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/py/utils.py b/py/utils.py index 8366eec..3e5295a 100644 --- a/py/utils.py +++ b/py/utils.py @@ -15,7 +15,14 @@ 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 + +def make_request_options(): + options = make_options() + request_options = {} + request_options['model'] = options['model'] + request_options['max_tokens'] = int(options['max_tokens']) + request_options['temperature'] = float(options['temperature']) + request_options['request_timeout'] = float(options['request_timeout']) + return request_options + |