From b770a2910bbd9d7d388519478a3237f1930b64c7 Mon Sep 17 00:00:00 2001 From: Stefano Fiorucci Date: Tue, 26 Nov 2024 16:47:18 +0100 Subject: [PATCH 1/3] jina reader: rename the output edge (#1217) --- .../haystack_integrations/components/connectors/jina/reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/jina/src/haystack_integrations/components/connectors/jina/reader.py b/integrations/jina/src/haystack_integrations/components/connectors/jina/reader.py index eb53329f7..618cacb4e 100644 --- a/integrations/jina/src/haystack_integrations/components/connectors/jina/reader.py +++ b/integrations/jina/src/haystack_integrations/components/connectors/jina/reader.py @@ -103,7 +103,7 @@ def _json_to_document(self, data: dict) -> Document: document = Document(content=content, meta=data) return document - @component.output_types(document=List[Document]) + @component.output_types(documents=List[Document]) def run(self, query: str, headers: Optional[Dict[str, str]] = None): """ Process the query/URL using the Jina AI reader service. From 793598fa6966c11ac6807f67dbaf33222d4e3e21 Mon Sep 17 00:00:00 2001 From: HaystackBot Date: Tue, 26 Nov 2024 15:48:50 +0000 Subject: [PATCH 2/3] Update the changelog --- integrations/jina/CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/integrations/jina/CHANGELOG.md b/integrations/jina/CHANGELOG.md index f65853d31..01de2abc1 100644 --- a/integrations/jina/CHANGELOG.md +++ b/integrations/jina/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [integrations/jina-v0.5.1] - 2024-11-26 + +### ๐Ÿงน Chores + +- Fix linting/isort (#1215) + +### ๐ŸŒ€ Miscellaneous + +- Fix: `JinaReaderConnector` - fix the name of the output edge (#1217) + ## [integrations/jina-v0.5.0] - 2024-11-21 ### ๐Ÿš€ Features From 15dacfacb87127bf1ee9c645ad52048995007715 Mon Sep 17 00:00:00 2001 From: Vladimir Blagojevic Date: Wed, 27 Nov 2024 10:33:12 +0100 Subject: [PATCH 3/3] Fix tracing_context_var lint errors (#1220) --- .../tracing/langfuse/tracer.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/integrations/langfuse/src/haystack_integrations/tracing/langfuse/tracer.py b/integrations/langfuse/src/haystack_integrations/tracing/langfuse/tracer.py index c1f8d4d93..d6f2535c7 100644 --- a/integrations/langfuse/src/haystack_integrations/tracing/langfuse/tracer.py +++ b/integrations/langfuse/src/haystack_integrations/tracing/langfuse/tracer.py @@ -42,7 +42,7 @@ # Context var used to keep track of tracing related info. # This mainly useful for parents spans. -tracing_context_var: ContextVar[Dict[Any, Any]] = ContextVar("tracing_context", default={}) +tracing_context_var: ContextVar[Dict[Any, Any]] = ContextVar("tracing_context") class LangfuseSpan(Span): @@ -147,15 +147,16 @@ def trace( operation_name=operation_name, ) # Create a new trace if no parent span is provided + context = tracing_context_var.get({}) span = LangfuseSpan( self._tracer.trace( name=self._name, public=self._public, - id=tracing_context_var.get().get("trace_id"), - user_id=tracing_context_var.get().get("user_id"), - session_id=tracing_context_var.get().get("session_id"), - tags=tracing_context_var.get().get("tags"), - version=tracing_context_var.get().get("version"), + id=context.get("trace_id"), + user_id=context.get("user_id"), + session_id=context.get("session_id"), + tags=context.get("tags"), + version=context.get("version"), ) ) elif tags.get(_COMPONENT_TYPE_KEY) in _ALL_SUPPORTED_GENERATORS: