From c1868ed4dcbb8acaf637b129f8a0f717a41cf5f2 Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Mon, 27 Mar 2023 22:49:07 +0200 Subject: chat initial prompt poc --- py/utils.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'py/utils.py') 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 + -- cgit v1.2.3