Skip to content

Commit

Permalink
fix unique id
Browse files Browse the repository at this point in the history
  • Loading branch information
Wang Zhao committed Dec 9, 2022
1 parent a26ac99 commit cd99746
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ibl_ai_chatgpt_langchain/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,9 @@ def make_chat(self, unique_id: str, email: str, password: str, options=None):
class IBLChatGPT(LLM, BaseModel):
openai_email: t.Optional[str] = os.environ.get("OPENAI_EMAIL")
openai_password: t.Optional[str] = os.environ.get("OPENAI_PASSWORD")
unique_id = lambda self: uuid.uuid4()
unique_id = uuid.uuid4().hex

def __call__(self, prompt: str, stop=None) -> str:
if callable(self.unique_id):
self.unique_id = self.unique_id()
container = ChatClientContainer().get_client(
self.unique_id, self.openai_email, self.openai_password
)
Expand Down

0 comments on commit cd99746

Please sign in to comment.