sopel-ai 1.3.4__py3-none-any.whl → 1.3.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.
sopel_ai/core.py CHANGED
@@ -3,6 +3,7 @@
3
3
  from perplexipy import PERPLEXITY_API_URL
4
4
  from perplexipy import PERPLEXITY_DEFAULT_MODEL
5
5
  from perplexipy import PerplexityClient
6
+ from perplexipy import __VERSION__ as __P_VERSION__
6
7
  from sopel_ai import __VERSION__
7
8
  from sopel_ai.errors import SopelAIError
8
9
  from tinydb import Query
@@ -14,7 +15,9 @@ from tinydb import TinyDB
14
15
  # +++ constants +++
15
16
 
16
17
  DEFAULT_API_KEY = 'pplx-3a45enterthekeyhere'
17
- DEFAULT_LLM = PERPLEXITY_DEFAULT_MODEL
18
+ # TODO: Fix this:
19
+ # DEFAULT_LLM = PERPLEXITY_DEFAULT_MODEL.replace('reasoning-', '')
20
+ DEFAULT_LLM = 'sonar-pro'
18
21
  DEFAULT_LLM_PROVIDER = 'PerplexityAI'
19
22
  DEFAULT_LLM_SERVICE = PERPLEXITY_API_URL
20
23
  DEFAULT_LOG_LEVEL = 'info'
@@ -63,8 +66,10 @@ def _checkClientInstance(key: str) -> None:
63
66
  global _client
64
67
 
65
68
  if not _client:
69
+ # TODO: fix the default in PerplexiPy at some point.
70
+ model = PERPLEXITY_DEFAULT_MODEL.replace('-reasoning', '')
66
71
  _client = PerplexityClient(key = key, endpoint = PERPLEXITY_API_URL)
67
- _client.model = PERPLEXITY_DEFAULT_MODEL
72
+ _client.model = model
68
73
 
69
74
 
70
75
  def runQuery(query: str, nick: str = None, fileNameDB: str = None, responseLength: int = MAX_RESPONSE_LENGTH, key: str = None) -> str:
@@ -160,7 +165,7 @@ def versionInfo(key: str = None) -> str:
160
165
  raise SopelAIError('key argument cannot be empty - set the LLM service API key')
161
166
 
162
167
  _checkClientInstance(key)
163
- return 'sopel_ai v%s using %s' % (__VERSION__, '.'.join([_client.__class__.__module__, _client.__class__.__name__]))
168
+ return 'sopel_ai v%s using %s version %s' % (__VERSION__, '.'.join([_client.__class__.__module__, _client.__class__.__name__]), __P_VERSION__)
164
169
 
165
170
 
166
171
  def setModelForUser(modelID: int, nick: str, fileNameDB: str, key = None) -> str:
@@ -1,15 +1,13 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: sopel-ai
3
- Version: 1.3.4
3
+ Version: 1.3.7
4
4
  Summary: Sopel AI - an LLM enhanced chat bot plug-in
5
5
  Author-email: The SopelAI team <sopel_ai@cime.net>
6
- License: BSD-3-Clause
7
6
  Project-URL: Homepage, https://github.com/pr3d4t0r/sopel_ai
8
7
  Project-URL: Bug Tracker, https://github.com/pr3d4t0r/sopel_ai/issues
9
8
  Keywords: ai,bot,irc,llm,plugin,sopel
10
9
  Classifier: Intended Audience :: Developers
11
10
  Classifier: Intended Audience :: System Administrators
12
- Classifier: License :: OSI Approved :: BSD License
13
11
  Classifier: Operating System :: MacOS
14
12
  Classifier: Operating System :: POSIX :: Linux
15
13
  Classifier: Operating System :: Unix
@@ -20,11 +18,12 @@ Classifier: Topic :: Utilities
20
18
  Requires-Python: >=3.9
21
19
  Description-Content-Type: text/markdown
22
20
  License-File: LICENSE.txt
