promptlayer 0.2.4__tar.gz → 0.2.6__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.
- {promptlayer-0.2.4 → promptlayer-0.2.6}/PKG-INFO +1 -1
- {promptlayer-0.2.4 → promptlayer-0.2.6}/promptlayer/prompts/prompts.py +3 -3
- {promptlayer-0.2.4 → promptlayer-0.2.6}/promptlayer/utils.py +2 -2
- {promptlayer-0.2.4 → promptlayer-0.2.6}/pyproject.toml +1 -1
- {promptlayer-0.2.4 → promptlayer-0.2.6}/LICENSE +0 -0
- {promptlayer-0.2.4 → promptlayer-0.2.6}/README.md +0 -0
- {promptlayer-0.2.4 → promptlayer-0.2.6}/promptlayer/__init__.py +0 -0
- {promptlayer-0.2.4 → promptlayer-0.2.6}/promptlayer/promptlayer.py +0 -0
- {promptlayer-0.2.4 → promptlayer-0.2.6}/promptlayer/prompts/__init__.py +0 -0
- {promptlayer-0.2.4 → promptlayer-0.2.6}/promptlayer/prompts/chat.py +0 -0
- {promptlayer-0.2.4 → promptlayer-0.2.6}/promptlayer/resources/__init__.py +0 -0
- {promptlayer-0.2.4 → promptlayer-0.2.6}/promptlayer/resources/base.py +0 -0
- {promptlayer-0.2.4 → promptlayer-0.2.6}/promptlayer/resources/prompt.py +0 -0
- {promptlayer-0.2.4 → promptlayer-0.2.6}/promptlayer/track/__init__.py +0 -0
- {promptlayer-0.2.4 → promptlayer-0.2.6}/promptlayer/track/track.py +0 -0
|
@@ -30,7 +30,7 @@ def get_prompt(
|
|
|
30
30
|
if langchain:
|
|
31
31
|
if "_type" not in prompt["prompt_template"]:
|
|
32
32
|
prompt["prompt_template"]["_type"] = "prompt"
|
|
33
|
-
|
|
33
|
+
if prompt["prompt_template"]["_type"] == CHAT_PROMPTLAYER_LANGCHAIN:
|
|
34
34
|
prompt_template = to_prompt(prompt["prompt_template"])
|
|
35
35
|
else:
|
|
36
36
|
prompt_template = load_prompt_from_config(prompt["prompt_template"])
|
|
@@ -42,7 +42,7 @@ def get_prompt(
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
def publish_prompt(
|
|
45
|
-
prompt_name, tags=[], commit_message=None, prompt_template=None,
|
|
45
|
+
prompt_name, tags=[], commit_message=None, prompt_template=None, metadata=None
|
|
46
46
|
):
|
|
47
47
|
api_key = get_api_key()
|
|
48
48
|
if len(commit_message) > 72:
|
|
@@ -56,7 +56,7 @@ def publish_prompt(
|
|
|
56
56
|
"Please provide either a JSON prompt template or a langchain prompt template."
|
|
57
57
|
)
|
|
58
58
|
promptlayer_publish_prompt(
|
|
59
|
-
prompt_name, prompt_template, commit_message, tags, api_key,
|
|
59
|
+
prompt_name, prompt_template, commit_message, tags, api_key, metadata
|
|
60
60
|
)
|
|
61
61
|
|
|
62
62
|
|
|
@@ -209,7 +209,7 @@ def promptlayer_get_prompt(
|
|
|
209
209
|
|
|
210
210
|
|
|
211
211
|
def promptlayer_publish_prompt(
|
|
212
|
-
prompt_name, prompt_template, commit_message, tags, api_key,
|
|
212
|
+
prompt_name, prompt_template, commit_message, tags, api_key, metadata=None
|
|
213
213
|
):
|
|
214
214
|
try:
|
|
215
215
|
request_response = requests.post(
|
|
@@ -220,7 +220,7 @@ def promptlayer_publish_prompt(
|
|
|
220
220
|
"commit_message": commit_message,
|
|
221
221
|
"tags": tags,
|
|
222
222
|
"api_key": api_key,
|
|
223
|
-
"
|
|
223
|
+
"metadata": metadata,
|
|
224
224
|
},
|
|
225
225
|
)
|
|
226
226
|
except Exception as e:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|