From 4e5d219eab13144cefd6b6a3ee43264ed1b05090 Mon Sep 17 00:00:00 2001 From: Roger Yang <80478925+RogerHYang@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:11:12 -0800 Subject: [PATCH] ci: fix type check for llama-index (#1164) --- .../src/openinference/instrumentation/llama_index/_callback.py | 2 +- python/tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/instrumentation/openinference-instrumentation-llama-index/src/openinference/instrumentation/llama_index/_callback.py b/python/instrumentation/openinference-instrumentation-llama-index/src/openinference/instrumentation/llama_index/_callback.py index 1ad5f4326..dfe87484d 100644 --- a/python/instrumentation/openinference-instrumentation-llama-index/src/openinference/instrumentation/llama_index/_callback.py +++ b/python/instrumentation/openinference-instrumentation-llama-index/src/openinference/instrumentation/llama_index/_callback.py @@ -502,7 +502,7 @@ def _get_span_kind(event_type: Optional[CBEventType]) -> OpenInferenceSpanKindVa def _message_payload_to_attributes(message: Any) -> Dict[str, Optional[str]]: if isinstance(message, ChatMessage): - message_attributes = { + message_attributes: Dict[str, Any] = { MESSAGE_ROLE: message.role.value, MESSAGE_CONTENT: message.content, } diff --git a/python/tox.ini b/python/tox.ini index 8771198da..960fda7f4 100644 --- a/python/tox.ini +++ b/python/tox.ini @@ -57,7 +57,7 @@ commands_pre = openai-latest: uv pip install -U openai 'httpx<0.28' vertexai: uv pip install --reinstall {toxinidir}/instrumentation/openinference-instrumentation-vertexai[test] vertexai-latest: uv pip install -U vertexai 'httpx<0.28' - llama_index: uv pip install --reinstall {toxinidir}/instrumentation/openinference-instrumentation-llama-index[test] + llama_index: uv pip install --reinstall {toxinidir}/instrumentation/openinference-instrumentation-llama-index[test] 'httpx<0.28' llama_index-latest: uv pip install -U llama-index llama-index-core 'httpx<0.28' dspy: uv pip install --reinstall {toxinidir}/instrumentation/openinference-instrumentation-dspy[test] dspy-latest: uv pip install -U dspy-ai 'httpx<0.28'