Skip to content

Commit

Permalink
fix the error when first regen
Browse files Browse the repository at this point in the history
Signed-off-by: pengzhile <[email protected]>
  • Loading branch information
pengzhile committed Apr 23, 2023
1 parent bcd1b7f commit 26663b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pandora/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-

__version__ = '1.0.4'
__version__ = '1.0.5'
6 changes: 5 additions & 1 deletion src/pandora/bots/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,15 @@ def goon(self):

def regenerate(self):
payload = request.json

conversation_id = payload.get('conversation_id')
if not conversation_id:
return self.talk()

prompt = payload['prompt']
model = payload['model']
message_id = payload['message_id']
parent_message_id = payload['parent_message_id']
conversation_id = payload['conversation_id']
stream = payload.get('stream', True)

return self.__process_stream(
Expand Down

0 comments on commit 26663b8

Please sign in to comment.