fix key error

This commit is contained in:
ishaan-jaff 2023-08-17 16:20:43 -07:00
parent 5c60a36105
commit 071302fd47

View file

@ -21,6 +21,7 @@ class AnthropicLLM:
self.encoding = encoding
self.default_max_tokens_to_sample = default_max_tokens_to_sample
self.completion_url = "https://api.anthropic.com/v1/complete"
self.api_key = api_key
self.validate_environment(api_key=api_key)
def validate_environment(self, api_key): # set up the environment required to run the model