summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--continuedev/src/continuedev/libs/llm/ggml.py6
-rw-r--r--extension/src/activation/environmentSetup.ts16
2 files changed, 17 insertions, 5 deletions
diff --git a/continuedev/src/continuedev/libs/llm/ggml.py b/continuedev/src/continuedev/libs/llm/ggml.py
index b2ebaf7e..70c265d9 100644
--- a/continuedev/src/continuedev/libs/llm/ggml.py
+++ b/continuedev/src/continuedev/libs/llm/ggml.py
@@ -38,7 +38,7 @@ class GGML(LLM):
completion = ""
async with aiohttp.ClientSession(
connector=aiohttp.TCPConnector(verify_ssl=self.verify_ssl),
- timeout=self.timeout
+ timeout=aiohttp.ClientTimeout(total=self.timeout),
) as client_session:
async with client_session.post(
f"{self.server_url}/v1/completions", json={"messages": messages, **args}
@@ -72,7 +72,7 @@ class GGML(LLM):
async def generator():
async with aiohttp.ClientSession(
connector=aiohttp.TCPConnector(verify_ssl=self.verify_ssl),
- timeout=self.timeout
+ timeout=aiohttp.ClientTimeout(total=self.timeout),
) as client_session:
async with client_session.post(
f"{self.server_url}/v1/chat/completions",
@@ -121,7 +121,7 @@ class GGML(LLM):
self.write_log(f"Prompt: \n\n{prompt}")
async with aiohttp.ClientSession(
connector=aiohttp.TCPConnector(verify_ssl=self.verify_ssl),
- timeout=self.timeout
+ timeout=aiohttp.ClientTimeout(total=self.timeout),
) as client_session:
async with client_session.post(
f"{self.server_url}/v1/completions",
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts
index 3aa536d0..9be495ff 100644
--- a/extension/src/activation/environmentSetup.ts
+++ b/extension/src/activation/environmentSetup.ts
@@ -236,7 +236,13 @@ export async function startContinuePythonServer(redownload: boolean = true) {
}
if (shouldDownload && redownload) {
- await vscode.window.withProgress(
+ let timeout = setTimeout(() => {
+ vscode.window.showErrorMessage(
+ `It looks like the Continue server is taking a while to download. If this persists, you can manually download the binary or run it from source: https://continue.dev/docs/troubleshooting#run-the-server-manually.`
+ );
+ }, 20_000);
+
+ let download = vscode.window.withProgress(
{
location: vscode.ProgressLocation.Notification,
title: "Installing Continue server...",
@@ -246,7 +252,13 @@ export async function startContinuePythonServer(redownload: boolean = true) {
await downloadFromS3(bucket, fileName, destination, "us-west-1");
}
);
- console.log("Downloaded server executable at ", destination);
+ try {
+ await download;
+ console.log("Downloaded server executable at ", destination);
+ clearTimeout(timeout);
+ } catch (e) {
+ console.log("Failed to download server executable", e);
+ }
}
// Get name of the corresponding executable for platform