Skip to content

Commit

Permalink
improved templating for extracted text
Browse files Browse the repository at this point in the history
  • Loading branch information
emcf committed Apr 20, 2024
1 parent 46274df commit 2edefca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='thepipe_api',
version='0.2.7',
version='0.2.8',
author='Emmett McFarlane',
author_email='[email protected]',
description='Automate information extraction for multimodal LLMs.',
Expand Down
4 changes: 3 additions & 1 deletion thepipe_api/thepipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ def save_outputs(chunks: List[Chunk], verbose: bool = False, text_only: bool = F
for i, chunk in enumerate(chunks):
if chunk is None:
continue
if chunk.path is not None:
text += f'{chunk.path}:\n'
if chunk.text is not None:
text += chunk.text
text += f'```\n{chunk.text}```\n\n'
if (chunk.image is not None) and (not text_only):
if chunk.path is None:
clean_path = f"image"
Expand Down

0 comments on commit 2edefca

Please sign in to comment.