Skip to content

Commit

Permalink
fix: change api-key on reset
Browse files Browse the repository at this point in the history
  • Loading branch information
lss233 committed Mar 4, 2023
1 parent 52a8726 commit bfcb959
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions adapter/chatgpt/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ async def rollback(self):

async def on_reset(self):
self.bot.conversation = []
self.api_info = botManager.pick('openai-api')
self.bot = OpenAIChatbot(api_key=self.api_info.api_key, proxy=self.api_info.proxy)

async def ask(self, prompt: str) -> Generator[str, None, None]:
full_response = ''
Expand Down

0 comments on commit bfcb959

Please sign in to comment.