fixing openai key isue
This commit is contained in:
parent
f5c968b879
commit
f25671cd18
1 changed files with 1 additions and 4 deletions
|
|
@ -29,10 +29,7 @@ class OpenAI(LLM):
|
|||
self.default_model = default_model
|
||||
self.system_message = system_message
|
||||
|
||||
@validator("api_key", pre=True, always=True)
|
||||
def validate_api_key(cls, v):
|
||||
openai.api_key = v
|
||||
return v
|
||||
openai.api_key = api_key
|
||||
|
||||
@cached_property
|
||||
def __encoding_for_model(self):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue