chatlas 0.8.1__py3-none-any.whl → 0.9.1__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.
Potentially problematic release.
This version of chatlas might be problematic. Click here for more details.
- chatlas/__init__.py +2 -1
- chatlas/_anthropic.py +79 -45
- chatlas/_auto.py +3 -12
- chatlas/_chat.py +774 -148
- chatlas/_content.py +149 -29
- chatlas/_databricks.py +4 -14
- chatlas/_github.py +21 -25
- chatlas/_google.py +71 -32
- chatlas/_groq.py +15 -18
- chatlas/_interpolate.py +3 -4
- chatlas/_mcp_manager.py +306 -0
- chatlas/_ollama.py +14 -18
- chatlas/_openai.py +74 -39
- chatlas/_perplexity.py +14 -18
- chatlas/_provider.py +78 -8
- chatlas/_snowflake.py +29 -18
- chatlas/_tokens.py +85 -5
- chatlas/_tools.py +181 -22
- chatlas/_turn.py +2 -18
- chatlas/_utils.py +27 -1
- chatlas/_version.py +2 -2
- chatlas/data/prices.json +264 -0
- chatlas/types/anthropic/_submit.py +2 -0
- chatlas/types/openai/_client.py +1 -0
- chatlas/types/openai/_client_azure.py +1 -0
- chatlas/types/openai/_submit.py +4 -1
- chatlas-0.9.1.dist-info/METADATA +141 -0
- chatlas-0.9.1.dist-info/RECORD +48 -0
- chatlas-0.8.1.dist-info/METADATA +0 -383
- chatlas-0.8.1.dist-info/RECORD +0 -46
- {chatlas-0.8.1.dist-info → chatlas-0.9.1.dist-info}/WHEEL +0 -0
- {chatlas-0.8.1.dist-info → chatlas-0.9.1.dist-info}/licenses/LICENSE +0 -0
chatlas-0.8.1.dist-info/METADATA
DELETED
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: chatlas
|
|
3
|
-
Version: 0.8.1
|
|
4
|
-
Summary: A simple and consistent interface for chatting with LLMs
|
|
5
|
-
Project-URL: Homepage, https://posit-dev.github.io/chatlas
|
|
6
|
-
Project-URL: Documentation, https://posit-dev.github.io/chatlas
|
|
7
|
-
Project-URL: Repository, https://github.com/posit-dev/chatlas
|
|
8
|
-
Project-URL: Issues, https://github.com/posit-dev/chatlas/issues/
|
|
9
|
-
Project-URL: Changelog, https://github.com/posit-dev/chatlas/blob/main/CHANGELOG.md
|
|
10
|
-
Author-email: Carson Sievert <carson@posit.co>
|
|
11
|
-
License-Expression: MIT
|
|
12
|
-
License-File: LICENSE
|
|
13
|
-
Classifier: Development Status :: 4 - Beta
|
|
14
|
-
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
-
Requires-Python: >=3.9
|
|
22
|
-
Requires-Dist: jinja2
|
|
23
|
-
Requires-Dist: openai
|
|
24
|
-
Requires-Dist: orjson
|
|
25
|
-
Requires-Dist: pydantic>=2.0
|
|
26
|
-
Requires-Dist: requests
|
|
27
|
-
Requires-Dist: rich
|
|
28
|
-
Provides-Extra: anthropic
|
|
29
|
-
Requires-Dist: anthropic; extra == 'anthropic'
|
|
30
|
-
Provides-Extra: azure-openai
|
|
31
|
-
Provides-Extra: bedrock-anthropic
|
|
32
|
-
Requires-Dist: anthropic[bedrock]; extra == 'bedrock-anthropic'
|
|
33
|
-
Provides-Extra: databricks
|
|
34
|
-
Requires-Dist: databricks-sdk; extra == 'databricks'
|
|
35
|
-
Provides-Extra: dev
|
|
36
|
-
Requires-Dist: anthropic[bedrock]; extra == 'dev'
|
|
37
|
-
Requires-Dist: databricks-sdk; extra == 'dev'
|
|
38
|
-
Requires-Dist: google-genai>=1.14.0; extra == 'dev'
|
|
39
|
-
Requires-Dist: htmltools; extra == 'dev'
|
|
40
|
-
Requires-Dist: matplotlib; extra == 'dev'
|
|
41
|
-
Requires-Dist: numpy>1.24.4; extra == 'dev'
|
|
42
|
-
Requires-Dist: openai; extra == 'dev'
|
|
43
|
-
Requires-Dist: pillow; extra == 'dev'
|
|
44
|
-
Requires-Dist: python-dotenv; extra == 'dev'
|
|
45
|
-
Requires-Dist: ruff>=0.6.5; extra == 'dev'
|
|
46
|
-
Requires-Dist: shiny; extra == 'dev'
|
|
47
|
-
Requires-Dist: snowflake-ml-python>=1.8.4; extra == 'dev'
|
|
48
|
-
Requires-Dist: tenacity; extra == 'dev'
|
|
49
|
-
Requires-Dist: tiktoken; extra == 'dev'
|
|
50
|
-
Requires-Dist: torch; (python_version <= '3.11') and extra == 'dev'
|
|
51
|
-
Provides-Extra: docs
|
|
52
|
-
Requires-Dist: griffe>=1; extra == 'docs'
|
|
53
|
-
Requires-Dist: ipykernel; extra == 'docs'
|
|
54
|
-
Requires-Dist: ipywidgets; extra == 'docs'
|
|
55
|
-
Requires-Dist: nbclient; extra == 'docs'
|
|
56
|
-
Requires-Dist: nbformat; extra == 'docs'
|
|
57
|
-
Requires-Dist: numpy; extra == 'docs'
|
|
58
|
-
Requires-Dist: pandas; extra == 'docs'
|
|
59
|
-
Requires-Dist: pyyaml; extra == 'docs'
|
|
60
|
-
Requires-Dist: quartodoc>=0.7; extra == 'docs'
|
|
61
|
-
Requires-Dist: sentence-transformers; extra == 'docs'
|
|
62
|
-
Provides-Extra: github
|
|
63
|
-
Provides-Extra: google
|
|
64
|
-
Requires-Dist: google-genai>=1.14.0; extra == 'google'
|
|
65
|
-
Provides-Extra: groq
|
|
66
|
-
Provides-Extra: ollama
|
|
67
|
-
Provides-Extra: openai
|
|
68
|
-
Provides-Extra: perplexity
|
|
69
|
-
Provides-Extra: snowflake
|
|
70
|
-
Requires-Dist: snowflake-ml-python; extra == 'snowflake'
|
|
71
|
-
Provides-Extra: test
|
|
72
|
-
Requires-Dist: pyright>=1.1.379; extra == 'test'
|
|
73
|
-
Requires-Dist: pytest-asyncio; extra == 'test'
|
|
74
|
-
Requires-Dist: pytest>=8.3.2; extra == 'test'
|
|
75
|
-
Requires-Dist: syrupy>=4; extra == 'test'
|
|
76
|
-
Provides-Extra: vertex
|
|
77
|
-
Requires-Dist: google-genai>=1.14.0; extra == 'vertex'
|
|
78
|
-
Description-Content-Type: text/markdown
|
|
79
|
-
|
|
80
|
-
<h1 class="unnumbered unlisted"> chatlas <a href="https://posit-dev.github.io/chatlas"><img src="docs/images/logo.png" align="right" height="138" alt="chatlas website" /></a> </h1>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<p>
|
|
85
|
-
<!-- badges start -->
|
|
86
|
-
<a href="https://pypi.org/project/chatlas/"><img alt="PyPI" src="https://img.shields.io/pypi/v/chatlas?logo=python&logoColor=white&color=orange"></a>
|
|
87
|
-
<a href="https://choosealicense.com/licenses/mit/"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License"></a>
|
|
88
|
-
<a href="https://github.com/posit-dev/chatlas"><img src="https://github.com/posit-dev/chatlas/actions/workflows/test.yml/badge.svg?branch=main" alt="Python Tests"></a>
|
|
89
|
-
<!-- badges end -->
|
|
90
|
-
</p>
|
|
91
|
-
|
|
92
|
-
chatlas provides a simple and unified interface across large language model (llm) providers in Python.
|
|
93
|
-
It helps you prototype faster by abstracting away complexity from common tasks like streaming chat interfaces, tool calling, structured output, and much more.
|
|
94
|
-
Switching providers is also as easy as changing one line of code, but you can also reach for provider-specific features when you need them.
|
|
95
|
-
Developer experience is also a key focus of chatlas: typing support, rich console output, and extension points are all included.
|
|
96
|
-
|
|
97
|
-
(Looking for something similar to chatlas, but in R? Check out [ellmer](https://ellmer.tidyverse.org/)!)
|
|
98
|
-
|
|
99
|
-
## Install
|
|
100
|
-
|
|
101
|
-
Install the latest stable release from PyPI:
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
pip install -U chatlas
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Or, install the latest development version from GitHub:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
pip install -U git+https://github.com/posit-dev/chatlas
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Model providers
|
|
114
|
-
|
|
115
|
-
`chatlas` supports a variety of model providers. See the [API reference](https://posit-dev.github.io/chatlas/reference/index.html) for more details (like managing credentials) on each provider.
|
|
116
|
-
|
|
117
|
-
* Anthropic (Claude): [`ChatAnthropic()`](https://posit-dev.github.io/chatlas/reference/ChatAnthropic.html).
|
|
118
|
-
* GitHub model marketplace: [`ChatGithub()`](https://posit-dev.github.io/chatlas/reference/ChatGithub.html).
|
|
119
|
-
* Google (Gemini): [`ChatGoogle()`](https://posit-dev.github.io/chatlas/reference/ChatGoogle.html).
|
|
120
|
-
* Groq: [`ChatGroq()`](https://posit-dev.github.io/chatlas/reference/ChatGroq.html).
|
|
121
|
-
* Ollama local models: [`ChatOllama()`](https://posit-dev.github.io/chatlas/reference/ChatOllama.html).
|
|
122
|
-
* OpenAI: [`ChatOpenAI()`](https://posit-dev.github.io/chatlas/reference/ChatOpenAI.html).
|
|
123
|
-
* perplexity.ai: [`ChatPerplexity()`](https://posit-dev.github.io/chatlas/reference/ChatPerplexity.html).
|
|
124
|
-
|
|
125
|
-
It also supports the following enterprise cloud providers:
|
|
126
|
-
|
|
127
|
-
* AWS Bedrock: [`ChatBedrockAnthropic()`](https://posit-dev.github.io/chatlas/reference/ChatBedrockAnthropic.html).
|
|
128
|
-
* Azure OpenAI: [`ChatAzureOpenAI()`](https://posit-dev.github.io/chatlas/reference/ChatAzureOpenAI.html).
|
|
129
|
-
* Databricks: [`ChatDatabricks()`](https://posit-dev.github.io/chatlas/reference/ChatDatabricks.html).
|
|
130
|
-
* Snowflake Cortex: [`ChatSnowflake()`](https://posit-dev.github.io/chatlas/reference/ChatSnowflake.html).
|
|
131
|
-
* Vertex AI: [`ChatVertex()`](https://posit-dev.github.io/chatlas/reference/ChatVertex.html).
|
|
132
|
-
|
|
133
|
-
To use a model provider that isn't listed here, you have two options:
|
|
134
|
-
|
|
135
|
-
1. If the model is OpenAI compatible, use `ChatOpenAI()` with the appropriate `base_url` and `api_key` (see [`ChatGithub`](https://github.com/posit-dev/chatlas/blob/main/chatlas/_github.py) for a reference).
|
|
136
|
-
2. If you're motivated, implement a new provider by subclassing [`Provider`](https://github.com/posit-dev/chatlas/blob/main/chatlas/_provider.py) and implementing the required methods.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
## Model choice
|
|
140
|
-
|
|
141
|
-
If you're using chatlas inside your organisation, you'll be limited to what your org allows, which is likely to be one provided by a big cloud provider (e.g. `ChatAzureOpenAI()` and `ChatBedrockAnthropic()`). If you're using chatlas for your own personal exploration, you have a lot more freedom so we have a few recommendations to help you get started:
|
|
142
|
-
|
|
143
|
-
- `ChatOpenAI()` or `ChatAnthropic()` are both good places to start. `ChatOpenAI()` defaults to **GPT-4o**, but you can use `model = "gpt-4o-mini"` for a cheaper lower-quality model, or `model = "o1-mini"` for more complex reasoning. `ChatAnthropic()` is similarly good; it defaults to **Claude 3.5 Sonnet** which we have found to be particularly good at writing code.
|
|
144
|
-
|
|
145
|
-
- `ChatGoogle()` is great for large prompts, because it has a much larger context window than other models. It allows up to 1 million tokens, compared to Claude 3.5 Sonnet's 200k and GPT-4o's 128k.
|
|
146
|
-
|
|
147
|
-
- `ChatOllama()`, which uses [Ollama](https://ollama.com), allows you to run models on your own computer. The biggest models you can run locally aren't as good as the state of the art hosted models, but they also don't share your data and and are effectively free.
|
|
148
|
-
|
|
149
|
-
## Using chatlas
|
|
150
|
-
|
|
151
|
-
You can chat via `chatlas` in several different ways, depending on whether you are working interactively or programmatically. They all start with creating a new chat object:
|
|
152
|
-
|
|
153
|
-
```python
|
|
154
|
-
from chatlas import ChatOpenAI
|
|
155
|
-
|
|
156
|
-
chat = ChatOpenAI(
|
|
157
|
-
model = "gpt-4o",
|
|
158
|
-
system_prompt = "You are a friendly but terse assistant.",
|
|
159
|
-
)
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### Interactive console
|
|
163
|
-
|
|
164
|
-
From a `chat` instance, it's simple to start a web-based or terminal-based chat console, which is great for testing the capabilities of the model. In either case, responses stream in real-time, and context is preserved across turns.
|
|
165
|
-
|
|
166
|
-
```python
|
|
167
|
-
chat.app()
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
<div align="center">
|
|
171
|
-
<img width="500" alt="A web app for chatting with an LLM via chatlas" src="https://github.com/user-attachments/assets/e43f60cb-3686-435a-bd11-8215cb024d2e" class="border rounded">
|
|
172
|
-
</div>
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
Or, if you prefer to work from the terminal:
|
|
176
|
-
|
|
177
|
-
```python
|
|
178
|
-
chat.console()
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
```
|
|
182
|
-
Entering chat console. Press Ctrl+C to quit.
|
|
183
|
-
|
|
184
|
-
?> Who created Python?
|
|
185
|
-
|
|
186
|
-
Python was created by Guido van Rossum. He began development in the late 1980s and released the first version in 1991.
|
|
187
|
-
|
|
188
|
-
?> Where did he develop it?
|
|
189
|
-
|
|
190
|
-
Guido van Rossum developed Python while working at Centrum Wiskunde & Informatica (CWI) in the Netherlands.
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
### The `.chat()` method
|
|
195
|
-
|
|
196
|
-
For a more programmatic approach, you can use the `.chat()` method to ask a question and get a response. By default, the response prints to a [rich](https://github.com/Textualize/rich) console as it streams in:
|
|
197
|
-
|
|
198
|
-
```python
|
|
199
|
-
chat.chat("What preceding languages most influenced Python?")
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
```
|
|
203
|
-
Python was primarily influenced by ABC, with additional inspiration from C,
|
|
204
|
-
Modula-3, and various other languages.
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
To ask a question about an image, pass one or more additional input arguments using `content_image_file()` and/or `content_image_url()`:
|
|
208
|
-
|
|
209
|
-
```python
|
|
210
|
-
from chatlas import content_image_url
|
|
211
|
-
|
|
212
|
-
chat.chat(
|
|
213
|
-
content_image_url("https://www.python.org/static/img/python-logo.png"),
|
|
214
|
-
"Can you explain this logo?"
|
|
215
|
-
)
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
```
|
|
219
|
-
The Python logo features two intertwined snakes in yellow and blue,
|
|
220
|
-
representing the Python programming language. The design symbolizes...
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
To get the full response as a string, use the built-in `str()` function. Optionally, you can also suppress the rich console output by setting `echo="none"`:
|
|
224
|
-
|
|
225
|
-
```python
|
|
226
|
-
response = chat.chat("Who is Posit?", echo="none")
|
|
227
|
-
print(str(response))
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
As we'll see in later articles, `echo="all"` can also be useful for debugging, as it shows additional information, such as tool calls.
|
|
231
|
-
|
|
232
|
-
### The `.stream()` method
|
|
233
|
-
|
|
234
|
-
If you want to do something with the response in real-time (i.e., as it arrives in chunks), use the `.stream()` method. This method returns an iterator that yields each chunk of the response as it arrives:
|
|
235
|
-
|
|
236
|
-
```python
|
|
237
|
-
response = chat.stream("Who is Posit?")
|
|
238
|
-
for chunk in response:
|
|
239
|
-
print(chunk, end="")
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
The `.stream()` method can also be useful if you're [building a chatbot](https://posit-dev.github.io/chatlas/web-apps.html) or other programs that needs to display responses as they arrive.
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
### Tool calling
|
|
246
|
-
|
|
247
|
-
Tool calling is as simple as passing a function with type hints and docstring to `.register_tool()`.
|
|
248
|
-
|
|
249
|
-
```python
|
|
250
|
-
import sys
|
|
251
|
-
|
|
252
|
-
def get_current_python_version() -> str:
|
|
253
|
-
"""Get the current version of Python."""
|
|
254
|
-
return sys.version
|
|
255
|
-
|
|
256
|
-
chat.register_tool(get_current_python_version)
|
|
257
|
-
chat.chat("What's the current version of Python?")
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
```
|
|
261
|
-
The current version of Python is 3.13.
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
Learn more in the [tool calling article](https://posit-dev.github.io/chatlas/tool-calling.html)
|
|
265
|
-
|
|
266
|
-
### Structured data
|
|
267
|
-
|
|
268
|
-
Structured data (i.e., structured output) is as simple as passing a [pydantic](https://docs.pydantic.dev/latest/) model to `.extract_data()`.
|
|
269
|
-
|
|
270
|
-
```python
|
|
271
|
-
from pydantic import BaseModel
|
|
272
|
-
|
|
273
|
-
class Person(BaseModel):
|
|
274
|
-
name: str
|
|
275
|
-
age: int
|
|
276
|
-
|
|
277
|
-
chat.extract_data(
|
|
278
|
-
"My name is Susan and I'm 13 years old",
|
|
279
|
-
data_model=Person,
|
|
280
|
-
)
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
```
|
|
284
|
-
{'name': 'Susan', 'age': 13}
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
Learn more in the [structured data article](https://posit-dev.github.io/chatlas/structured-data.html)
|
|
288
|
-
|
|
289
|
-
### Multi-modal input
|
|
290
|
-
|
|
291
|
-
Attach images and pdfs when submitting input to using any one of the `content_*` functions.
|
|
292
|
-
|
|
293
|
-
```python
|
|
294
|
-
from chatlas import content_image_url
|
|
295
|
-
|
|
296
|
-
chat.chat(
|
|
297
|
-
content_image_url("https://www.python.org/static/img/python-logo.png"),
|
|
298
|
-
"What do you see in this image?"
|
|
299
|
-
)
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
```
|
|
303
|
-
This image displays the logo of the Python programming language. It features the word "python" alongside the distinctive two snake heads logo, which is colored in blue and yellow.
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
Learn more in the [content reference pages](https://posit-dev.github.io/chatlas/reference/content_image_url.html) for more details on the available content types.
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
### Export chat
|
|
310
|
-
|
|
311
|
-
Easily get a full markdown or HTML export of a conversation:
|
|
312
|
-
|
|
313
|
-
```python
|
|
314
|
-
chat.export("index.html", title="Python Q&A")
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
If the export doesn't have all the information you need, you can also access the full conversation history via the `.get_turns()` method:
|
|
318
|
-
|
|
319
|
-
```python
|
|
320
|
-
chat.get_turns()
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
And, if the conversation is too long, you can specify which turns to include:
|
|
324
|
-
|
|
325
|
-
```python
|
|
326
|
-
chat.export("index.html", turns=chat.get_turns()[-5:])
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
### Async
|
|
330
|
-
|
|
331
|
-
`chat` methods tend to be synchronous by default, but you can use the async flavor by appending `_async` to the method name:
|
|
332
|
-
|
|
333
|
-
```python
|
|
334
|
-
import asyncio
|
|
335
|
-
|
|
336
|
-
async def main():
|
|
337
|
-
await chat.chat_async("What is the capital of France?")
|
|
338
|
-
|
|
339
|
-
asyncio.run(main())
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
### Typing support
|
|
343
|
-
|
|
344
|
-
`chatlas` has full typing support, meaning that, among other things, autocompletion just works in your favorite editor:
|
|
345
|
-
|
|
346
|
-
<div align="center">
|
|
347
|
-
<img width="500" alt="Autocompleting model options in ChatOpenAI" src="https://github.com/user-attachments/assets/163d6d8a-7d58-422d-b3af-cc9f2adee759" class="rounded">
|
|
348
|
-
</div>
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
### Troubleshooting
|
|
353
|
-
|
|
354
|
-
Sometimes things like token limits, tool errors, or other issues can cause problems that are hard to diagnose.
|
|
355
|
-
In these cases, the `echo="all"` option is helpful for getting more information about what's going on under the hood.
|
|
356
|
-
|
|
357
|
-
```python
|
|
358
|
-
chat.chat("What is the capital of France?", echo="all")
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
This shows important information like tool call results, finish reasons, and more.
|
|
362
|
-
|
|
363
|
-
If the problem isn't self-evident, you can also reach into the `.get_last_turn()`, which contains the full response object, with full details about the completion.
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
<div align="center">
|
|
367
|
-
<img width="500" alt="Turn completion details with typing support" src="https://github.com/user-attachments/assets/eaea338d-e44a-4e23-84a7-2e998d8af3ba" class="rounded">
|
|
368
|
-
</div>
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
For monitoring issues in a production (or otherwise non-interactive) environment, you may want to enabling logging. Also, since `chatlas` builds on top of packages like `anthropic` and `openai`, you can also enable their debug logging to get lower-level information, like HTTP requests and response codes.
|
|
372
|
-
|
|
373
|
-
```shell
|
|
374
|
-
$ export CHATLAS_LOG=info
|
|
375
|
-
$ export OPENAI_LOG=info
|
|
376
|
-
$ export ANTHROPIC_LOG=info
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
### Next steps
|
|
380
|
-
|
|
381
|
-
If you're new to world LLMs, you might want to read the [Get Started](https://posit-dev.github.io/chatlas/get-started.html) guide, which covers some basic concepts and terminology.
|
|
382
|
-
|
|
383
|
-
Once you're comfortable with the basics, you can explore more in-depth topics like [prompt design](https://posit-dev.github.io/chatlas/prompt-design.html) or the [API reference](https://posit-dev.github.io/chatlas/reference/index.html).
|
chatlas-0.8.1.dist-info/RECORD
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
chatlas/__init__.py,sha256=vZpEIGNqb8pJ5QCEYjHcKuoc0HDTkuhR40sJfKdhN7s,1571
|
|
2
|
-
chatlas/_anthropic.py,sha256=iF2aFS07T4I2Zlw5hI6Y-PjIBH4cG6ibOgVy12dI_6I,24885
|
|
3
|
-
chatlas/_auto.py,sha256=HsAvVwpSOkI9fdC35YX8beaE2IBnWLWTzOzu0ny951o,6129
|
|
4
|
-
chatlas/_callbacks.py,sha256=3RpPaOQonTqScjXbaShgKJ1Rc-YxzWerxKRBjVssFnc,1838
|
|
5
|
-
chatlas/_chat.py,sha256=KJDXAV7AS_PFGuSdx90AKzBw0PMKBeZpIF4OmHrPuMw,57864
|
|
6
|
-
chatlas/_content.py,sha256=KtQfJ3CATk_TGzGzihc_wWRuHdlLWp9Dr-OgxZQbOQE,15931
|
|
7
|
-
chatlas/_content_image.py,sha256=EUK6wAint-JatLsiwvaPDu4D3W-NcIsDCkzABkXgfDg,8304
|
|
8
|
-
chatlas/_content_pdf.py,sha256=cffeuJxzhUDukQ-Srkmpy62M8X12skYpU_FVq-Wvya4,2420
|
|
9
|
-
chatlas/_databricks.py,sha256=56dInk3UjQ5HqGiysn9TJ9hat745MhaFEn-IPfnR4vE,4696
|
|
10
|
-
chatlas/_display.py,sha256=wyQzSc6z1VqrJfkTLkw1wQcti9s1Pr4qT8UxFJESn4U,4664
|
|
11
|
-
chatlas/_github.py,sha256=xdGsvWvlbGMc1lgEM_oRL5p-wuxaZG-lu6a_4zxV-4Y,4235
|
|
12
|
-
chatlas/_google.py,sha256=pwnomFcDEzPXQQfFifoH2FrbDvOgRIIyjcNoJ8Hvv-I,19397
|
|
13
|
-
chatlas/_groq.py,sha256=0ou8iiAeI8EqjNKsLZhljQffSVOj8eCQEtW7-stZToY,4022
|
|
14
|
-
chatlas/_interpolate.py,sha256=ykwLP3x-ya9Q33U4knSU75dtk6pzJAeythEEIW-43Pc,3631
|
|
15
|
-
chatlas/_live_render.py,sha256=UMZltE35LxziDKPMEeDwQ9meZ95SeqwhJi7j-y9pcro,4004
|
|
16
|
-
chatlas/_logging.py,sha256=weKvXZDIZ88X7X61ruXM_S0AAhQ5mgiW9dR-km8x7Mg,3324
|
|
17
|
-
chatlas/_merge.py,sha256=SGj_BetgA7gaOqSBKOhYmW3CYeQKTEehFrXvx3y4OYE,3924
|
|
18
|
-
chatlas/_ollama.py,sha256=_5Na11A7Hrs83CK8x542UHDvpLjQPyTJ9WM03eFDqKA,3627
|
|
19
|
-
chatlas/_openai.py,sha256=qkU2DWOTsEVfjiAk4LDRszErVGLswiLwwim1zZnHn8o,23968
|
|
20
|
-
chatlas/_perplexity.py,sha256=POp_Lc8RlSEsHIHhFlHOE8IVsOb2nf7mHQZvyQp49_U,4304
|
|
21
|
-
chatlas/_provider.py,sha256=YmdBbz_u5aP_kBxl6s26OPiSnWG_vZ_fvf9L2qvBmyI,3809
|
|
22
|
-
chatlas/_snowflake.py,sha256=y9Lu5SFGsJ1QqQD0Xx7vsAwcBtw2_MWT1Vu7e0HQis0,24098
|
|
23
|
-
chatlas/_tokens.py,sha256=3W3EPUp9eWXUiwuzJwEPBv43AUznbK46pm59Htti7z4,2392
|
|
24
|
-
chatlas/_tokens_old.py,sha256=L9d9oafrXvEx2u4nIn_Jjn7adnQyLBnYBuPwJUE8Pl8,5005
|
|
25
|
-
chatlas/_tools.py,sha256=Qucyx_Pq-DX66r5xsZ7VRNxrIMS_se-FS7HH7jbB1A0,6085
|
|
26
|
-
chatlas/_turn.py,sha256=7pve6YmD-L4c7Oxd6_ZAPkDudJ8AMpa6pP-pSroA1dM,5067
|
|
27
|
-
chatlas/_typing_extensions.py,sha256=YdzmlyPSBpIEcsOkoz12e6jETT1XEMV2Q72haE4cfwY,1036
|
|
28
|
-
chatlas/_utils.py,sha256=lli8ChbPUwEPebW8AoOoNoqiA95SVtoW2gb6ymj9gw4,4028
|
|
29
|
-
chatlas/_version.py,sha256=Qh9qKQ7_wMS7wH5nRvhQyYwD9deQawM2RC-sVdT7RyM,511
|
|
30
|
-
chatlas/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
|
-
chatlas/types/__init__.py,sha256=P_EDL4eqsigKwB-u2qRmKlYQS5Y65m7oWjGC3cYmxO4,719
|
|
32
|
-
chatlas/types/anthropic/__init__.py,sha256=OwubA-DPHYpYo0XyRyAFwftOI0mOxtHzAyhUSLcDx54,417
|
|
33
|
-
chatlas/types/anthropic/_client.py,sha256=G0LRhoFBcsSOMr5qhP-0rAScsVXaVlHCpggfVp54bnQ,690
|
|
34
|
-
chatlas/types/anthropic/_client_bedrock.py,sha256=mNazQlu0pQt8JdzrYn3LKNgE4n732GjhQUJdQQK9QkY,785
|
|
35
|
-
chatlas/types/anthropic/_submit.py,sha256=FJPtswPf_NTV3kAXlFODin3bFOqYNdamopjIaVSSr24,3417
|
|
36
|
-
chatlas/types/google/__init__.py,sha256=ZJhi8Kwvio2zp8T1TQqmvdHqkS-Khb6BGESPjREADgo,337
|
|
37
|
-
chatlas/types/google/_client.py,sha256=t7aKbxYq_xOA1Z3RnWcjewifdQFSHi7vKEj6MyKMCJk,729
|
|
38
|
-
chatlas/types/google/_submit.py,sha256=b-ZqMvI551Ia7pFlWdqUQJjov3neHmVwLFw-P2bgU8w,1883
|
|
39
|
-
chatlas/types/openai/__init__.py,sha256=Q2RAr1bSH1nHsxICK05nAmKmxdhKmhbBkWD_XHiVSrI,411
|
|
40
|
-
chatlas/types/openai/_client.py,sha256=YGm_EHtRSSHeeOZe-CV7oNvMJpEblEta3UTuU7lSRO8,754
|
|
41
|
-
chatlas/types/openai/_client_azure.py,sha256=jx8D_p46CLDGzTP-k-TtGzj-f3junj6or-86m8DD_0w,858
|
|
42
|
-
chatlas/types/openai/_submit.py,sha256=FmDBq8Wg8R-GB3mFBCvAPHyniCyIkgrzwd_iOiAOLM8,6607
|
|
43
|
-
chatlas-0.8.1.dist-info/METADATA,sha256=uQDhm3goorhNSXrkOw5kN7J51tiCharGydKMv2wslZo,15255
|
|
44
|
-
chatlas-0.8.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
45
|
-
chatlas-0.8.1.dist-info/licenses/LICENSE,sha256=zyuGzPOC7CcbOaBHsQ3UEyKYRO56KDUkor0OA4LqqDg,1081
|
|
46
|
-
chatlas-0.8.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|