chatterer 0.1.26__py3-none-any.whl → 0.1.28__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. chatterer/__init__.py +87 -87
  2. chatterer/common_types/__init__.py +21 -21
  3. chatterer/common_types/io.py +19 -19
  4. chatterer/constants.py +5 -0
  5. chatterer/examples/__main__.py +75 -75
  6. chatterer/examples/any2md.py +83 -85
  7. chatterer/examples/pdf2md.py +231 -338
  8. chatterer/examples/pdf2txt.py +52 -54
  9. chatterer/examples/ppt.py +487 -486
  10. chatterer/examples/pw.py +141 -143
  11. chatterer/examples/snippet.py +54 -56
  12. chatterer/examples/transcribe.py +192 -192
  13. chatterer/examples/upstage.py +87 -89
  14. chatterer/examples/web2md.py +80 -80
  15. chatterer/interactive.py +422 -354
  16. chatterer/language_model.py +530 -536
  17. chatterer/messages.py +21 -21
  18. chatterer/tools/__init__.py +46 -46
  19. chatterer/tools/caption_markdown_images.py +388 -384
  20. chatterer/tools/citation_chunking/__init__.py +3 -3
  21. chatterer/tools/citation_chunking/chunks.py +51 -53
  22. chatterer/tools/citation_chunking/citation_chunker.py +117 -118
  23. chatterer/tools/citation_chunking/citations.py +284 -285
  24. chatterer/tools/citation_chunking/prompt.py +157 -157
  25. chatterer/tools/citation_chunking/reference.py +26 -26
  26. chatterer/tools/citation_chunking/utils.py +138 -138
  27. chatterer/tools/convert_pdf_to_markdown.py +634 -645
  28. chatterer/tools/convert_to_text.py +446 -446
  29. chatterer/tools/upstage_document_parser.py +704 -705
  30. chatterer/tools/webpage_to_markdown.py +739 -739
  31. chatterer/tools/youtube.py +146 -147
  32. chatterer/utils/__init__.py +15 -15
  33. chatterer/utils/base64_image.py +349 -350
  34. chatterer/utils/bytesio.py +59 -59
  35. chatterer/utils/code_agent.py +237 -237
  36. chatterer/utils/imghdr.py +145 -145
  37. {chatterer-0.1.26.dist-info → chatterer-0.1.28.dist-info}/METADATA +377 -390
  38. chatterer-0.1.28.dist-info/RECORD +43 -0
  39. chatterer-0.1.26.dist-info/RECORD +0 -42
  40. {chatterer-0.1.26.dist-info → chatterer-0.1.28.dist-info}/WHEEL +0 -0
  41. {chatterer-0.1.26.dist-info → chatterer-0.1.28.dist-info}/entry_points.txt +0 -0
  42. {chatterer-0.1.26.dist-info → chatterer-0.1.28.dist-info}/top_level.txt +0 -0
