Skip to content

Commit

Permalink
Fix for coroutine in __repr__
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Nov 6, 2024
1 parent 1d8c3f8 commit b27b275
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion llm/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,11 @@ def from_row(cls, db, row):
return response

def __repr__(self):
text = '... not yet awaited ...'
if self._done:
text = "".join(self._chunks)
return "<Response prompt='{}' text='{}'>".format(
self.prompt.prompt, self.text()
self.prompt.prompt, text
)


Expand Down

0 comments on commit b27b275

Please sign in to comment.