chatterer 0.1.5__py3-none-any.whl → 0.1.7__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.
@@ -1,150 +1,166 @@
1
- Metadata-Version: 2.2
2
- Name: chatterer
3
- Version: 0.1.5
4
- Summary: The highest-level interface for various LLM APIs.
5
- Requires-Python: >=3.12
6
- Description-Content-Type: text/markdown
7
- Requires-Dist: instructor>=1.7.2
8
- Requires-Dist: langchain>=0.3.19
9
- Provides-Extra: all
10
- Requires-Dist: langchain-openai>=0.3.7; extra == "all"
11
- Requires-Dist: langchain-anthropic>=0.3.8; extra == "all"
12
- Requires-Dist: langchain-google-genai>=2.0.10; extra == "all"
13
- Requires-Dist: langchain-ollama>=0.2.3; extra == "all"
14
-
15
- # Chatterer
16
-
17
- **Simplified, Structured AI Assistant Framework**
18
-
19
- `chatterer` is a Python library designed as a type-safe LangChain wrapper for interacting with various language models (OpenAI, Anthropic, Gemini, Ollama, etc.). It supports structured outputs via Pydantic models, plain text responses, and asynchronous calls.
20
-
21
- The structured reasoning in `chatterer` is inspired by the [Atom-of-Thought](https://github.com/qixucen/atom) pipeline.
22
-
23
- ---
24
-
25
- ## Quick Install
26
-
27
- ```bash
28
- pip install chatterer
29
- ```
30
-
31
- ---
32
-
33
- ## Quickstart Example
34
-
35
- Generate text quickly using OpenAI:
36
-
37
- ```python
38
- from chatterer import Chatterer
39
-
40
- chat = Chatterer.openai("gpt-4o-mini")
41
- response = chat.generate("What is the meaning of life?")
42
- print(response)
43
- ```
44
-
45
- Messages can be input as plain strings or structured lists:
46
-
47
- ```python
48
- response = chat.generate([{ "role": "user", "content": "What's 2+2?" }])
49
- print(response)
50
- ```
51
-
52
- ### Structured Output with Pydantic
53
-
54
- ```python
55
- from pydantic import BaseModel
56
-
57
- class AnswerModel(BaseModel):
58
- question: str
59
- answer: str
60
-
61
- response = chat.generate_pydantic(AnswerModel, "What's the capital of France?")
62
- print(response.question, response.answer)
63
- ```
64
-
65
- ### Async Example
66
-
67
- ```python
68
- import asyncio
69
-
70
- async def main():
71
- response = await chat.agenerate("Explain async in Python briefly.")
72
- print(response)
73
-
74
- asyncio.run(main())
75
- ```
76
-
77
- ---
78
-
79
- ## Atom-of-Thought Pipeline (AoT)
80
-
81
- `AoTPipeline` provides structured reasoning by:
82
-
83
- - Detecting question domains (general, math, coding, philosophy, multihop).
84
- - Decomposing questions recursively.
85
- - Generating direct, decomposition-based, and simplified answers.
86
- - Combining answers via ensemble.
87
-
88
- ### AoT Usage Example
89
-
90
- ```python
91
- from chatterer import Chatterer
92
- from chatterer.strategies import AoTStrategy, AoTPipeline
93
-
94
- pipeline = AoTPipeline(chatterer=Chatterer.openai(), max_depth=2)
95
- strategy = AoTStrategy(pipeline=pipeline)
96
-
97
- question = "What would Newton discover if hit by an apple falling from 100 meters?"
98
- answer = strategy.invoke(question)
99
- print(answer)
100
- ```
101
-
102
- ---
103
-
104
- ## Supported Models
105
-
106
- - **OpenAI**
107
- - **Anthropic**
108
- - **Google Gemini**
109
- - **Ollama** (local models)
110
-
111
- Initialize models easily:
112
-
113
- ```python
114
- openai_chat = Chatterer.openai("gpt-4o-mini")
115
- anthropic_chat = Chatterer.anthropic("claude-3-7-sonnet-20250219")
116
- gemini_chat = Chatterer.google("gemini-2.0-flash")
117
- ollama_chat = Chatterer.ollama("deepseek-r1:1.5b")
118
- ```
119
-
120
- ---
121
-
122
- ## Advanced Features
123
-
124
- - **Streaming responses**
125
- - **Async/Await support**
126
- - **Structured outputs with Pydantic models**
127
-
128
- ---
129
-
130
- ## Logging
131
-
132
- Built-in logging for easy debugging:
133
-
134
- ```python
135
- import logging
136
- logging.basicConfig(level=logging.DEBUG)
137
- ```
138
-
139
- ---
140
-
141
- ## Contributing
142
-
143
- Feel free to open an issue or pull request.
144
-
145
- ---
146
-
147
- ## License
148
-
149
- MIT License
150
-
1
+ Metadata-Version: 2.4
2
+ Name: chatterer
3
+ Version: 0.1.7
4
+ Summary: The highest-level interface for various LLM APIs.
5
+ Requires-Python: >=3.12
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: instructor>=1.7.2
8
+ Requires-Dist: langchain>=0.3.19
9
+ Provides-Extra: dev
10
+ Requires-Dist: neo4j-extension>=0.1.14; extra == "dev"
11
+ Requires-Dist: colorama>=0.4.6; extra == "dev"
12
+ Requires-Dist: ipykernel>=6.29.5; extra == "dev"
13
+ Provides-Extra: conversion
14
+ Requires-Dist: markdownify>=1.1.0; extra == "conversion"
15
+ Requires-Dist: commonmark>=0.9.1; extra == "conversion"
16
+ Requires-Dist: playwright>=1.50.0; extra == "conversion"
17
+ Requires-Dist: pillow>=11.1.0; extra == "conversion"
18
+ Requires-Dist: mistune>=3.1.2; extra == "conversion"
19
+ Requires-Dist: markitdown>=0.0.2; extra == "conversion"
20
+ Requires-Dist: pymupdf>=1.25.4; extra == "conversion"
21
+ Provides-Extra: langchain-providers
22
+ Requires-Dist: langchain-openai>=0.3.7; extra == "langchain-providers"
23
+ Requires-Dist: langchain-anthropic>=0.3.8; extra == "langchain-providers"
24
+ Requires-Dist: langchain-google-genai>=2.0.10; extra == "langchain-providers"
25
+ Requires-Dist: langchain-ollama>=0.2.3; extra == "langchain-providers"
26
+ Provides-Extra: all
27
+ Requires-Dist: chatterer[langchain-providers]; extra == "all"
28
+ Requires-Dist: chatterer[conversion]; extra == "all"
29
+ Requires-Dist: chatterer[dev]; extra == "all"
30
+
31
+ # Chatterer
32
+
33
+ **Simplified, Structured AI Assistant Framework**
34
+
35
+ `chatterer` is a Python library designed as a type-safe LangChain wrapper for interacting with various language models (OpenAI, Anthropic, Gemini, Ollama, etc.). It supports structured outputs via Pydantic models, plain text responses, and asynchronous calls.
36
+
37
+ The structured reasoning in `chatterer` is inspired by the [Atom-of-Thought](https://github.com/qixucen/atom) pipeline.
38
+
39
+ ---
40
+
41
+ ## Quick Install
42
+
43
+ ```bash
44
+ pip install chatterer
45
+ ```
46
+
47
+ ---
48
+
49
+ ## Quickstart Example
50
+
51
+ Generate text quickly using OpenAI:
52
+
53
+ ```python
54
+ from chatterer import Chatterer
55
+
56
+ chat = Chatterer.openai("gpt-4o-mini")
57
+ response = chat.generate("What is the meaning of life?")
58
+ print(response)
59
+ ```
60
+
61
+ Messages can be input as plain strings or structured lists:
62
+
63
+ ```python
64
+ response = chat.generate([{ "role": "user", "content": "What's 2+2?" }])
65
+ print(response)
66
+ ```
67
+
68
+ ### Structured Output with Pydantic
69
+
70
+ ```python
71
+ from pydantic import BaseModel
72
+
73
+ class AnswerModel(BaseModel):
74
+ question: str
75
+ answer: str
76
+
77
+ response = chat.generate_pydantic(AnswerModel, "What's the capital of France?")
78
+ print(response.question, response.answer)
79
+ ```
80
+
81
+ ### Async Example
82
+
83
+ ```python
84
+ import asyncio
85
+
86
+ async def main():
87
+ response = await chat.agenerate("Explain async in Python briefly.")
88
+ print(response)
89
+
90
+ asyncio.run(main())
91
+ ```
92
+
93
+ ---
94
+
95
+ ## Atom-of-Thought Pipeline (AoT)
96
+
97
+ `AoTPipeline` provides structured reasoning by:
98
+
99
+ - Detecting question domains (general, math, coding, philosophy, multihop).
100
+ - Decomposing questions recursively.
101
+ - Generating direct, decomposition-based, and simplified answers.
102
+ - Combining answers via ensemble.
103
+
104
+ ### AoT Usage Example
105
+
106
+ ```python
107
+ from chatterer import Chatterer
108
+ from chatterer.strategies import AoTStrategy, AoTPipeline
109
+
110
+ pipeline = AoTPipeline(chatterer=Chatterer.openai(), max_depth=2)
111
+ strategy = AoTStrategy(pipeline=pipeline)
112
+
113
+ question = "What would Newton discover if hit by an apple falling from 100 meters?"
114
+ answer = strategy.invoke(question)
115
+ print(answer)
116
+ ```
117
+
118
+ ---
119
+
120
+ ## Supported Models
121
+
122
+ - **OpenAI**
123
+ - **Anthropic**
124
+ - **Google Gemini**
125
+ - **Ollama** (local models)
126
+
127
+ Initialize models easily:
128
+
129
+ ```python
130
+ openai_chat = Chatterer.openai("gpt-4o-mini")
131
+ anthropic_chat = Chatterer.anthropic("claude-3-7-sonnet-20250219")
132
+ gemini_chat = Chatterer.google("gemini-2.0-flash")
133
+ ollama_chat = Chatterer.ollama("deepseek-r1:1.5b")
134
+ ```
135
+
136
+ ---
137
+
138
+ ## Advanced Features
139
+
140
+ - **Streaming responses**
141
+ - **Async/Await support**
142
+ - **Structured outputs with Pydantic models**
143
+
144
+ ---
145
+
146
+ ## Logging
147
+
148
+ Built-in logging for easy debugging:
149
+
150
+ ```python
151
+ import logging
152
+ logging.basicConfig(level=logging.DEBUG)
153
+ ```
154
+
155
+ ---
156
+
157
+ ## Contributing
158
+
159
+ Feel free to open an issue or pull request.
160
+
161
+ ---
162
+
163
+ ## License
164
+
165
+ MIT License
166
+
@@ -0,0 +1,24 @@
1
+ chatterer/__init__.py,sha256=YQN_nZclqzZ_dbzxG10NJHRh1VzyjL7vwXETW5un19U,763
2
+ chatterer/language_model.py,sha256=ksOg-ZuIaP7qy982pGT8uuYGMgzUHqotXQovNVktoeE,13455
3
+ chatterer/messages.py,sha256=miHn3QOcZH8yjR9W5WRFxLvjO8kIyPhcsgoeojT7ByU,180
4
+ chatterer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ chatterer/strategies/__init__.py,sha256=oroDpp5ppWralCER5wnf8fgX77dqLAPF0ogmRtRzQfU,208
6
+ chatterer/strategies/atom_of_thoughts.py,sha256=g801rY7k5UeNOq2-XRqB4h8sXjikVNzN57G6OtiUH00,39897
7
+ chatterer/strategies/base.py,sha256=rqOzTo6S2eQ3A_F9aBXCmVoLM1eT6F2VzZ2Dof330Tk,413
8
+ chatterer/tools/__init__.py,sha256=X6E_ESq-QFp12GF9CYdktRPxARKvwOj38uYQlc9xT8c,398
9
+ chatterer/tools/convert_to_text.py,sha256=-UuKfFKbmmbkYGodcxsFRgsPszTiclcqupJ-mZEQUEI,15521
10
+ chatterer/tools/citation_chunking/__init__.py,sha256=DyLMGG4dVgSnGIdaSHcBNDz09iXflcKuJCtg4W0JTVo,79
11
+ chatterer/tools/citation_chunking/chunks.py,sha256=_Sxzfbud8XTOHdHdQmKwm4-byES1cD1V6C28DgtS1BA,2120
12
+ chatterer/tools/citation_chunking/citation_chunker.py,sha256=Aye1BqUCa4u_CsTZoqCe72pJA8C_y2U5UR7cNoNpeo4,4776
13
+ chatterer/tools/citation_chunking/citations.py,sha256=BWhSwzZccvu0Db-OxEbsuEGEz-Dh_tXo8HRx1y2XUHg,12308
14
+ chatterer/tools/citation_chunking/prompt.py,sha256=so-8uFQ5b2Zq2V5Brfxd76bEnKYkHovYsohAnbxWEnY,7557
15
+ chatterer/tools/citation_chunking/reference.py,sha256=m47XYaB5uFff_x_k7US9hNr-SpZjKnl-GuzsGaQzcZo,893
16
+ chatterer/tools/citation_chunking/utils.py,sha256=Xytm9lMrS783Po1qWAdEJ8q7Q3l2UMzwHd9EkYTRiwk,6210
17
+ chatterer/tools/webpage_to_markdown/__init__.py,sha256=aL4O78CX6AVBXVfUoM8gLxfYb-kpmhwzwDxKk1Gj_Co,119
18
+ chatterer/tools/webpage_to_markdown/playwright_bot.py,sha256=U5xvGFzn4IWCAI98hpbCD5imKRrhYBa9_RzuFNiSwYA,26847
19
+ chatterer/tools/webpage_to_markdown/utils.py,sha256=fmO7MMx1yvnnzLElLI31A3y2VaiLnD_XesLEVCNts3U,12264
20
+ chatterer/utils/image.py,sha256=3v7DiVfRPDZGNfdEAQAiDw7DggTkSt1I_RlqoKXlyLY,10418
21
+ chatterer-0.1.7.dist-info/METADATA,sha256=vZMtTS7Xxy3aQkI4EawVbBNLCaqIxS32UCKiuRNzlX8,4068
22
+ chatterer-0.1.7.dist-info/WHEEL,sha256=tTnHoFhvKQHCh4jz3yCn0WPTYIy7wXx3CJtJ7SJGV7c,91
23
+ chatterer-0.1.7.dist-info/top_level.txt,sha256=7nSQKP0bHxPRc7HyzdbKsJdkvPgYD0214o6slRizv9s,10
24
+ chatterer-0.1.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.2)
2
+ Generator: setuptools (77.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,9 +0,0 @@
1
- chatterer/__init__.py,sha256=jLwLwmF65vqnuC22lYs6CZT105DqJuNBiladUg902HM,427
2
- chatterer/language_model.py,sha256=5YRThDzTUs3uGzJ1Aoh5zzFw3qlpkNW9rjHslyJEVcs,39232
3
- chatterer/strategies/__init__.py,sha256=AKDBC06AdNjPskERssCOsz3qGfFN31mxklmnfhHatJo,389
4
- chatterer/strategies/atom_of_thoughts.py,sha256=VywNKwp_6QB2gTmjbb_YDmrlUmMMc-lyVFENKULWtuU,24882
5
- chatterer/strategies/base.py,sha256=b2gMPqodp97OP1dkHfj0UqixjdjVhmTw_V5qJ7i2S6g,427
6
- chatterer-0.1.5.dist-info/METADATA,sha256=o07y2QFy6XMkhffUisoBU_den62ykXxF0gvtXKRqMSQ,3373
7
- chatterer-0.1.5.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
8
- chatterer-0.1.5.dist-info/top_level.txt,sha256=7nSQKP0bHxPRc7HyzdbKsJdkvPgYD0214o6slRizv9s,10
9
- chatterer-0.1.5.dist-info/RECORD,,