23
- Requires-Dist: perplexipy (==1.1.4)
24
- Requires-Dist: sopel (>=7.1)
21
+ Requires-Dist: perplexipy==1.3.1
22
+ Requires-Dist: sopel>=7.1
25
23
  Requires-Dist: tinydb
24
+ Dynamic: license-file
26
25
 
27
- % sopel_ai(1) Version 1.3.4 chatbot plugin
26
+ % sopel_ai(1) Version 1.3.7 chatbot plugin
28
27
 
29
28
  Name
30
29
  ====
@@ -0,0 +1,11 @@
1
+ sopel_ai/__init__.py,sha256=UXSuXZj_p860rLAiewSe5nbKg-qbIEcXq6jkqYmaMnI,2531
2
+ sopel_ai/config.py,sha256=y0vbvfeDjjfLUOvTJ3W56mAGVpJxeizrXJbCaFW4ZXk,867
3
+ sopel_ai/core.py,sha256=VjugYiKMi_cnirQ_Bj0CWZ3DGMpzDutXU3PspNbcZW4,7685
4
+ sopel_ai/errors.py,sha256=XMVgFk4Rw64Z0UO3ZInp-N6LP0GRG8NFIuXKnhu5rLo,192
5
+ sopel_ai/plugin.py,sha256=51mYp6B_mUtgS6mL-IMhK8Qiz_Rw_qAwmTLdML-qQ2o,6800
6
+ sopel_ai-1.3.7.dist-info/licenses/LICENSE.txt,sha256=I8aHapysmbM9F3y-rUfp011GQoosNO5L8pzl7IKgPnE,1531
7
+ sopel_ai-1.3.7.dist-info/METADATA,sha256=kbfm2bSkDWpEjf04rdp21lKdsYgX6HA0sDnLTOdItns,6153
8
+ sopel_ai-1.3.7.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
9
+ sopel_ai-1.3.7.dist-info/entry_points.txt,sha256=7Juxcn6L4j6F83TjkviiTwiyXLM4gZxAAXFQDR2G_m4,43
10
+ sopel_ai-1.3.7.dist-info/top_level.txt,sha256=kpNMzNEGbhCXkyn7oc3uQPmrX1J6qLxn59IcZBpwSYg,9
11
+ sopel_ai-1.3.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.38.4)
2
+ Generator: setuptools (80.7.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,11 +0,0 @@
1
- sopel_ai/__init__.py,sha256=UXSuXZj_p860rLAiewSe5nbKg-qbIEcXq6jkqYmaMnI,2531
2
- sopel_ai/config.py,sha256=y0vbvfeDjjfLUOvTJ3W56mAGVpJxeizrXJbCaFW4ZXk,867
3
- sopel_ai/core.py,sha256=m5XutY1Rm7z-nh1_qPOAcrnfP20BekMH6jveXoSX3NQ,7425
4
- sopel_ai/errors.py,sha256=XMVgFk4Rw64Z0UO3ZInp-N6LP0GRG8NFIuXKnhu5rLo,192
5
- sopel_ai/plugin.py,sha256=51mYp6B_mUtgS6mL-IMhK8Qiz_Rw_qAwmTLdML-qQ2o,6800
6
- sopel_ai-1.3.4.dist-info/LICENSE.txt,sha256=I8aHapysmbM9F3y-rUfp011GQoosNO5L8pzl7IKgPnE,1531
7
- sopel_ai-1.3.4.dist-info/METADATA,sha256=yUU8251bdLtOwpudjsUOZLdjAZ9DeSrsdmXVVXLVx98,6210
8
- sopel_ai-1.3.4.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
9
- sopel_ai-1.3.4.dist-info/entry_points.txt,sha256=7Juxcn6L4j6F83TjkviiTwiyXLM4gZxAAXFQDR2G_m4,43
10
- sopel_ai-1.3.4.dist-info/top_level.txt,sha256=kpNMzNEGbhCXkyn7oc3uQPmrX1J6qLxn59IcZBpwSYg,9
11
- sopel_ai-1.3.4.dist-info/RECORD,,