promptlayer 0.4.5__tar.gz → 0.4.7__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.

Potentially problematic release.


This version of promptlayer might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: promptlayer
3
- Version: 0.4.5
3
+ Version: 0.4.7
4
4
  Summary: PromptLayer is a platform for prompt engineering and tracks your LLM requests.
5
5
  License: Apache-2.0
6
6
  Author: Magniv
@@ -7,7 +7,9 @@ from promptlayer.utils import get_api_key
7
7
 
8
8
  class Base:
9
9
  API_KEY = get_api_key()
10
- BASE_URL = os.environ.get("BASE_URL", "https://api.promptlayer.com/rest")
10
+ BASE_URL = (
11
+ os.environ.get("URL_API_PROMPTLAYER", "https://api.promptlayer.com") + "/rest"
12
+ )
11
13
 
12
14
  @classmethod
13
15
  def list(cls, params={}):
@@ -7,6 +7,7 @@ import os
7
7
  import sys
8
8
  import types
9
9
  from copy import deepcopy
10
+ from enum import Enum
10
11
  from typing import Union
11
12
 
12
13
  import requests
@@ -114,6 +115,8 @@ def convert_native_object_to_dict(native_object):
114
115
  return {k: convert_native_object_to_dict(v) for k, v in native_object.items()}
115
116
  if isinstance(native_object, list):
116
117
  return [convert_native_object_to_dict(v) for v in native_object]
118
+ if isinstance(native_object, Enum):
119
+ return native_object.value
117
120
  if hasattr(native_object, "__dict__"):
118
121
  return {
119
122
  k: convert_native_object_to_dict(v)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "promptlayer"
3
- version = "0.4.5"
3
+ version = "0.4.7"
4
4
  description = "PromptLayer is a platform for prompt engineering and tracks your LLM requests."
5
5
  authors = ["Magniv <hello@magniv.io>"]
6
6
  license = "Apache-2.0"
File without changes
File without changes