adding support for meta-llama-2

This commit is contained in:
Krrish Dholakia 2023-08-14 13:06:33 -07:00
parent b5875cc4bd
commit 6aff47083b
12 changed files with 220 additions and 43 deletions

View file

@ -13,6 +13,7 @@ class AnthropicError(Exception):
def __init__(self, status_code, message):
self.status_code = status_code
self.message = message
super().__init__(self.message) # Call the base class constructor with the parameters it needs
class AnthropicLLM:
@ -75,7 +76,6 @@ class AnthropicLLM:
print_verbose(f"raw model_response: {response.text}")
## RESPONSE OBJECT
completion_response = response.json()
print(f"completion_response: {completion_response}")
if "error" in completion_response:
raise AnthropicError(message=completion_response["error"], status_code=response.status_code)
else: