LLMlight 0.2.0__tar.gz → 0.2.1__tar.gz

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.
@@ -143,16 +143,14 @@ class LLMlight:
143
143
 
144
144
  def get_available_models(self, validate=False):
145
145
  # Set your local API base URL
146
- # base_url = "http://localhost:1234/v1"
147
- base_url = self.endpoint.split("/chat")[0]
146
+ # base_url = 'http://localhost:1234/v1/chat/completions'
147
+ base_url = '/'.join(self.endpoint.split('/')[:3]) + '/'
148
148
  logger.info('Collecting models in the API endpoint..')
149
149
 
150
- # Query available models
151
- response = requests.get(f"{base_url}/models")
152
- model_dict = {}
153
-
154
150
  try:
155
- response = requests.get("http://localhost:1234/v1/models", timeout=10)
151
+ model_url = base_url.rstrip('/') + '/v1/models'
152
+ logger.info(f'Looking up models: {model_url}')
153
+ response = requests.get(model_url, timeout=10)
156
154
  if response.status_code == 200:
157
155
  try:
158
156
  models = response.json()["data"]
@@ -3,7 +3,7 @@ from LLMlight.LLMlight import LLMlight
3
3
 
4
4
  __author__ = 'Erdogan Tasksen'
5
5
  __email__ = 'erdogant@gmail.com'
6
- __version__ = '0.2.0'
6
+ __version__ = '0.2.1'
7
7
 
8
8
  # Setup root logger
9
9
  _logger = logging.getLogger('LLMlight')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: LLMlight
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: LLMlight is a Python library for ...
5
5
  Author-email: Erdogan Taskesen <erdogant@gmail.com>
6
6
  License: MIT License
@@ -46,6 +46,7 @@ Requires-Dist: llama-cpp-python
46
46
  Requires-Dist: json-repair
47
47
  Requires-Dist: pymupdf
48
48
  Requires-Dist: torch
49
+ Requires-Dist: requests
49
50
  Dynamic: license-file
50
51
 
51
52
  # LLMlight
@@ -4,3 +4,4 @@ llama-cpp-python
4
4
  json-repair
5
5
  pymupdf
6
6
  torch
7
+ requests
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: LLMlight
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: LLMlight is a Python library for ...
5
5
  Author-email: Erdogan Taskesen <erdogant@gmail.com>
6
6
  License: MIT License
@@ -46,6 +46,7 @@ Requires-Dist: llama-cpp-python
46
46
  Requires-Dist: json-repair
47
47
  Requires-Dist: pymupdf
48
48
  Requires-Dist: torch
49
+ Requires-Dist: requests
49
50
  Dynamic: license-file
50
51
 
51
52
  # LLMlight
@@ -29,6 +29,7 @@ dependencies = [
29
29
  'json-repair',
30
30
  'pymupdf',
31
31
  'torch',
32
+ 'requests',
32
33
  # 'accelerate',
33
34
  # 'bitsandbytes',
34
35
  # 'flash_attn',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes