chatterer 0.1.16__py3-none-any.whl → 0.1.17__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 (33) hide show
  1. chatterer/__init__.py +93 -93
  2. chatterer/common_types/__init__.py +21 -21
  3. chatterer/common_types/io.py +19 -19
  4. chatterer/interactive.py +354 -692
  5. chatterer/language_model.py +533 -533
  6. chatterer/messages.py +21 -21
  7. chatterer/strategies/__init__.py +13 -13
  8. chatterer/strategies/atom_of_thoughts.py +975 -975
  9. chatterer/strategies/base.py +14 -14
  10. chatterer/tools/__init__.py +46 -46
  11. chatterer/tools/caption_markdown_images.py +384 -384
  12. chatterer/tools/citation_chunking/__init__.py +3 -3
  13. chatterer/tools/citation_chunking/chunks.py +53 -53
  14. chatterer/tools/citation_chunking/citation_chunker.py +118 -118
  15. chatterer/tools/citation_chunking/citations.py +285 -285
  16. chatterer/tools/citation_chunking/prompt.py +157 -157
  17. chatterer/tools/citation_chunking/reference.py +26 -26
  18. chatterer/tools/citation_chunking/utils.py +138 -138
  19. chatterer/tools/convert_pdf_to_markdown.py +302 -302
  20. chatterer/tools/convert_to_text.py +447 -447
  21. chatterer/tools/upstage_document_parser.py +705 -705
  22. chatterer/tools/webpage_to_markdown.py +739 -739
  23. chatterer/tools/youtube.py +146 -146
  24. chatterer/utils/__init__.py +15 -15
  25. chatterer/utils/base64_image.py +285 -285
  26. chatterer/utils/bytesio.py +59 -59
  27. chatterer/utils/code_agent.py +237 -237
  28. chatterer/utils/imghdr.py +148 -148
  29. {chatterer-0.1.16.dist-info → chatterer-0.1.17.dist-info}/METADATA +392 -392
  30. chatterer-0.1.17.dist-info/RECORD +33 -0
  31. {chatterer-0.1.16.dist-info → chatterer-0.1.17.dist-info}/WHEEL +1 -1
  32. chatterer-0.1.16.dist-info/RECORD +0 -33
  33. {chatterer-0.1.16.dist-info → chatterer-0.1.17.dist-info}/top_level.txt +0 -0
