Skip to content

Commit

Permalink
Merge pull request #62 from jan-janssen/fix_anthropic_output
Browse files Browse the repository at this point in the history
Fix bug with anthropic output
  • Loading branch information
jan-janssen authored Aug 30, 2024
2 parents 8b90e5c + 11ba2b4 commit d96f3fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions langsim/magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def chat(self, line, cell=None):
self.messages.append(("ai", output))
if args.raw:
return Markdown(f"```\n{output}\n```\n")
elif isinstance(output, list) and isinstance(output[-1], dict):
return Markdown(output[-1]['text'])
else:
return Markdown(output)

Expand Down

0 comments on commit d96f3fb

Please sign in to comment.