lm-deluge 0.0.4__py3-none-any.whl → 0.0.5__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 lm-deluge might be problematic. Click here for more details.

@@ -119,9 +119,7 @@ class AnthropicRequest(APIRequestBase):
119
119
  if status_code >= 200 and status_code < 300:
120
120
  try:
121
121
  data = await http_response.json()
122
- print("response data:", data)
123
122
  content = data["content"] # [0]["text"]
124
- print("content is length", len(content))
125
123
  for item in content:
126
124
  if item["type"] == "text":
127
125
  completion = item["text"]
@@ -55,7 +55,7 @@ class CohereRequest(APIRequestBase):
55
55
 
56
56
  self.model = APIModel.from_registry(model_name)
57
57
  self.url = f"{self.model.api_base}/chat"
58
- self.system_message, chat_history, last_user_message = prompt.to_cohere()
58
+ messages = prompt.to_cohere()
59
59
 
60
60
  self.request_header = {
61
61
  "Authorization": f"bearer {os.getenv(self.model.api_key_env_var)}",
@@ -65,16 +65,12 @@ class CohereRequest(APIRequestBase):
65
65
 
66
66
  self.request_json = {
67
67
  "model": self.model.name,
68
- "chat_history": chat_history,
69
- "message": last_user_message,
68
+ "messages": messages,
70
69
  "temperature": sampling_params.temperature,
71
70
  "top_p": sampling_params.top_p,
72
71
  "max_tokens": sampling_params.max_new_tokens,
73
72
  }
74
73
 
75
- if self.system_message:
76
- self.request_json["preamble"] = self.system_message
77
-
78
74
  async def handle_response(self, http_response: ClientResponse) -> APIResponse:
79
75
  is_error = False
80
76
  error_message = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lm_deluge
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: Python utility for using LLM API models.
5
5
  Author-email: Benjamin Anderson <ben@trytaylor.ai>
6
6
  Requires-Python: >=3.10
@@ -12,9 +12,9 @@ lm_deluge/sampling_params.py,sha256=E2kewh1vz-1Qcy5xNBCzihfGgT_GcHYMfzaWb3FLiXs,
12
12
  lm_deluge/tool.py,sha256=RVUW3E3FW11jCM-R7pIL1GpRs1YKCOjvTkL1D5xPetk,3196
13
13
  lm_deluge/tracker.py,sha256=Dk99scN_NeDEO0gkLO5efXiZq11Ga-k6cerUHWN7IWY,1292
14
14
  lm_deluge/api_requests/__init__.py,sha256=_aSpD6CJL9g6OpLPoChXiHjl4MH_OlGcKgfZaW8cgLM,71
15
- lm_deluge/api_requests/anthropic.py,sha256=HHmDOHs9euIwbjUpN8lLIX1FyAR0-fJ3-t_vW8T_Y2Y,6721
15
+ lm_deluge/api_requests/anthropic.py,sha256=URbiD-ANn_P3StFJVP2JoDWuoloZVsAUly8CGSyV2Kw,6618
16
16
  lm_deluge/api_requests/base.py,sha256=PGI6gMnT0ZDhlkk9YWBRTUiwqPLan-O7yYt0MKyFjy0,14753
17
- lm_deluge/api_requests/cohere.py,sha256=1bCnV3Ot_n7CJKYLU_AoaKUuTgPUXUSBHPkAauQBimY,5089
17
+ lm_deluge/api_requests/cohere.py,sha256=KyYpbOjJxaTdauQBG_D7WWPLjkqmmk9-YFFnxYyT0vU,4898
18
18
  lm_deluge/api_requests/common.py,sha256=ZtUirAlYNE4CJOQPbNip-mWKOMXCJi2_malwYsUcqsg,642
19
19
  lm_deluge/api_requests/google.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  lm_deluge/api_requests/openai.py,sha256=vjf2WFqQimroyGt_hX730lF8T83Bv29MzSyA8Ek0A9s,5663
@@ -31,7 +31,7 @@ lm_deluge/util/logprobs.py,sha256=UkBZakOxWluaLqHrjARu7xnJ0uCHVfLGHJdnYlEcutk,11
31
31
  lm_deluge/util/pdf.py,sha256=zBcuh2IJxRfro6JPzQkAqdc6hUcrduFwb9aEoacNG9U,1590
32
32
  lm_deluge/util/validation.py,sha256=hz5dDb3ebvZrZhnaWxOxbNSVMI6nmaOODBkk0htAUhs,1575
33
33
  lm_deluge/util/xml.py,sha256=-yUKOZwsAY009w4ppQ8FI4hb5gDvLzMwcSgv88aEnaE,10578
34
- lm_deluge-0.0.4.dist-info/METADATA,sha256=eHZFvQYWovoOURJX3BhW_PfV8W4cMLf6YRKn_Qxiwo4,4957
35
- lm_deluge-0.0.4.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
36
- lm_deluge-0.0.4.dist-info/top_level.txt,sha256=hqU-TJX93yBwpgkDtYcXyLr3t7TLSCCZ_reytJjwBaE,10
37
- lm_deluge-0.0.4.dist-info/RECORD,,
34
+ lm_deluge-0.0.5.dist-info/METADATA,sha256=MxI6OVGdYD6MsjeQPyoXDT8pneKB8FcZ652ZW0t_qyk,4957
35
+ lm_deluge-0.0.5.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
36
+ lm_deluge-0.0.5.dist-info/top_level.txt,sha256=hqU-TJX93yBwpgkDtYcXyLr3t7TLSCCZ_reytJjwBaE,10
37
+ lm_deluge-0.0.5.dist-info/RECORD,,