chatterer/__init__.py CHANGED
@@ -1,93 +1,93 @@
1
- from .interactive import interactive_shell
2
- from .language_model import Chatterer
3
- from .messages import (
4
- AIMessage,
5
- BaseMessage,
6
- BaseMessageChunk,
7
- FunctionMessage,
8
- HumanMessage,
9
- LanguageModelInput,
10
- SystemMessage,
11
- UsageMetadata,
12
- )
13
- from .strategies import (
14
- AoTPipeline,
15
- AoTPrompter,
16
- AoTStrategy,
17
- BaseStrategy,
18
- )
19
- from .tools import (
20
- CodeSnippets,
21
- MarkdownLink,
22
- PdfToMarkdown,
23
- PlayWrightBot,
24
- PlaywrightLaunchOptions,
25
- PlaywrightOptions,
26
- PlaywrightPersistencyOptions,
27
- UpstageDocumentParseParser,
28
- acaption_markdown_images,
29
- anything_to_markdown,
30
- caption_markdown_images,
31
- citation_chunker,
32
- extract_text_from_pdf,
33
- get_default_html_to_markdown_options,
34
- get_default_playwright_launch_options,
35
- get_youtube_video_details,
36
- get_youtube_video_subtitle,
37
- html_to_markdown,
38
- open_pdf,
39
- pdf_to_text,
40
- pyscripts_to_snippets,
41
- render_pdf_as_image,
42
- )
43
- from .utils import (
44
- Base64Image,
45
- CodeExecutionResult,
46
- FunctionSignature,
47
- get_default_repl_tool,
48
- insert_callables_into_global,
49
- )
50
-
51
- __all__ = [
52
- "BaseStrategy",
53
- "Chatterer",
54
- "AoTStrategy",
55
- "AoTPipeline",
56
- "AoTPrompter",
57
- "html_to_markdown",
58
- "anything_to_markdown",
59
- "pdf_to_text",
60
- "get_default_html_to_markdown_options",
61
- "pyscripts_to_snippets",
62
- "citation_chunker",
63
- "BaseMessage",
64
- "HumanMessage",
65
- "SystemMessage",
66
- "AIMessage",
67
- "FunctionMessage",
68
- "Base64Image",
69
- "FunctionSignature",
70
- "CodeExecutionResult",
71
- "get_default_repl_tool",
72
- "insert_callables_into_global",
73
- "get_youtube_video_subtitle",
74
- "get_youtube_video_details",
75
- "interactive_shell",
76
- "UpstageDocumentParseParser",
77
- "BaseMessageChunk",
78
- "CodeSnippets",
79
- "LanguageModelInput",
80
- "UsageMetadata",
81
- "PlayWrightBot",
82
- "PlaywrightLaunchOptions",
83
- "PlaywrightOptions",
84
- "PlaywrightPersistencyOptions",
85
- "get_default_playwright_launch_options",
86
- "acaption_markdown_images",
87
- "caption_markdown_images",
88
- "MarkdownLink",
89
- "PdfToMarkdown",
90
- "extract_text_from_pdf",
91
- "open_pdf",
92
- "render_pdf_as_image",
93
- ]
1
+ from .interactive import interactive_shell
2
+ from .language_model import Chatterer
3
+ from .messages import (
4
+ AIMessage,
5
+ BaseMessage,
6
+ BaseMessageChunk,
7
+ FunctionMessage,
8
+ HumanMessage,
9
+ LanguageModelInput,
10
+ SystemMessage,
11
+ UsageMetadata,
12
+ )
13
+ from .strategies import (
14
+ AoTPipeline,
15
+ AoTPrompter,
16
+ AoTStrategy,
17
+ BaseStrategy,
18
+ )
19
+ from .tools import (
20
+ CodeSnippets,
21
+ MarkdownLink,
22
+ PdfToMarkdown,
23
+ PlayWrightBot,
24
+ PlaywrightLaunchOptions,
25
+ PlaywrightOptions,
26
+ PlaywrightPersistencyOptions,
27
+ UpstageDocumentParseParser,
28
+ acaption_markdown_images,
29
+ anything_to_markdown,
30
+ caption_markdown_images,
31
+ citation_chunker,
32
+ extract_text_from_pdf,
33
+ get_default_html_to_markdown_options,
34
+ get_default_playwright_launch_options,
35
+ get_youtube_video_details,
36
+ get_youtube_video_subtitle,
37
+ html_to_markdown,
38
+ open_pdf,
39
+ pdf_to_text,
40
+ pyscripts_to_snippets,
41
+ render_pdf_as_image,
42
+ )
43
+ from .utils import (
44
+ Base64Image,
45
+ CodeExecutionResult,
46
+ FunctionSignature,
47
+ get_default_repl_tool,
48
+ insert_callables_into_global,
49
+ )
50
+
51
+ __all__ = [
52
+ "BaseStrategy",
53
+ "Chatterer",
54
+ "AoTStrategy",
55
+ "AoTPipeline",
56
+ "AoTPrompter",
57
+ "html_to_markdown",
58
+ "anything_to_markdown",
59
+ "pdf_to_text",
60
+ "get_default_html_to_markdown_options",
61
+ "pyscripts_to_snippets",
62
+ "citation_chunker",
63
+ "BaseMessage",
64
+ "HumanMessage",
65
+ "SystemMessage",
66
+ "AIMessage",
67
+ "FunctionMessage",
68
+ "Base64Image",
69
+ "FunctionSignature",
70
+ "CodeExecutionResult",
71
+ "get_default_repl_tool",
72
+ "insert_callables_into_global",
73
+ "get_youtube_video_subtitle",
74
+ "get_youtube_video_details",
75
+ "interactive_shell",
76
+ "UpstageDocumentParseParser",
77
+ "BaseMessageChunk",
78
+ "CodeSnippets",
79
+ "LanguageModelInput",
80
+ "UsageMetadata",
81
+ "PlayWrightBot",
82
+ "PlaywrightLaunchOptions",
83
+ "PlaywrightOptions",
84
+ "PlaywrightPersistencyOptions",
85
+ "get_default_playwright_launch_options",
86
+ "acaption_markdown_images",
87
+ "caption_markdown_images",
88
+ "MarkdownLink",
89
+ "PdfToMarkdown",
90
+ "extract_text_from_pdf",
91
+ "open_pdf",
92
+ "render_pdf_as_image",
93
+ ]
@@ -1,21 +1,21 @@
1
- from .io import (
2
- BytesReadable,
3
- BytesWritable,
4
- FileDescriptorOrPath,
5
- PathOrReadable,
6
- Readable,
7
- StringReadable,
8
- StringWritable,
9
- Writable,
10
- )
11
-
12
- __all__ = [
13
- "BytesReadable",
14
- "BytesWritable",
15
- "FileDescriptorOrPath",
16
- "PathOrReadable",
17
- "Readable",
18
- "StringReadable",
19
- "StringWritable",
20
- "Writable",
21
- ]
1
+ from .io import (
2
+ BytesReadable,
3
+ BytesWritable,
4
+ FileDescriptorOrPath,
5
+ PathOrReadable,
6
+ Readable,
7
+ StringReadable,
8
+ StringWritable,
9
+ Writable,
10
+ )
11
+
12
+ __all__ = [
13
+ "BytesReadable",
14
+ "BytesWritable",
15
+ "FileDescriptorOrPath",
16
+ "PathOrReadable",
17
+ "Readable",
18
+ "StringReadable",
19
+ "StringWritable",
20
+ "Writable",
21
+ ]
@@ -1,19 +1,19 @@
1
- import os
2
- from io import BufferedReader, BufferedWriter, BytesIO, StringIO, TextIOWrapper
3
- from typing import TypeAlias
4
-
5
- # Type aliases for callback functions and file descriptors
6
- FileDescriptorOrPath: TypeAlias = int | str | bytes | os.PathLike[str] | os.PathLike[bytes]
7
-
8
- # Type aliases for different types of IO objects
9
- BytesReadable: TypeAlias = BytesIO | BufferedReader
10
- BytesWritable: TypeAlias = BytesIO | BufferedWriter
11
- StringReadable: TypeAlias = StringIO | TextIOWrapper
12
- StringWritable: TypeAlias = StringIO | TextIOWrapper
13
-
14
- # Combined type aliases for readable and writable objects
15
- Readable: TypeAlias = BytesReadable | StringReadable
16
- Writable: TypeAlias = BytesWritable | StringWritable
17
-
18
- # Type alias for path or readable object
19
- PathOrReadable: TypeAlias = FileDescriptorOrPath | Readable
1
+ import os
2
+ from io import BufferedReader, BufferedWriter, BytesIO, StringIO, TextIOWrapper
3
+ from typing import TypeAlias
4
+
5
+ # Type aliases for callback functions and file descriptors
6
+ FileDescriptorOrPath: TypeAlias = int | str | bytes | os.PathLike[str] | os.PathLike[bytes]
7
+
8
+ # Type aliases for different types of IO objects
9
+ BytesReadable: TypeAlias = BytesIO | BufferedReader
10
+ BytesWritable: TypeAlias = BytesIO | BufferedWriter
11
+ StringReadable: TypeAlias = StringIO | TextIOWrapper
12
+ StringWritable: TypeAlias = StringIO | TextIOWrapper
13
+
14
+ # Combined type aliases for readable and writable objects
15
+ Readable: TypeAlias = BytesReadable | StringReadable
16
+ Writable: TypeAlias = BytesWritable | StringWritable
17
+
18
+ # Type alias for path or readable object
19
+ PathOrReadable: TypeAlias = FileDescriptorOrPath | Readable