From eb51f48bbedd6f52ba2ffca6c2dd6632be806fbf Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 18 Oct 2023 00:35:00 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20gh=20action=20s3=20bucket?= =?UTF-8?q?=20name,=20handle=20ollama=20err?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 2 +- server/continuedev/libs/llm/ollama.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index b9a0bae71..c1941f840 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -326,7 +326,7 @@ jobs: with: args: --acl public-read --follow-symlinks env: - AWS_S3_BUCKET: continue-server-binaries.s3.us-west-1.amazonaws.com + AWS_S3_BUCKET: continue-server-binaries AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_REGION: "us-west-1" diff --git a/server/continuedev/libs/llm/ollama.py b/server/continuedev/libs/llm/ollama.py index 92d41c577..b9842eb75 100644 --- a/server/continuedev/libs/llm/ollama.py +++ b/server/continuedev/libs/llm/ollama.py @@ -110,6 +110,12 @@ class Ollama(LLM): chunks = json_chunk.split("\n") for chunk in chunks: if chunk.strip() != "": - j = json.loads(chunk) + try: + j = json.loads(chunk) + except Exception as e: + logger.warning( + f"Error parsing Ollama response: {e} {chunk}" + ) + continue if "response" in j: yield j["response"]