fix: 🐛 don't override context length param in OpenAI

This commit is contained in:
Nate Sesti 2023-09-28 11:30:17 -07:00
parent a7cb0929bd
commit b2a6d07ea9

View file

@ -81,7 +81,8 @@ class OpenAI(LLM):
):
await super().start(write_log=write_log, unique_id=unique_id)
self.context_length = MAX_TOKENS_FOR_MODEL.get(self.model, 4096)
if self.context_length is None:
self.context_length = MAX_TOKENS_FOR_MODEL.get(self.model, 4096)
openai.api_key = self.api_key
if self.api_type is not None: