summaryrefslogtreecommitdiff
path: root/py/chat.py
diff options
context:
space:
mode:
authorMartin Bielik <mx.bielik@gmail.com>2023-10-21 19:04:57 +0200
committerGitHub <noreply@github.com>2023-10-21 19:04:57 +0200
commitccf981974232636d08a48094bf9dad3812a43cc8 (patch)
tree611803cd36432c6e2cb68edf4cf3f81d502c4615 /py/chat.py
parent8f8083ba0eed23150020b698e74d9302f7212c5d (diff)
parent55c4e2ec836e48552b52fb4b7878f7b50f67b53b (diff)
downloadvim-ai-ccf981974232636d08a48094bf9dad3812a43cc8.tar.gz
Merge pull request #59 from madox2/base-url-config
Custom APIs, closes #55, closes #51
Diffstat (limited to 'py/chat.py')
-rw-r--r--py/chat.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/chat.py b/py/chat.py
index 93d31bf..6d88015 100644
--- a/py/chat.py
+++ b/py/chat.py
@@ -69,7 +69,8 @@ try:
**openai_options
}
printDebug("[chat] request: {}", request)
- response = openai_request('https://api.openai.com/v1/chat/completions', request, http_options)
+ url = config_options['endpoint_url']
+ response = openai_request(url, request, http_options)
def map_chunk(resp):
printDebug("[chat] response: {}", resp)
return resp['choices'][0]['delta'].get('content', '')