🐛 fix gh action s3 bucket name, handle ollama err

This commit is contained in:
Nate Sesti 2023-10-18 00:35:00 -07:00
parent 8bd270f197
commit eb51f48bbe
2 changed files with 8 additions and 2 deletions

View file

@ -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"

View file

@ -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"]