summaryrefslogtreecommitdiff
path: root/continuedev/src
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-09-13 23:56:24 -0700
committerNate Sesti <sestinj@gmail.com>2023-09-13 23:56:24 -0700
commit59b7453afed06418d4c171b65370a6a82f5a9221 (patch)
treeae7ef8218ed003ad432544851f96f352eb779881 /continuedev/src
parent9fdc4a64a09a953237288313bd25f3775060e80c (diff)
downloadsncontinue-59b7453afed06418d4c171b65370a6a82f5a9221.tar.gz
sncontinue-59b7453afed06418d4c171b65370a6a82f5a9221.tar.bz2
sncontinue-59b7453afed06418d4c171b65370a6a82f5a9221.zip
fix: :bug: verify_ssl and ssl_context mutual exclusivity
Diffstat (limited to 'continuedev/src')
-rw-r--r--continuedev/src/continuedev/libs/llm/proxy_server.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/continuedev/src/continuedev/libs/llm/proxy_server.py b/continuedev/src/continuedev/libs/llm/proxy_server.py
index 032464be..3efa805f 100644
--- a/continuedev/src/continuedev/libs/llm/proxy_server.py
+++ b/continuedev/src/continuedev/libs/llm/proxy_server.py
@@ -35,10 +35,17 @@ class ProxyServer(LLM):
**kwargs,
):
await super().start(**kwargs)
- self._client_session = aiohttp.ClientSession(
- connector=aiohttp.TCPConnector(ssl_context=ssl_context, verify_ssl=self.verify_ssl),
- timeout=aiohttp.ClientTimeout(total=self.timeout),
- )
+ if self.verify_ssl is False:
+ self._client_session = aiohttp.ClientSession(
+ connector=aiohttp.TCPConnector(verify_ssl=False),
+ timeout=aiohttp.ClientTimeout(total=self.timeout),
+ )
+ else:
+ self._client_session = aiohttp.ClientSession(
+ connector=aiohttp.TCPConnector(ssl_context=ssl_context),
+ timeout=aiohttp.ClientTimeout(total=self.timeout),
+ )
+
self.context_length = MAX_TOKENS_FOR_MODEL[self.model]
async def stop(self):