langwatch 0.6.1__py3-none-any.whl → 0.7.1__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.
- langwatch/__version__.py +1 -1
- langwatch/langchain.py +5 -7
- langwatch/prompts/prompt_facade.py +4 -0
- {langwatch-0.6.1.dist-info → langwatch-0.7.1.dist-info}/METADATA +2 -1
- {langwatch-0.6.1.dist-info → langwatch-0.7.1.dist-info}/RECORD +6 -6
- {langwatch-0.6.1.dist-info → langwatch-0.7.1.dist-info}/WHEEL +1 -1
langwatch/__version__.py
CHANGED
langwatch/langchain.py
CHANGED
|
@@ -11,20 +11,18 @@ from typing import (
|
|
|
11
11
|
Union,
|
|
12
12
|
)
|
|
13
13
|
from warnings import warn
|
|
14
|
-
from
|
|
15
|
-
LLMResult,
|
|
16
|
-
AgentAction,
|
|
17
|
-
AgentFinish,
|
|
14
|
+
from langchain_core.messages import (
|
|
18
15
|
BaseMessage,
|
|
19
16
|
HumanMessage,
|
|
20
17
|
AIMessage,
|
|
21
18
|
SystemMessage,
|
|
22
19
|
FunctionMessage,
|
|
23
|
-
ChatGeneration,
|
|
24
20
|
)
|
|
21
|
+
from langchain_core.outputs import LLMResult, ChatGeneration
|
|
22
|
+
from langchain_core.agents import AgentAction, AgentFinish
|
|
25
23
|
from langwatch.utils.initialization import ensure_setup
|
|
26
24
|
from opentelemetry.trace import get_current_span, SpanContext
|
|
27
|
-
from
|
|
25
|
+
from langchain_core.callbacks.base import BaseCallbackHandler
|
|
28
26
|
from langwatch.telemetry.span import LangWatchSpan
|
|
29
27
|
from langwatch.telemetry.tracing import LangWatchTrace
|
|
30
28
|
from langwatch.utils.transformation import (
|
|
@@ -49,7 +47,7 @@ from langwatch.domain import (
|
|
|
49
47
|
)
|
|
50
48
|
|
|
51
49
|
from uuid import UUID
|
|
52
|
-
from
|
|
50
|
+
from langchain_core.tools import BaseTool
|
|
53
51
|
import logging
|
|
54
52
|
|
|
55
53
|
|
|
@@ -52,6 +52,10 @@ class PromptsFacade:
|
|
|
52
52
|
|
|
53
53
|
Tries local files first, then falls back to API.
|
|
54
54
|
You can optionally specify a version number to get a specific version of the prompt.
|
|
55
|
+
|
|
56
|
+
Raises:
|
|
57
|
+
ValueError: If the prompt is not found (404 error).
|
|
58
|
+
RuntimeError: If the API call fails for other reasons (auth, server errors, etc.).
|
|
55
59
|
"""
|
|
56
60
|
# Try to load from local files first
|
|
57
61
|
local_data = self._local_loader.load_prompt(prompt_id)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langwatch
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.1
|
|
4
4
|
Summary: LangWatch Python SDK, for monitoring your LLMs
|
|
5
5
|
Author-email: Langwatch Engineers <engineering@langwatch.ai>
|
|
6
6
|
License: MIT
|
|
@@ -19,6 +19,7 @@ Requires-Dist: attrs>=24
|
|
|
19
19
|
Requires-Dist: coolname>=2.2.0
|
|
20
20
|
Requires-Dist: deprecated>=1.2.18
|
|
21
21
|
Requires-Dist: httpx>=0.27.0
|
|
22
|
+
Requires-Dist: langchain-core<2.0.0,>=1.0.0
|
|
22
23
|
Requires-Dist: nanoid<3.0.0,>=2.0.0
|
|
23
24
|
Requires-Dist: openinference-instrumentation-haystack>=0.1.20
|
|
24
25
|
Requires-Dist: openinference-instrumentation-langchain>=0.1.24
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
langwatch/__init__.py,sha256=TzPHzqCFGZJByI3sAIKrNB33Qi4PqVmgYDZuBwPnhPc,4222
|
|
2
|
-
langwatch/__version__.py,sha256=
|
|
2
|
+
langwatch/__version__.py,sha256=fBD2JnjoFZRPQsIuDC5Xep_rxr6nHm8RZyd569-exDo,91
|
|
3
3
|
langwatch/attributes.py,sha256=nXdI_G85wQQCAdAcwjCiLYdEYj3wATmfgCmhlf6dVIk,3910
|
|
4
4
|
langwatch/batch_evaluation.py,sha256=piez7TYqUZPb9NlIShTuTPmSzrZqX-vm2Grz_NGXe04,16078
|
|
5
5
|
langwatch/client.py,sha256=WTNcYSik7kZ2kH-qGDnhbMTosc8e_Xhab_lZlfh5TC8,25559
|
|
6
6
|
langwatch/evaluations.py,sha256=6JYaChMoG2oVvHRtZEVzn2xNxQIZr1nUFfHffm6Rfp0,16832
|
|
7
7
|
langwatch/guardrails.py,sha256=4d320HyklXPUVszF34aWsDKGzuvPggcDM_f45_eJTnc,1352
|
|
8
|
-
langwatch/langchain.py,sha256=
|
|
8
|
+
langwatch/langchain.py,sha256=HjbBBIDwwt688g0W4K0EsZGuGBbo1Mv5LQ-7Mkn56iQ,18726
|
|
9
9
|
langwatch/litellm.py,sha256=mPcw5cLykt0SQf9bTNSoT7elMx4gj-wZ_K2PC14Bw50,11998
|
|
10
10
|
langwatch/login.py,sha256=Wm8Vs7zxJNeGEPO7s_wSQN2DYObteDg56HcyluhTobw,896
|
|
11
11
|
langwatch/openai.py,sha256=h_NCIwJ0qs57PS-R7gQZsnf2_EBAahlYQMuqS9-Cj3Q,25139
|
|
@@ -395,7 +395,7 @@ langwatch/prompts/errors.py,sha256=9WKzLiOLJAm7DhtKc9c74oquh0IyDQOHNs6xeTFiQRg,5
|
|
|
395
395
|
langwatch/prompts/local_loader.py,sha256=JL2l1v8ymyhi8LvTndVIqhzP7XDHm4HXKygYDvSaV5w,6596
|
|
396
396
|
langwatch/prompts/prompt.py,sha256=SgLDo9hO-CuRE-AZ8zx9v7-KqjiabiW8GzD9jdx1IoA,6914
|
|
397
397
|
langwatch/prompts/prompt_api_service.py,sha256=tHhwIRjUBSM43_jwDAoGCHJjvvqVeSCrUPwcwMvUHho,9823
|
|
398
|
-
langwatch/prompts/prompt_facade.py,sha256=
|
|
398
|
+
langwatch/prompts/prompt_facade.py,sha256=kf-IXFWX_39Z5WD8nmKzWpO13pYwqMl12qfVfyw4A3E,5228
|
|
399
399
|
langwatch/prompts/types.py,sha256=p1bRMvfCCpGGiVwzFtQijVtWl5GWugL_vBOFc4B2348,269
|
|
400
400
|
langwatch/prompts/decorators/prompt_service_tracing.py,sha256=uSYw0vExo7AuxbcCRnxbYl6UOfOQSC0IsisSqYy153Y,2395
|
|
401
401
|
langwatch/prompts/decorators/prompt_tracing.py,sha256=x_PQvJlGbGF1h2HtGNiqaZ8K1qNd1jRf5pTOBTQx-7M,3963
|
|
@@ -415,6 +415,6 @@ langwatch/utils/initialization.py,sha256=1KoZmkHOvGEVF0j-4t4xRQdA_2C_SPiF7qFXqEG
|
|
|
415
415
|
langwatch/utils/module.py,sha256=KLBNOK3mA9gCSifCcQX_lOtU48BJQDWvFKtF6NMvwVA,688
|
|
416
416
|
langwatch/utils/transformation.py,sha256=76MGXyrYTxM0Yri36NJqLK-XxL4BBYdmKWAXXlw3D4Q,7690
|
|
417
417
|
langwatch/utils/utils.py,sha256=ZCOSie4o9LdJ7odshNfCNjmgwgQ27ojc5ENqt1rXuSs,596
|
|
418
|
-
langwatch-0.
|
|
419
|
-
langwatch-0.
|
|
420
|
-
langwatch-0.
|
|
418
|
+
langwatch-0.7.1.dist-info/METADATA,sha256=5MB1f8-LqrbopepuI6FfRljmJlpI1iB15vV1VJvWGiU,13192
|
|
419
|
+
langwatch-0.7.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
420
|
+
langwatch-0.7.1.dist-info/RECORD,,
|