chatterer/messages.py CHANGED
@@ -1,21 +1,21 @@
1
- from langchain_core.language_models.base import LanguageModelInput
2
- from langchain_core.messages import (
3
- AIMessage,
4
- BaseMessage,
5
- BaseMessageChunk,
6
- FunctionMessage,
7
- HumanMessage,
8
- SystemMessage,
9
- )
10
- from langchain_core.messages.ai import UsageMetadata
11
-
12
- __all__ = [
13
- "AIMessage",
14
- "BaseMessage",
15
- "HumanMessage",
16
- "SystemMessage",
17
- "FunctionMessage",
18
- "BaseMessageChunk",
19
- "UsageMetadata",
20
- "LanguageModelInput",
21
- ]
1
+ from langchain_core.language_models.base import LanguageModelInput
2
+ from langchain_core.messages import (
3
+ AIMessage,
4
+ BaseMessage,
5
+ BaseMessageChunk,
6
+ FunctionMessage,
7
+ HumanMessage,
8
+ SystemMessage,
9
+ )
10
+ from langchain_core.messages.ai import UsageMetadata
11
+
12
+ __all__ = [
13
+ "AIMessage",
14
+ "BaseMessage",
15
+ "HumanMessage",
16
+ "SystemMessage",
17
+ "FunctionMessage",
18
+ "BaseMessageChunk",
19
+ "UsageMetadata",
20
+ "LanguageModelInput",
21
+ ]
@@ -1,46 +1,46 @@
1
- from .caption_markdown_images import MarkdownLink, acaption_markdown_images, caption_markdown_images
2
- from .citation_chunking import citation_chunker
3
- from .convert_pdf_to_markdown import PdfToMarkdown, extract_text_from_pdf, open_pdf, render_pdf_as_image
4
- from .convert_to_text import (
5
- CodeSnippets,
6
- anything_to_markdown,
7
- get_default_html_to_markdown_options,
8
- html_to_markdown,
9
- pdf_to_text,
10
- pyscripts_to_snippets,
11
- )
12
- from .upstage_document_parser import UpstageDocumentParseParser
13
- from .webpage_to_markdown import (
14
- PlayWrightBot,
15
- PlaywrightLaunchOptions,
16
- PlaywrightOptions,
17
- PlaywrightPersistencyOptions,
18
- get_default_playwright_launch_options,
19
- )
20
- from .youtube import get_youtube_video_details, get_youtube_video_subtitle
21
-
22
- __all__ = [
23
- "html_to_markdown",
24
- "anything_to_markdown",
25
- "pdf_to_text",
26
- "get_default_html_to_markdown_options",
27
- "pyscripts_to_snippets",
28
- "citation_chunker",
29
- "webpage_to_markdown",
30
- "get_youtube_video_subtitle",
31
- "get_youtube_video_details",
32
- "CodeSnippets",
33
- "PlayWrightBot",
34
- "PlaywrightLaunchOptions",
35
- "PlaywrightOptions",
36
- "PlaywrightPersistencyOptions",
37
- "get_default_playwright_launch_options",
38
- "UpstageDocumentParseParser",
39
- "acaption_markdown_images",
40
- "caption_markdown_images",
41
- "MarkdownLink",
42
- "PdfToMarkdown",
43
- "extract_text_from_pdf",
44
- "open_pdf",
45
- "render_pdf_as_image",
46
- ]
1
+ from .caption_markdown_images import MarkdownLink, acaption_markdown_images, caption_markdown_images
2
+ from .citation_chunking import citation_chunker
3
+ from .convert_pdf_to_markdown import PdfToMarkdown, extract_text_from_pdf, open_pdf, render_pdf_as_image
4
+ from .convert_to_text import (
5
+ CodeSnippets,
6
+ anything_to_markdown,
7
+ get_default_html_to_markdown_options,
8
+ html_to_markdown,
9
+ pdf_to_text,
10
+ pyscripts_to_snippets,
11
+ )
12
+ from .upstage_document_parser import UpstageDocumentParseParser
13
+ from .webpage_to_markdown import (
14
+ PlayWrightBot,
15
+ PlaywrightLaunchOptions,
16
+ PlaywrightOptions,
17
+ PlaywrightPersistencyOptions,
18
+ get_default_playwright_launch_options,
19
+ )
20
+ from .youtube import get_youtube_video_details, get_youtube_video_subtitle
21
+
22
+ __all__ = [
23
+ "html_to_markdown",
24
+ "anything_to_markdown",
25
+ "pdf_to_text",
26
+ "get_default_html_to_markdown_options",
27
+ "pyscripts_to_snippets",
28
+ "citation_chunker",
29
+ "webpage_to_markdown",
30
+ "get_youtube_video_subtitle",
31
+ "get_youtube_video_details",
32
+ "CodeSnippets",
33
+ "PlayWrightBot",
34
+ "PlaywrightLaunchOptions",
35
+ "PlaywrightOptions",
36
+ "PlaywrightPersistencyOptions",
37
+ "get_default_playwright_launch_options",
38
+ "UpstageDocumentParseParser",
39
+ "acaption_markdown_images",
40
+ "caption_markdown_images",
41
+ "MarkdownLink",
42
+ "PdfToMarkdown",
43
+ "extract_text_from_pdf",
44
+ "open_pdf",
45
+ "render_pdf_as_image",
46
+ ]