chatlas 0.7.0__py3-none-any.whl → 0.7.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/_databricks.py CHANGED
@@ -111,17 +111,11 @@ class DatabricksProvider(OpenAIProvider):
111
111
  except ImportError:
112
112
  raise ImportError(
113
113
  "`ChatDatabricks()` requires the `databricks-sdk` package. "
114
- "Install it with `pip install databricks-sdk[openai]`."
114
+ "Install it with `pip install databricks-sdk`."
115
115
  )
116
116
 
117
- try:
118
- import httpx
119
- from openai import AsyncOpenAI
120
- except ImportError:
121
- raise ImportError(
122
- "`ChatDatabricks()` requires the `openai` package. "
123
- "Install it with `pip install openai`."
124
- )
117
+ import httpx
118
+ from openai import AsyncOpenAI
125
119
 
126
120
  self._model = model
127
121
  self._seed = None
chatlas/_github.py CHANGED
@@ -40,12 +40,6 @@ def ChatGithub(
40
40
  You may need to apply for and be accepted into a beta access program.
41
41
  :::
42
42
 
43
- ::: {.callout-note}
44
- ## Python requirements
45
-
46
- `ChatGithub` requires the `openai` package: `pip install "chatlas[github]"`.
47
- :::
48
-
49
43
 
50
44
  Examples
51
45
  --------
chatlas/_google.py CHANGED
@@ -291,7 +291,8 @@ class GoogleProvider(
291
291
  GoogleTool(
292
292
  function_declarations=[
293
293
  FunctionDeclaration.from_callable(
294
- client=self._client, callable=tool.func
294
+ client=self._client._api_client,
295
+ callable=tool.func,
295
296
  )
296
297
  for tool in tools.values()
297
298
  ]
chatlas/_groq.py CHANGED
@@ -38,12 +38,6 @@ def ChatGroq(
38
38
  Sign up at <https://groq.com> to get an API key.
39
39
  :::
40
40
 
41
- ::: {.callout-note}
42
- ## Python requirements
43
-
44
- `ChatGroq` requires the `openai` package: `pip install "chatlas[groq]"`.
45
- :::
46
-
47
41
  Examples
48
42
  --------
49
43
 
chatlas/_ollama.py CHANGED
@@ -49,12 +49,6 @@ def ChatOllama(
49
49
  (e.g. `ollama pull llama3.2`).
50
50
  :::
51
51
 
52
- ::: {.callout-note}
53
- ## Python requirements
54
-
55
- `ChatOllama` requires the `openai` package: `pip install "chatlas[ollama]"`.
56
- :::
57
-
58
52
 
59
53
  Examples
60
54
  --------
chatlas/_openai.py CHANGED
@@ -78,12 +78,6 @@ def ChatOpenAI(
78
78
  account that will give you an API key that you can use with this package.
79
79
  :::
80
80
 
81
- ::: {.callout-note}
82
- ## Python requirements
83
-
84
- `ChatOpenAI` requires the `openai` package: `pip install "chatlas[openai]"`.
85
- :::
86
-
87
81
  Examples
88
82
  --------
89
83
  ```python
@@ -194,13 +188,7 @@ class OpenAIProvider(Provider[ChatCompletion, ChatCompletionChunk, ChatCompletio
194
188
  seed: Optional[int] = None,
195
189
  kwargs: Optional["ChatClientArgs"] = None,
196
190
  ):
197
- try:
198
- from openai import AsyncOpenAI, OpenAI
199
- except ImportError:
200
- raise ImportError(
201
- "`ChatOpenAI()` requires the `openai` package. "
202
- "Install it with `pip install openai`."
203
- )
191
+ from openai import AsyncOpenAI, OpenAI
204
192
 
205
193
  self._model = model
206
194
  self._seed = seed
@@ -433,7 +421,9 @@ class OpenAIProvider(Provider[ChatCompletion, ChatCompletionChunk, ChatCompletio
433
421
  "id": x.id,
434
422
  "function": {
435
423
  "name": x.name,
436
- "arguments": orjson.dumps(x.arguments).decode("utf-8"),
424
+ "arguments": orjson.dumps(x.arguments).decode(
425
+ "utf-8"
426
+ ),
437
427
  },
438
428
  "type": "function",
439
429
  }
@@ -602,16 +592,6 @@ def ChatAzureOpenAI(
602
592
  hosts a number of open source models as well as proprietary models
603
593
  from OpenAI.
604
594
 
605
- Prerequisites
606
- -------------
607
-
608
- ::: {.callout-note}
609
- ## Python requirements
610
-
611
- `ChatAzureOpenAI` requires the `openai` package:
612
- `pip install "chatlas[azure-openai]"`.
613
- :::
614
-
615
595
  Examples
616
596
  --------
617
597
  ```python
@@ -693,13 +673,7 @@ class OpenAIAzureProvider(OpenAIProvider):
693
673
  seed: int | None = None,
694
674
  kwargs: Optional["ChatAzureClientArgs"] = None,
695
675
  ):
696
- try:
697
- from openai import AsyncAzureOpenAI, AzureOpenAI
698
- except ImportError:
699
- raise ImportError(
700
- "`ChatAzureOpenAI()` requires the `openai` package. "
701
- "Install it with `pip install openai`."
702
- )
676
+ from openai import AsyncAzureOpenAI, AzureOpenAI
703
677
 
704
678
  self._model = deployment_id
705
679
  self._seed = seed
chatlas/_perplexity.py CHANGED
@@ -40,12 +40,6 @@ def ChatPerplexity(
40
40
  Sign up at <https://www.perplexity.ai> to get an API key.
41
41
  :::
42
42
 
43
- ::: {.callout-note}
44
- ## Python requirements
45
-
46
- `ChatPerplexity` requires the `openai` package: `pip install "chatlas[perplexity]"`.
47
- :::
48
-
49
43
 
50
44
  Examples
51
45
  --------
chatlas/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.7.0'
21
- __version_tuple__ = version_tuple = (0, 7, 0)
20
+ __version__ = version = '0.7.1'
21
+ __version_tuple__ = version_tuple = (0, 7, 1)
@@ -17,6 +17,7 @@ import anthropic.types.tool_choice_none_param
17
17
  import anthropic.types.tool_choice_tool_param
18
18
  import anthropic.types.tool_param
19
19
  import anthropic.types.tool_text_editor_20250124_param
20
+ import anthropic.types.web_search_tool_20250305_param
20
21
 
21
22
 
22
23
  class SubmitInputArgs(TypedDict, total=False):
@@ -66,6 +67,7 @@ class SubmitInputArgs(TypedDict, total=False):
66
67
  anthropic.types.tool_param.ToolParam,
67
68
  anthropic.types.tool_bash_20250124_param.ToolBash20250124Param,
68
69
  anthropic.types.tool_text_editor_20250124_param.ToolTextEditor20250124Param,
70
+ anthropic.types.web_search_tool_20250305_param.WebSearchTool20250305Param,
69
71
  ]
70
72
  ],
71
73
  anthropic.NotGiven,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chatlas
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: A simple and consistent interface for chatting with LLMs
5
5
  Project-URL: Homepage, https://posit-dev.github.io/chatlas
6
6
  Project-URL: Documentation, https://posit-dev.github.io/chatlas
@@ -8,6 +8,8 @@ Project-URL: Repository, https://github.com/posit-dev/chatlas
8
8
  Project-URL: Issues, https://github.com/posit-dev/chatlas/issues/
9
9
  Project-URL: Changelog, https://github.com/posit-dev/chatlas/blob/main/CHANGELOG.md
10
10
  Author-email: Carson Sievert <carson@posit.co>
11
+ License-Expression: MIT
12
+ License-File: LICENSE
11
13
  Classifier: Development Status :: 4 - Beta
12
14
  Classifier: Intended Audience :: Developers
13
15
  Classifier: License :: OSI Approved :: MIT License
@@ -18,6 +20,7 @@ Classifier: Programming Language :: Python :: 3.12
18
20
  Classifier: Programming Language :: Python :: 3.13
19
21
  Requires-Python: >=3.9
20
22
  Requires-Dist: jinja2
23
+ Requires-Dist: openai
21
24
  Requires-Dist: orjson
22
25
  Requires-Dist: pydantic>=2.0
23
26
  Requires-Dist: requests
@@ -25,15 +28,14 @@ Requires-Dist: rich
25
28
  Provides-Extra: anthropic
26
29
  Requires-Dist: anthropic; extra == 'anthropic'
27
30
  Provides-Extra: azure-openai
28
- Requires-Dist: openai; extra == 'azure-openai'
29
31
  Provides-Extra: bedrock-anthropic
30
32
  Requires-Dist: anthropic[bedrock]; extra == 'bedrock-anthropic'
31
33
  Provides-Extra: databricks
32
- Requires-Dist: databricks-sdk[openai]; extra == 'databricks'
34
+ Requires-Dist: databricks-sdk; extra == 'databricks'
33
35
  Provides-Extra: dev
34
36
  Requires-Dist: anthropic[bedrock]; extra == 'dev'
35
37
  Requires-Dist: databricks-sdk; extra == 'dev'
36
- Requires-Dist: google-genai>=1.2.0; extra == 'dev'
38
+ Requires-Dist: google-genai>=1.14.0; extra == 'dev'
37
39
  Requires-Dist: htmltools; extra == 'dev'
38
40
  Requires-Dist: matplotlib; extra == 'dev'
39
41
  Requires-Dist: numpy>1.24.4; extra == 'dev'
@@ -58,17 +60,12 @@ Requires-Dist: pyyaml; extra == 'docs'
58
60
  Requires-Dist: quartodoc>=0.7; extra == 'docs'
59
61
  Requires-Dist: sentence-transformers; extra == 'docs'
60
62
  Provides-Extra: github
61
- Requires-Dist: openai; extra == 'github'
62
63
  Provides-Extra: google
63
- Requires-Dist: google-genai; extra == 'google'
64
+ Requires-Dist: google-genai>=1.14.0; extra == 'google'
64
65
  Provides-Extra: groq
65
- Requires-Dist: openai; extra == 'groq'
66
66
  Provides-Extra: ollama
67
- Requires-Dist: openai; extra == 'ollama'
68
67
  Provides-Extra: openai
69
- Requires-Dist: openai; extra == 'openai'
70
68
  Provides-Extra: perplexity
71
- Requires-Dist: openai; extra == 'perplexity'
72
69
  Provides-Extra: snowflake
73
70
  Requires-Dist: snowflake-ml-python; extra == 'snowflake'
74
71
  Provides-Extra: test
@@ -77,7 +74,7 @@ Requires-Dist: pytest-asyncio; extra == 'test'
77
74
  Requires-Dist: pytest>=8.3.2; extra == 'test'
78
75
  Requires-Dist: syrupy>=4; extra == 'test'
79
76
  Provides-Extra: vertex
80
- Requires-Dist: google-genai; extra == 'vertex'
77
+ Requires-Dist: google-genai>=1.14.0; extra == 'vertex'
81
78
  Description-Content-Type: text/markdown
82
79
 
83
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>
@@ -5,18 +5,18 @@ chatlas/_chat.py,sha256=wTkXu_AmL2frIHy-JZveuY44BigkrG21_06beyD3pIw,52691
5
5
  chatlas/_content.py,sha256=VW1iKOWlzeoOjTg_TNQTj1zlmdWbDXqTjBy3fxddhdc,15767
6
6
  chatlas/_content_image.py,sha256=EUK6wAint-JatLsiwvaPDu4D3W-NcIsDCkzABkXgfDg,8304
7
7
  chatlas/_content_pdf.py,sha256=cffeuJxzhUDukQ-Srkmpy62M8X12skYpU_FVq-Wvya4,2420
8
- chatlas/_databricks.py,sha256=G87AB6qWGxIlIP8tc6iHeaMpjXe47FuVZ00anPoM9ZI,4919
8
+ chatlas/_databricks.py,sha256=h_RXsOzCp4k1h0byOkCVFOaNCnlapVP92tHs2yMbd6s,4692
9
9
  chatlas/_display.py,sha256=wyQzSc6z1VqrJfkTLkw1wQcti9s1Pr4qT8UxFJESn4U,4664
10
- chatlas/_github.py,sha256=8_vvUIBCprgrQ5UItky5yETfEQPG2fCMM57ga77p28E,4377
11
- chatlas/_google.py,sha256=FfBnkXRtdJiBTViOqOg7qoConcRPLAKqWhUYKcfvhO4,19356
12
- chatlas/_groq.py,sha256=iuFvxeXkq81sDHxVV9zbVHjf2ZuNT94P-XkuXvqtGms,4160
10
+ chatlas/_github.py,sha256=xdGsvWvlbGMc1lgEM_oRL5p-wuxaZG-lu6a_4zxV-4Y,4235
11
+ chatlas/_google.py,sha256=pwnomFcDEzPXQQfFifoH2FrbDvOgRIIyjcNoJ8Hvv-I,19397
12
+ chatlas/_groq.py,sha256=0ou8iiAeI8EqjNKsLZhljQffSVOj8eCQEtW7-stZToY,4022
13
13
  chatlas/_interpolate.py,sha256=ykwLP3x-ya9Q33U4knSU75dtk6pzJAeythEEIW-43Pc,3631
14
14
  chatlas/_live_render.py,sha256=UMZltE35LxziDKPMEeDwQ9meZ95SeqwhJi7j-y9pcro,4004
15
15
  chatlas/_logging.py,sha256=7a20sAl1PkW1qBNrfd_ieUbQXV8Gf4Vuf0Wn62LNBmk,2290
16
16
  chatlas/_merge.py,sha256=SGj_BetgA7gaOqSBKOhYmW3CYeQKTEehFrXvx3y4OYE,3924
17
- chatlas/_ollama.py,sha256=np7s43abaNKt4eSygerHugvtzHjCyOQjSo0ZIRkE8Yc,3769
18
- chatlas/_openai.py,sha256=AIYZ6yc_euymi0OSE0ccPdA2nJLP-8wJSVSyPHckcBw,24653
19
- chatlas/_perplexity.py,sha256=j-jfOIYefZC5XzGjmya9GCCGQN003cRmiAv6vmo0rTQ,4454
17
+ chatlas/_ollama.py,sha256=_5Na11A7Hrs83CK8x542UHDvpLjQPyTJ9WM03eFDqKA,3627
18
+ chatlas/_openai.py,sha256=qkU2DWOTsEVfjiAk4LDRszErVGLswiLwwim1zZnHn8o,23968
19
+ chatlas/_perplexity.py,sha256=POp_Lc8RlSEsHIHhFlHOE8IVsOb2nf7mHQZvyQp49_U,4304
20
20
  chatlas/_provider.py,sha256=YmdBbz_u5aP_kBxl6s26OPiSnWG_vZ_fvf9L2qvBmyI,3809
21
21
  chatlas/_snowflake.py,sha256=xlDdaM-YCmz3Y8KU6jxdCICuS-H4XLpQBHjqnaiEqKk,11576
22
22
  chatlas/_tokens.py,sha256=3W3EPUp9eWXUiwuzJwEPBv43AUznbK46pm59Htti7z4,2392
@@ -25,13 +25,13 @@ chatlas/_tools.py,sha256=-qt4U1AFkebQoX9kpsBy5QXK8a2PpHX6Amgm44gcQ68,4113
25
25
  chatlas/_turn.py,sha256=7pve6YmD-L4c7Oxd6_ZAPkDudJ8AMpa6pP-pSroA1dM,5067
26
26
  chatlas/_typing_extensions.py,sha256=YdzmlyPSBpIEcsOkoz12e6jETT1XEMV2Q72haE4cfwY,1036
27
27
  chatlas/_utils.py,sha256=lli8ChbPUwEPebW8AoOoNoqiA95SVtoW2gb6ymj9gw4,4028
28
- chatlas/_version.py,sha256=itvIHlqPKoO_13qf_yPD2pmcp0U4z1s19vvBGZM927Q,511
28
+ chatlas/_version.py,sha256=UENolcbPfd6sim2GUd3djX88atGsPXEKCbPHv1Wucs4,511
29
29
  chatlas/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
30
  chatlas/types/__init__.py,sha256=P_EDL4eqsigKwB-u2qRmKlYQS5Y65m7oWjGC3cYmxO4,719
31
31
  chatlas/types/anthropic/__init__.py,sha256=OwubA-DPHYpYo0XyRyAFwftOI0mOxtHzAyhUSLcDx54,417
32
32
  chatlas/types/anthropic/_client.py,sha256=G0LRhoFBcsSOMr5qhP-0rAScsVXaVlHCpggfVp54bnQ,690
33
33
  chatlas/types/anthropic/_client_bedrock.py,sha256=mNazQlu0pQt8JdzrYn3LKNgE4n732GjhQUJdQQK9QkY,785
34
- chatlas/types/anthropic/_submit.py,sha256=xoQyZ3SUUttWDPAjZTPfFch7D1bIU0AJNsenViYhAKs,2974
34
+ chatlas/types/anthropic/_submit.py,sha256=v_WJp8tK6HN86JiAEI_wCozCuLEduJpGEqVxXzvaYWw,3119
35
35
  chatlas/types/google/__init__.py,sha256=ZJhi8Kwvio2zp8T1TQqmvdHqkS-Khb6BGESPjREADgo,337
36
36
  chatlas/types/google/_client.py,sha256=t7aKbxYq_xOA1Z3RnWcjewifdQFSHi7vKEj6MyKMCJk,729
37
37
  chatlas/types/google/_submit.py,sha256=b-ZqMvI551Ia7pFlWdqUQJjov3neHmVwLFw-P2bgU8w,1883
@@ -41,6 +41,7 @@ chatlas/types/openai/_client_azure.py,sha256=jx8D_p46CLDGzTP-k-TtGzj-f3junj6or-8
41
41
  chatlas/types/openai/_submit.py,sha256=R0PUgXmhywLzRT_C3DYCsfbHCB1mD7cMY3zd8q7E-PU,6574
42
42
  chatlas/types/snowflake/__init__.py,sha256=NVKw_gLVnSlMNdE6BpikrQw8GV8LvIn5SR8eI8Afgbs,273
43
43
  chatlas/types/snowflake/_submit.py,sha256=Fgcb2Z4mXYwAR2b7Kn3SdEYFlO4gJiUvkDJ3lDoN0IY,799
44
- chatlas-0.7.0.dist-info/METADATA,sha256=rb2oYfWSve7uDdoKouiZb2OAltvOMc-gXfucQRJ4skY,15425
45
- chatlas-0.7.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
46
- chatlas-0.7.0.dist-info/RECORD,,
44
+ chatlas-0.7.1.dist-info/METADATA,sha256=BwSHMmxOYk0Pw9ykiBkwkeLAkKL3dg85QaalPd3byFU,15248
45
+ chatlas-0.7.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
46
+ chatlas-0.7.1.dist-info/licenses/LICENSE,sha256=zyuGzPOC7CcbOaBHsQ3UEyKYRO56KDUkor0OA4LqqDg,1081
47
+ chatlas-0.7.1.dist-info/RECORD,,
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022-2025 Posit Software, PBC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.