Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
Add default fallback chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
albemordo committed Mar 5, 2024
1 parent 42d2fba commit 6c16bc4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions prem_utils/connectors/anthropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ def parse_chunk(self, chunk):
}
],
}
else:
return {
"id": 0,
"model": None,
"object": None,
"created": None,
"choices": [
{
"delta": {"content": "", "role": "assistant"},
"finish_reason": None,
}
],
}

def preprocess_messages(self, messages):
system_prompt = ""
Expand Down

0 comments on commit 6c16bc4

Please sign in to comment.