langfuse-haystack 0.6.2__tar.gz → 0.6.3__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.
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/CHANGELOG.md +2 -1
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/PKG-INFO +2 -2
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/pyproject.toml +1 -1
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/src/haystack_integrations/tracing/langfuse/tracer.py +2 -16
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/.gitignore +0 -0
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/LICENSE.txt +0 -0
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/README.md +0 -0
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/example/basic_rag.py +0 -0
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/example/chat.py +0 -0
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/example/requirements.txt +0 -0
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/pydoc/config.yml +0 -0
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/src/haystack_integrations/components/connectors/langfuse/__init__.py +0 -0
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/src/haystack_integrations/components/connectors/langfuse/langfuse_connector.py +0 -0
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/src/haystack_integrations/tracing/langfuse/__init__.py +0 -0
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/tests/__init__.py +0 -0
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/tests/test_langfuse_span.py +0 -0
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/tests/test_tracer.py +0 -0
- {langfuse_haystack-0.6.2 → langfuse_haystack-0.6.3}/tests/test_tracing.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [
|
|
3
|
+
## [integrations/langfuse-v0.6.2] - 2025-01-02
|
|
4
4
|
|
|
5
5
|
### 🚀 Features
|
|
6
6
|
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
### 🌀 Miscellaneous
|
|
14
14
|
|
|
15
15
|
- Chore: Fix tracing_context_var lint errors (#1220)
|
|
16
|
+
- Fix messages conversion to OpenAI format (#1272)
|
|
16
17
|
|
|
17
18
|
## [integrations/langfuse-v0.6.0] - 2024-11-18
|
|
18
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langfuse-haystack
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.3
|
|
4
4
|
Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/langfuse#readme
|
|
5
5
|
Project-URL: Issues, https://github.com/deepset-ai/haystack-core-integrations/issues
|
|
6
6
|
Project-URL: Source, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/langfuse
|
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
17
17
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
18
18
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
19
19
|
Requires-Python: >=3.8
|
|
20
|
-
Requires-Dist: haystack-ai>=2.
|
|
20
|
+
Requires-Dist: haystack-ai>=2.9.0
|
|
21
21
|
Requires-Dist: langfuse
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
|
|
@@ -22,7 +22,7 @@ classifiers = [
|
|
|
22
22
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
23
23
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
24
24
|
]
|
|
25
|
-
dependencies = ["haystack-ai>=2.
|
|
25
|
+
dependencies = ["haystack-ai>=2.9.0", "langfuse"]
|
|
26
26
|
|
|
27
27
|
[project.urls]
|
|
28
28
|
Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/langfuse#readme"
|
|
@@ -6,16 +6,12 @@ from typing import Any, Dict, Iterator, List, Optional, Union
|
|
|
6
6
|
|
|
7
7
|
from haystack import logging
|
|
8
8
|
from haystack.dataclasses import ChatMessage
|
|
9
|
-
from haystack.lazy_imports import LazyImport
|
|
10
9
|
from haystack.tracing import Span, Tracer
|
|
11
10
|
from haystack.tracing import tracer as proxy_tracer
|
|
12
11
|
from haystack.tracing import utils as tracing_utils
|
|
13
12
|
|
|
14
13
|
import langfuse
|
|
15
14
|
|
|
16
|
-
with LazyImport("") as openai_utils_import:
|
|
17
|
-
from haystack.components.generators.openai_utils import _convert_message_to_openai_format
|
|
18
|
-
|
|
19
15
|
logger = logging.getLogger(__name__)
|
|
20
16
|
|
|
21
17
|
HAYSTACK_LANGFUSE_ENFORCE_FLUSH_ENV_VAR = "HAYSTACK_LANGFUSE_ENFORCE_FLUSH"
|
|
@@ -86,24 +82,14 @@ class LangfuseSpan(Span):
|
|
|
86
82
|
return
|
|
87
83
|
if key.endswith(".input"):
|
|
88
84
|
if "messages" in value:
|
|
89
|
-
|
|
90
|
-
# Haystack < 2.9.0
|
|
91
|
-
messages = [_convert_message_to_openai_format(m) for m in value["messages"]]
|
|
92
|
-
else:
|
|
93
|
-
# Haystack >= 2.9.0
|
|
94
|
-
messages = [m.to_openai_dict_format() for m in value["messages"]]
|
|
85
|
+
messages = [m.to_openai_dict_format() for m in value["messages"]]
|
|
95
86
|
self._span.update(input=messages)
|
|
96
87
|
else:
|
|
97
88
|
self._span.update(input=value)
|
|
98
89
|
elif key.endswith(".output"):
|
|
99
90
|
if "replies" in value:
|
|
100
91
|
if all(isinstance(r, ChatMessage) for r in value["replies"]):
|
|
101
|
-
|
|
102
|
-
# Haystack < 2.9.0
|
|
103
|
-
replies = [_convert_message_to_openai_format(m) for m in value["replies"]]
|
|
104
|
-
else:
|
|
105
|
-
# Haystack >= 2.9.0
|
|
106
|
-
replies = [m.to_openai_dict_format() for m in value["replies"]]
|
|
92
|
+
replies = [m.to_openai_dict_format() for m in value["replies"]]
|
|
107
93
|
else:
|
|
108
94
|
replies = value["replies"]
|
|
109
95
|
self._span.update(output=replies)
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|