langfuse-haystack 1.1.1__tar.gz → 2.0.0__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.
Files changed (19) hide show
  1. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/CHANGELOG.md +14 -0
  2. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/PKG-INFO +3 -3
  3. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/pyproject.toml +1 -1
  4. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/src/haystack_integrations/tracing/langfuse/tracer.py +1 -0
  5. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/tests/test_tracer.py +1 -1
  6. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/tests/test_tracing.py +15 -7
  7. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/.gitignore +0 -0
  8. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/LICENSE.txt +0 -0
  9. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/README.md +0 -0
  10. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/example/basic_rag.py +0 -0
  11. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/example/chat.py +0 -0
  12. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/example/requirements.txt +0 -0
  13. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/pydoc/config.yml +0 -0
  14. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/src/haystack_integrations/components/connectors/__init__.py +0 -0
  15. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/src/haystack_integrations/components/connectors/langfuse/__init__.py +0 -0
  16. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/src/haystack_integrations/components/connectors/langfuse/langfuse_connector.py +0 -0
  17. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/src/haystack_integrations/tracing/langfuse/__init__.py +0 -0
  18. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/tests/__init__.py +0 -0
  19. {langfuse_haystack-1.1.1 → langfuse_haystack-2.0.0}/tests/test_langfuse_connector.py +0 -0
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [integrations/langfuse-v1.1.2] - 2025-05-16
4
+
5
+ ### 🌀 Miscellaneous
6
+
7
+ - Test: Update how test skipping works in Langfuse (#1756)
8
+ - `OllamaGenerator` support in Langfuse (#1759)
9
+
10
+ ## [integrations/langfuse-v1.1.1] - 2025-05-08
11
+
12
+ ### 🚀 Features
13
+
14
+ - Add more options to LangfuseConnector (#1657)
15
+
16
+
3
17
  ## [integrations/langfuse-v1.1.0] - 2025-05-06
4
18
 
5
19
  ### 🚀 Features
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langfuse-haystack
3
- Version: 1.1.1
3
+ Version: 2.0.0
4
4
  Summary: Langfuse integration for Haystack
5
5
  Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/langfuse#readme
6
6
  Project-URL: Issues, https://github.com/deepset-ai/haystack-core-integrations/issues
@@ -18,8 +18,8 @@ Classifier: Programming Language :: Python :: 3.13
18
18
  Classifier: Programming Language :: Python :: Implementation :: CPython
19
19
  Classifier: Programming Language :: Python :: Implementation :: PyPy
20
20
  Requires-Python: >=3.9
21
- Requires-Dist: haystack-ai>=2.12.1
22
- Requires-Dist: langfuse
21
+ Requires-Dist: haystack-ai>=2.13.0
22
+ Requires-Dist: langfuse>=2.9.0
23
23
  Description-Content-Type: text/markdown
24
24
 
25
25
  # langfuse-haystack
@@ -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.12.1", "langfuse"]
25
+ dependencies = ["haystack-ai>=2.13.0", "langfuse>=2.9.0"]
26
26
 
27
27
  [project.urls]
28
28
  Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/langfuse#readme"
@@ -35,6 +35,7 @@ _SUPPORTED_GENERATORS = [
35
35
  "HuggingFaceAPIGenerator",
36
36
  "HuggingFaceLocalGenerator",
37
37
  "CohereGenerator",
38
+ "OllamaGenerator",
38
39
  ]
39
40
  _SUPPORTED_CHAT_GENERATORS = [
40
41
  "AzureOpenAIChatGenerator",
@@ -9,7 +9,7 @@ from unittest.mock import MagicMock, Mock, patch
9
9
  from typing import Optional
10
10
 
11
11
  import pytest
12
- from haystack.dataclasses import ChatMessage, ToolCall, ToolCallResult
12
+ from haystack.dataclasses import ChatMessage, ToolCall
13
13
  from haystack_integrations.tracing.langfuse.tracer import LangfuseTracer, LangfuseSpan, SpanContext, DefaultSpanHandler
14
14
  from haystack_integrations.tracing.langfuse.tracer import _COMPONENT_OUTPUT_KEY
15
15
 
@@ -57,6 +57,10 @@ def basic_pipeline(llm_class, expected_trace):
57
57
  return pipe
58
58
 
59
59
 
60
+ @pytest.mark.skipif(
61
+ not all([os.environ.get("LANGFUSE_SECRET_KEY"), os.environ.get("LANGFUSE_PUBLIC_KEY")]),
62
+ reason="Missing required environment variables: LANGFUSE_SECRET_KEY and LANGFUSE_PUBLIC_KEY",
63
+ )
60
64
  @pytest.mark.integration
61
65
  @pytest.mark.parametrize(
62
66
  "llm_class, env_var, expected_trace",
@@ -68,7 +72,7 @@ def basic_pipeline(llm_class, expected_trace):
68
72
  )
69
73
  def test_tracing_integration(llm_class, env_var, expected_trace, basic_pipeline):
70
74
  if not all([os.environ.get("LANGFUSE_SECRET_KEY"), os.environ.get("LANGFUSE_PUBLIC_KEY"), os.environ.get(env_var)]):
71
- pytest.skip(f"Missing required environment variables: LANGFUSE_SECRET_KEY, LANGFUSE_PUBLIC_KEY, or {env_var}")
75
+ pytest.skip(f"Missing required environment variable: {env_var}")
72
76
 
73
77
  messages = [
74
78
  ChatMessage.from_system("Always respond in German even if some input data is in other languages."),
@@ -102,14 +106,18 @@ def test_tracing_integration(llm_class, env_var, expected_trace, basic_pipeline)
102
106
  assert res_json["observations"][0]["type"] == "GENERATION"
103
107
 
104
108
 
109
+ @pytest.mark.skipif(
110
+ not all(
111
+ [
112
+ os.environ.get("LANGFUSE_SECRET_KEY"),
113
+ os.environ.get("LANGFUSE_PUBLIC_KEY"),
114
+ os.environ.get("OPENAI_API_KEY"),
115
+ ]
116
+ ),
117
+ reason="Missing required environment variables: LANGFUSE_SECRET_KEY and LANGFUSE_PUBLIC_KEY",
118
+ )
105
119
  @pytest.mark.integration
106
120
  def test_tracing_with_sub_pipelines():
107
- if not all(
108
- [os.environ.get("LANGFUSE_SECRET_KEY"), os.environ.get("LANGFUSE_PUBLIC_KEY"), os.environ.get("OPENAI_API_KEY")]
109
- ):
110
- pytest.skip(
111
- f"Missing required environment variables: LANGFUSE_SECRET_KEY, LANGFUSE_PUBLIC_KEY, or OPENAI_API_KEY"
112
- )
113
121
 
114
122
  @component
115
123
  class SubGenerator: