diff --git a/python/langsmith/_internal/_background_thread.py b/python/langsmith/_internal/_background_thread.py index c9c8c51fef..1454aa9e7a 100644 --- a/python/langsmith/_internal/_background_thread.py +++ b/python/langsmith/_internal/_background_thread.py @@ -168,6 +168,34 @@ def _tracing_thread_handle_batch( tracing_queue.task_done() +def _otel_tracing_thread_handle_batch( + client: Client, + tracing_queue: Queue, + batch: List[TracingQueueItem], +) -> None: + """Handle a batch of tracing queue items by exporting them to OTEL.""" + try: + ops = combine_serialized_queue_operations([item.item for item in batch]) + + run_ops = [op for op in ops if isinstance(op, SerializedRunOperation)] + if run_ops: + if client.otel_exporter is not None: + client.otel_exporter.export_batch(run_ops) + else: + logger.error( + "Error in OTEL tracing queue: client.otel_exporter is None" + ) + + except Exception: + logger.error("Error in OTEL tracing queue", exc_info=True) + # Exceptions are logged elsewhere, but we need to make sure the + # background thread continues to run + finally: + # Mark all items in the batch as done + for _ in batch: + tracing_queue.task_done() + + def get_size_limit_from_env() -> Optional[int]: size_limit_str = ls_utils.get_env_var( "BATCH_INGEST_SIZE_LIMIT", @@ -223,8 +251,12 @@ def tracing_control_thread_func(client_ref: weakref.ref[Client]) -> None: # 1 for this func, 1 for getrefcount, 1 for _get_data_type_cached num_known_refs = 3 - disable_compression = ls_utils.get_env_var("DISABLE_RUN_COMPRESSION") - if not ls_utils.is_truish(disable_compression) and use_multipart: + # Disable compression if explicitly set or if using OpenTelemetry + disable_compression = ( + ls_utils.is_truish(ls_utils.get_env_var("DISABLE_RUN_COMPRESSION")) + or client.otel_exporter is not None + ) + if not disable_compression and use_multipart: if not (client.info.instance_flags or {}).get( "zstd_compression_enabled", False ): @@ -278,15 +310,23 @@ def keep_thread_active() -> bool: sub_threads.append(new_thread) new_thread.start() if next_batch := _tracing_thread_drain_queue(tracing_queue, limit=size_limit): - _tracing_thread_handle_batch( - client, tracing_queue, next_batch, use_multipart - ) + if client.otel_exporter is not None: + _otel_tracing_thread_handle_batch(client, tracing_queue, next_batch) + else: + _tracing_thread_handle_batch( + client, tracing_queue, next_batch, use_multipart + ) # drain the queue on exit while next_batch := _tracing_thread_drain_queue( tracing_queue, limit=size_limit, block=False ): - _tracing_thread_handle_batch(client, tracing_queue, next_batch, use_multipart) + if client.otel_exporter is not None: + _otel_tracing_thread_handle_batch(client, tracing_queue, next_batch) + else: + _tracing_thread_handle_batch( + client, tracing_queue, next_batch, use_multipart + ) def tracing_control_thread_func_compress_parallel( @@ -446,9 +486,12 @@ def _tracing_sub_thread_func( ): if next_batch := _tracing_thread_drain_queue(tracing_queue, limit=size_limit): seen_successive_empty_queues = 0 - _tracing_thread_handle_batch( - client, tracing_queue, next_batch, use_multipart - ) + if client.otel_exporter is not None: + _otel_tracing_thread_handle_batch(client, tracing_queue, next_batch) + else: + _tracing_thread_handle_batch( + client, tracing_queue, next_batch, use_multipart + ) else: seen_successive_empty_queues += 1 @@ -456,4 +499,9 @@ def _tracing_sub_thread_func( while next_batch := _tracing_thread_drain_queue( tracing_queue, limit=size_limit, block=False ): - _tracing_thread_handle_batch(client, tracing_queue, next_batch, use_multipart) + if client.otel_exporter is not None: + _otel_tracing_thread_handle_batch(client, tracing_queue, next_batch) + else: + _tracing_thread_handle_batch( + client, tracing_queue, next_batch, use_multipart + ) diff --git a/python/langsmith/_internal/otel/_otel_client.py b/python/langsmith/_internal/otel/_otel_client.py new file mode 100644 index 0000000000..23e30d7434 --- /dev/null +++ b/python/langsmith/_internal/otel/_otel_client.py @@ -0,0 +1,74 @@ +"""Client configuration for OpenTelemetry integration with LangSmith.""" + +import os + +from langsmith import utils as ls_utils + +HAS_OTEL = False +try: + if ls_utils.is_truish(ls_utils.get_env_var("OTEL_ENABLED")): + from opentelemetry.exporter.otlp.proto.http.trace_exporter import ( # type: ignore[import] + OTLPSpanExporter, + ) + from opentelemetry.sdk.resources import ( # type: ignore[import] + SERVICE_NAME, + Resource, + ) + from opentelemetry.sdk.trace import TracerProvider # type: ignore[import] + from opentelemetry.sdk.trace.export import ( # type: ignore[import] + BatchSpanProcessor, + ) + + HAS_OTEL = True +except ImportError: + pass + + +def get_otlp_tracer_provider() -> "TracerProvider": + """Get the OTLP tracer provider for LangSmith. + + This function creates a tracer provider that exports spans using the OTLP protocol + with LangSmith-specific defaults: + + - OTEL_EXPORTER_OTLP_ENDPOINT: https://api.smith.langchain.com/otel + - OTEL_EXPORTER_OTLP_HEADERS: Contains x-api-key from LangSmith API key and + Langsmith-Project header if project is configured + + These defaults can be overridden by setting the environment variables before + calling this function. + + Returns: + TracerProvider: The OTLP tracer provider. + """ + # Set LangSmith-specific defaults if not already set in environment + if not HAS_OTEL: + raise ImportError( + "OpenTelemetry packages are required to use this function. " + "Please install with `pip install langsmith[otel]`" + ) + + if "OTEL_EXPORTER_OTLP_ENDPOINT" not in os.environ: + ls_endpoint = ls_utils.get_api_url(None) + os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = f"{ls_endpoint}/otel" + + # Configure headers with API key and project if available + if "OTEL_EXPORTER_OTLP_HEADERS" not in os.environ: + api_key = ls_utils.get_api_key(None) + headers = f"x-api-key={api_key}" + + project = ls_utils.get_tracer_project() + if project: + headers += f",Langsmith-Project={project}" + + os.environ["OTEL_EXPORTER_OTLP_HEADERS"] = headers + + service_name = os.environ.get("OTEL_SERVICE_NAME", "langsmith") + resource = Resource(attributes={SERVICE_NAME: service_name}) + + tracer_provider = TracerProvider(resource=resource) + + otlp_exporter = OTLPSpanExporter() + span_processor = BatchSpanProcessor(otlp_exporter) + tracer_provider.add_span_processor(span_processor) + + return tracer_provider diff --git a/python/langsmith/_internal/otel/_otel_exporter.py b/python/langsmith/_internal/otel/_otel_exporter.py new file mode 100644 index 0000000000..7c7cbcde13 --- /dev/null +++ b/python/langsmith/_internal/otel/_otel_exporter.py @@ -0,0 +1,664 @@ +"""OpenTelemetry exporter for LangSmith runs.""" + +import datetime +import logging +import uuid +import warnings +from typing import Any, List, Optional, Tuple + +from langsmith import utils as ls_utils +from langsmith._internal import _orjson +from langsmith._internal._operations import ( + SerializedRunOperation, +) + +HAS_OTEL = False +try: + if ls_utils.is_truish(ls_utils.get_env_var("OTEL_ENABLED")): + from opentelemetry import trace # type: ignore[import] + from opentelemetry.trace import ( # type: ignore[import] + Span, + set_span_in_context, + ) + + HAS_OTEL = True +except ImportError: + pass + +logger = logging.getLogger(__name__) + +# OpenTelemetry GenAI semconv attribute names +GEN_AI_OPERATION_NAME = "gen_ai.operation.name" +GEN_AI_SYSTEM = "gen_ai.system" +GEN_AI_REQUEST_MODEL = "gen_ai.request.model" +GEN_AI_RESPONSE_MODEL = "gen_ai.response.model" +GEN_AI_USAGE_INPUT_TOKENS = "gen_ai.usage.input_tokens" +GEN_AI_USAGE_OUTPUT_TOKENS = "gen_ai.usage.output_tokens" +GEN_AI_USAGE_TOTAL_TOKENS = "gen_ai.usage.total_tokens" +GEN_AI_REQUEST_MAX_TOKENS = "gen_ai.request.max_tokens" +GEN_AI_REQUEST_TEMPERATURE = "gen_ai.request.temperature" +GEN_AI_REQUEST_TOP_P = "gen_ai.request.top_p" +GEN_AI_REQUEST_FREQUENCY_PENALTY = "gen_ai.request.frequency_penalty" +GEN_AI_REQUEST_PRESENCE_PENALTY = "gen_ai.request.presence_penalty" +GEN_AI_RESPONSE_FINISH_REASONS = "gen_ai.response.finish_reasons" +GENAI_PROMPT = "gen_ai.prompt" +GENAI_COMPLETION = "gen_ai.completion" + +GEN_AI_REQUEST_EXTRA_QUERY = "gen_ai.request.extra_query" +GEN_AI_REQUEST_EXTRA_BODY = "gen_ai.request.extra_body" +GEN_AI_SERIALIZED_NAME = "gen_ai.serialized.name" +GEN_AI_SERIALIZED_SIGNATURE = "gen_ai.serialized.signature" +GEN_AI_SERIALIZED_DOC = "gen_ai.serialized.doc" +GEN_AI_RESPONSE_ID = "gen_ai.response.id" +GEN_AI_RESPONSE_SERVICE_TIER = "gen_ai.response.service_tier" +GEN_AI_RESPONSE_SYSTEM_FINGERPRINT = "gen_ai.response.system_fingerprint" +GEN_AI_USAGE_INPUT_TOKEN_DETAILS = "gen_ai.usage.input_token_details" +GEN_AI_USAGE_OUTPUT_TOKEN_DETAILS = "gen_ai.usage.output_token_details" + +# LangSmith custom attributes +LANGSMITH_RUN_ID = "langsmith.span.id" +LANGSMITH_TRACE_ID = "langsmith.trace.id" +LANGSMITH_DOTTED_ORDER = "langsmith.span.dotted_order" +LANGSMITH_PARENT_RUN_ID = "langsmith.span.parent_id" +LANGSMITH_SESSION_ID = "langsmith.trace.session_id" +LANGSMITH_SESSION_NAME = "langsmith.trace.session_name" +LANGSMITH_RUN_TYPE = "langsmith.span.kind" +LANGSMITH_NAME = "langsmith.trace.name" +LANGSMITH_METADATA = "langsmith.metadata" +LANGSMITH_TAGS = "langsmith.span.tags" +LANGSMITH_RUNTIME = "langsmith.span.runtime" +LANGSMITH_REQUEST_STREAMING = "langsmith.request.streaming" +LANGSMITH_REQUEST_HEADERS = "langsmith.request.headers" + +# GenAI event names +GEN_AI_SYSTEM_MESSAGE = "gen_ai.system.message" +GEN_AI_USER_MESSAGE = "gen_ai.user.message" +GEN_AI_ASSISTANT_MESSAGE = "gen_ai.assistant.message" +GEN_AI_CHOICE = "gen_ai.choice" + +WELL_KNOWN_OPERATION_NAMES = { + "llm": "chat", + "tool": "execute_tool", + "retriever": "embeddings", + "embedding": "embeddings", + "prompt": "chat", +} + + +def _get_operation_name(run_type: str) -> str: + return WELL_KNOWN_OPERATION_NAMES.get(run_type, run_type) + + +class OTELExporter: + __slots__ = ["_tracer", "_spans"] + """OpenTelemetry exporter for LangSmith runs.""" + + def __init__(self, tracer_provider=None): + """Initialize the OTEL exporter. + + Args: + tracer_provider: Optional tracer provider to use. If not provided, + the global tracer provider will be used. + """ + if not HAS_OTEL: + warnings.warn( + "OTEL_ENABLED is set but OpenTelemetry packages are not installed. " + "Install with `pip install langsmith[otel]`" + ) + return + + self._tracer = trace.get_tracer("langsmith", tracer_provider=tracer_provider) + self._spans = {} + + def export_batch(self, operations: List[SerializedRunOperation]) -> None: + """Export a batch of serialized run operations to OTEL. + + Args: + operations: List of serialized run operations to export. + """ + # Create a dictionary mapping run IDs to their operations + + for op in operations: + try: + run_info = self._deserialize_run_info(op) + if not run_info: + continue + if op.operation == "post": + span = self._create_span_for_run(op, run_info) + if span: + self._spans[op.id] = span + else: + self._update_span_for_run(op, run_info) + except Exception as e: + logger.exception(f"Error processing operation {op.id}: {e}") + + def _deserialize_run_info(self, op: SerializedRunOperation) -> Optional[dict]: + """Deserialize the run info from the operation. + + Args: + op: The serialized run operation. + + Returns: + The deserialized run info as a dictionary, or None if deserialization + failed. + """ + try: + run_info = _orjson.loads(op._none) + + # convert run_info to a Run Schema + return run_info + except Exception as e: + logger.exception(f"Failed to deserialize run info for {op.id}: {e}") + return None + + def _create_span_for_run( + self, + op: SerializedRunOperation, + run_info: dict, + ) -> Optional["Span"]: + """Create an OpenTelemetry span for a run operation. + + Args: + op: The serialized run operation. + run_info: The deserialized run info. + parent_span: Optional parent span. + + Returns: + The created span, or None if creation failed. + """ + try: + start_time = run_info.get("start_time") + start_time_utc_nano = self._as_utc_nano(start_time) + + end_time = run_info.get("end_time") + end_time_utc_nano = self._as_utc_nano(end_time) + + # Start the span + parent_run_id = run_info.get("parent_run_id") + if parent_run_id is not None and uuid.UUID(parent_run_id) in self._spans: + span = self._tracer.start_span( + run_info.get("name"), + context=set_span_in_context(self._spans[uuid.UUID(parent_run_id)]), + start_time=start_time_utc_nano, + ) + else: + span = self._tracer.start_span( + run_info.get("name"), + start_time=start_time_utc_nano, + ) + + # Set all attributes + self._set_span_attributes(span, run_info, op) + + # Set status based on error + if run_info.get("error"): + span.set_status(trace.StatusCode.ERROR) + span.record_exception(Exception(run_info.get("error"))) + else: + span.set_status(trace.StatusCode.OK) + + # End the span if end_time is present + end_time = run_info.get("end_time") + if end_time: + end_time_utc_nano = self._as_utc_nano(end_time) + if end_time_utc_nano: + span.end(end_time=end_time_utc_nano) + else: + span.end() + + return span + except Exception as e: + logger.exception(f"Failed to create span for run {op.id}: {e}") + return None + + def _update_span_for_run(self, op: SerializedRunOperation, run_info: dict) -> None: + """Update an OpenTelemetry span for a run operation. + + Args: + op: The serialized run operation. + run_info: The deserialized run info. + """ + try: + # Get the span for this run + if op.id not in self._spans: + logger.debug(f"No span found for run {op.id} during update") + return + + span = self._spans[op.id] + + # Update attributes + self._set_span_attributes(span, run_info, op) + # Update status based on error + if run_info.get("error"): + span.set_status(trace.StatusCode.ERROR) + span.record_exception(Exception(run_info.get("error"))) + else: + span.set_status(trace.StatusCode.OK) + + # End the span if end_time is present + end_time = run_info.get("end_time") + if end_time: + end_time_utc_nano = self._as_utc_nano(end_time) + if end_time_utc_nano: + span.end(end_time=end_time_utc_nano) + else: + span.end() + # Remove the span from our dictionary + del self._spans[op.id] + + except Exception as e: + logger.exception(f"Failed to update span for run {op.id}: {e}") + + def _extract_model_name(self, run_info: dict) -> Optional[str]: + """Extract model name from run info. + + Args: + run_info: The run info. + + Returns: + The model name, or None if not found. + """ + # Try to get model name from metadata + if run_info.get("extra") and run_info["extra"].get("metadata"): + metadata = run_info["extra"]["metadata"] + + # First check for ls_model_name in metadata + if metadata.get("ls_model_name"): + return metadata["ls_model_name"] + + # Then check invocation_params for model info + if "invocation_params" in metadata: + invocation_params = metadata["invocation_params"] + # Check model first, then model_name + if invocation_params.get("model"): + return invocation_params["model"] + elif invocation_params.get("model_name"): + return invocation_params["model_name"] + + return None + + def _set_span_attributes( + self, span: "Span", run_info: dict, op: SerializedRunOperation + ) -> None: + """Set attributes on the span. + + Args: + span: The span to set attributes on. + run_info: The deserialized run info. + op: The serialized run operation. + """ + # Set LangSmith-specific attributes + span.set_attribute(LANGSMITH_RUN_ID, str(op.id)) + span.set_attribute(LANGSMITH_TRACE_ID, str(op.trace_id)) + + if run_info.get("dotted_order"): + span.set_attribute( + LANGSMITH_DOTTED_ORDER, str(run_info.get("dotted_order")) + ) + + if run_info.get("parent_run_id"): + span.set_attribute( + LANGSMITH_PARENT_RUN_ID, str(run_info.get("parent_run_id")) + ) + if run_info.get("run_type"): + span.set_attribute(LANGSMITH_RUN_TYPE, str(run_info.get("run_type"))) + + if run_info.get("name"): + span.set_attribute(LANGSMITH_NAME, str(run_info.get("name"))) + + if run_info.get("session_id"): + span.set_attribute(LANGSMITH_SESSION_ID, str(run_info.get("session_id"))) + if run_info.get("session_name"): + span.set_attribute( + LANGSMITH_SESSION_NAME, str(run_info.get("session_name")) + ) + + # Set GenAI attributes according to OTEL semantic conventions + # Set gen_ai.operation.name + operation_name = _get_operation_name(run_info.get("run_type", "chain")) + span.set_attribute(GEN_AI_OPERATION_NAME, operation_name) + + # Set gen_ai.system + self._set_gen_ai_system(span, run_info) + + # Set model name if available + model_name = self._extract_model_name(run_info) + if model_name: + span.set_attribute(GEN_AI_REQUEST_MODEL, model_name) + + # Set token usage information + if run_info.get("prompt_tokens") is not None: + prompt_tokens = run_info["prompt_tokens"] + span.set_attribute(GEN_AI_USAGE_INPUT_TOKENS, int(prompt_tokens)) + + if run_info.get("completion_tokens") is not None: + completion_tokens = run_info["completion_tokens"] + span.set_attribute(GEN_AI_USAGE_OUTPUT_TOKENS, int(completion_tokens)) + + if run_info.get("total_tokens") is not None: + total_tokens = run_info["total_tokens"] + span.set_attribute(GEN_AI_USAGE_TOTAL_TOKENS, int(total_tokens)) + + # Set other parameters from invocation_params + self._set_invocation_parameters(span, run_info) + + # Set metadata and tags if available + extra = run_info.get("extra", {}) + metadata = extra.get("metadata", {}) + for key, value in metadata.items(): + span.set_attribute(f"{LANGSMITH_METADATA}.{key}", value) + + tags = run_info.get("tags") + if tags: + if isinstance(tags, list): + span.set_attribute(LANGSMITH_TAGS, ", ".join(tags)) + else: + span.set_attribute(LANGSMITH_TAGS, tags) + + # Support additional serialized attributes, if present + if run_info.get("serialized") and isinstance(run_info["serialized"], dict): + serialized = run_info["serialized"] + if "name" in serialized and serialized["name"] is not None: + span.set_attribute(GEN_AI_SERIALIZED_NAME, serialized["name"]) + if "signature" in serialized and serialized["signature"] is not None: + span.set_attribute(GEN_AI_SERIALIZED_SIGNATURE, serialized["signature"]) + if "doc" in serialized and serialized["doc"] is not None: + span.set_attribute(GEN_AI_SERIALIZED_DOC, serialized["doc"]) + + # Set inputs/outputs if available + self._set_io_attributes(span, op) + + def _set_gen_ai_system(self, span: "Span", run_info: dict) -> None: + """Set the gen_ai.system attribute on the span based on the model provider. + + Args: + span: The span to set attributes on. + run_info: The deserialized run info. + """ + # Default to "langchain" if we can't determine the system + system = "langchain" + + # Extract model name to determine the system + model_name = self._extract_model_name(run_info) + if model_name: + model_lower = model_name.lower() + if "anthropic" in model_lower or model_lower.startswith("claude"): + system = "anthropic" + elif "bedrock" in model_lower: + system = "aws.bedrock" + elif "azure" in model_lower and "openai" in model_lower: + system = "az.ai.openai" + elif "azure" in model_lower and "inference" in model_lower: + system = "az.ai.inference" + elif "cohere" in model_lower: + system = "cohere" + elif "deepseek" in model_lower: + system = "deepseek" + elif "gemini" in model_lower: + system = "gemini" + elif "groq" in model_lower: + system = "groq" + elif "watson" in model_lower or "ibm" in model_lower: + system = "ibm.watsonx.ai" + elif "mistral" in model_lower: + system = "mistral_ai" + elif "gpt" in model_lower or "openai" in model_lower: + system = "openai" + elif "perplexity" in model_lower or "sonar" in model_lower: + system = "perplexity" + elif "vertex" in model_lower: + system = "vertex_ai" + elif "xai" in model_lower or "grok" in model_lower: + system = "xai" + + span.set_attribute(GEN_AI_SYSTEM, system) + setattr(span, "_gen_ai_system", system) + + def _set_invocation_parameters(self, span: "Span", run_info: dict) -> None: + """Set invocation parameters on the span. + + Args: + span: The span to set attributes on. + run_info: The deserialized run info. + """ + if not (run_info.get("extra") and run_info["extra"].get("metadata")): + return + + metadata = run_info["extra"]["metadata"] + if "invocation_params" not in metadata: + return + + invocation_params = metadata["invocation_params"] + + # Set relevant invocation parameters + if "max_tokens" in invocation_params: + span.set_attribute( + GEN_AI_REQUEST_MAX_TOKENS, invocation_params["max_tokens"] + ) + + if "temperature" in invocation_params: + span.set_attribute( + GEN_AI_REQUEST_TEMPERATURE, invocation_params["temperature"] + ) + + if "top_p" in invocation_params: + span.set_attribute(GEN_AI_REQUEST_TOP_P, invocation_params["top_p"]) + + if "frequency_penalty" in invocation_params: + span.set_attribute( + GEN_AI_REQUEST_FREQUENCY_PENALTY, invocation_params["frequency_penalty"] + ) + + if "presence_penalty" in invocation_params: + span.set_attribute( + GEN_AI_REQUEST_PRESENCE_PENALTY, invocation_params["presence_penalty"] + ) + + def _set_io_attributes(self, span: "Span", op: SerializedRunOperation) -> None: + """Set input/output attributes on the span. + + Args: + span: The span to set attributes on. + op: The serialized run operation. + """ + if op.inputs: + try: + inputs = _orjson.loads(op.inputs) + + if isinstance(inputs, dict): + if ( + "model" in inputs + and isinstance(inputs.get("messages"), list) + and inputs["model"] is not None + ): + span.set_attribute(GEN_AI_REQUEST_MODEL, inputs["model"]) + + # Set additional request attributes if available. + if "stream" in inputs and inputs["stream"] is not None: + span.set_attribute( + LANGSMITH_REQUEST_STREAMING, inputs["stream"] + ) + if ( + "extra_headers" in inputs + and inputs["extra_headers"] is not None + ): + span.set_attribute( + LANGSMITH_REQUEST_HEADERS, inputs["extra_headers"] + ) + if "extra_query" in inputs and inputs["extra_query"] is not None: + span.set_attribute( + GEN_AI_REQUEST_EXTRA_QUERY, inputs["extra_query"] + ) + if "extra_body" in inputs and inputs["extra_body"] is not None: + span.set_attribute( + GEN_AI_REQUEST_EXTRA_BODY, inputs["extra_body"] + ) + + span.set_attribute(GENAI_PROMPT, op.inputs) + + except Exception: + logger.debug( + "Failed to process inputs for run %s", op.id, exc_info=True + ) + + if op.outputs: + try: + outputs = _orjson.loads(op.outputs) + + # Extract token usage from outputs (for LLM runs) + token_usage = self.get_unified_run_tokens(outputs) + if token_usage: + span.set_attribute(GEN_AI_USAGE_INPUT_TOKENS, token_usage[0]) + span.set_attribute(GEN_AI_USAGE_OUTPUT_TOKENS, token_usage[1]) + span.set_attribute( + GEN_AI_USAGE_TOTAL_TOKENS, token_usage[0] + token_usage[1] + ) + + if "model" in outputs: + span.set_attribute(GEN_AI_RESPONSE_MODEL, str(outputs["model"])) + # Extract additional response attributes. + if isinstance(outputs, dict): + if "id" in outputs and outputs["id"] is not None: + span.set_attribute(GEN_AI_RESPONSE_ID, outputs["id"]) + if "choices" in outputs and isinstance(outputs["choices"], list): + finish_reasons = [] + for choice in outputs["choices"]: + if ( + "finish_reason" in choice + and choice["finish_reason"] is not None + ): + finish_reasons.append(str(choice["finish_reason"])) + if finish_reasons: + span.set_attribute( + GEN_AI_RESPONSE_FINISH_REASONS, + ", ".join(finish_reasons), + ) + if ( + "service_tier" in outputs + and outputs["service_tier"] is not None + ): + span.set_attribute( + GEN_AI_RESPONSE_SERVICE_TIER, outputs["service_tier"] + ) + if ( + "system_fingerprint" in outputs + and outputs["system_fingerprint"] is not None + ): + span.set_attribute( + GEN_AI_RESPONSE_SYSTEM_FINGERPRINT, + outputs["system_fingerprint"], + ) + if "usage_metadata" in outputs and isinstance( + outputs["usage_metadata"], dict + ): + usage_metadata = outputs["usage_metadata"] + if ( + "input_token_details" in usage_metadata + and usage_metadata["input_token_details"] is not None + ): + input_token_details = str( + usage_metadata["input_token_details"] + ) + span.set_attribute( + GEN_AI_USAGE_INPUT_TOKEN_DETAILS, input_token_details + ) + if ( + "output_token_details" in usage_metadata + and usage_metadata["output_token_details"] is not None + ): + output_token_details = str( + usage_metadata["output_token_details"] + ) + span.set_attribute( + GEN_AI_USAGE_OUTPUT_TOKEN_DETAILS, output_token_details + ) + + span.set_attribute(GENAI_COMPLETION, op.outputs) + + except Exception: + logger.debug( + "Failed to process outputs for run %s", op.id, exc_info=True + ) + + def _as_utc_nano(self, timestamp: Optional[str]) -> Optional[int]: + if not timestamp: + return None + try: + dt = datetime.datetime.fromisoformat(timestamp) + return int(dt.astimezone(datetime.timezone.utc).timestamp() * 1_000_000_000) + except ValueError: + logger.exception(f"Failed to parse timestamp {timestamp}") + return None + + def get_unified_run_tokens( + self, outputs: Optional[dict] + ) -> Optional[Tuple[int, int]]: + if not outputs: + return None + + # search in non-generations lists + if output := self._extract_unified_run_tokens(outputs.get("usage_metadata")): + return output + + # find if direct kwarg in outputs + keys = outputs.keys() + for key in keys: + haystack = outputs[key] + if not haystack or not isinstance(haystack, dict): + continue + + if output := self._extract_unified_run_tokens( + haystack.get("usage_metadata") + ): + return output + + if ( + haystack.get("lc") == 1 + and "kwargs" in haystack + and isinstance(haystack["kwargs"], dict) + and ( + output := self._extract_unified_run_tokens( + haystack["kwargs"].get("usage_metadata") + ) + ) + ): + return output + + # find in generations + generations = outputs.get("generations") or [] + if not isinstance(generations, list): + return None + if generations and not isinstance(generations[0], list): + generations = [generations] + + for generation in [x for xs in generations for x in xs]: + if ( + isinstance(generation, dict) + and "message" in generation + and isinstance(generation["message"], dict) + and "kwargs" in generation["message"] + and isinstance(generation["message"]["kwargs"], dict) + and ( + output := self._extract_unified_run_tokens( + generation["message"]["kwargs"].get("usage_metadata") + ) + ) + ): + return output + return None + + def _extract_unified_run_tokens( + self, outputs: Optional[Any] + ) -> Optional[Tuple[int, int]]: + if not outputs or not isinstance(outputs, dict): + return None + + if "input_tokens" not in outputs or "output_tokens" not in outputs: + return None + + if not isinstance(outputs["input_tokens"], int) or not isinstance( + outputs["output_tokens"], int + ): + return None + + return outputs["input_tokens"], outputs["output_tokens"] diff --git a/python/langsmith/client.py b/python/langsmith/client.py index 1fa303b3fe..45348612c7 100644 --- a/python/langsmith/client.py +++ b/python/langsmith/client.py @@ -103,6 +103,22 @@ from langsmith._internal._serde import dumps_json as _dumps_json from langsmith.schemas import AttachmentInfo +HAS_OTEL = False +try: + if ls_utils.is_truish(ls_utils.get_env_var("OTEL_ENABLED")): + from opentelemetry import trace as otel_trace # type: ignore[import] + + from langsmith._internal.otel._otel_client import ( + get_otlp_tracer_provider, + ) + from langsmith._internal.otel._otel_exporter import OTELExporter + + HAS_OTEL = True +except ImportError: + raise ImportError( + "To use OTEL tracing, you must install it with `pip install langsmith[otel]`" + ) + try: from zoneinfo import ZoneInfo # type: ignore[import-not-found] except ImportError: @@ -111,6 +127,14 @@ class ZoneInfo: # type: ignore[no-redef] """Introduced in python 3.9.""" +try: + from opentelemetry.sdk.trace import TracerProvider # type: ignore[import-not-found] +except ImportError: + + class TracerProvider: # type: ignore[no-redef] + """Used for optional OTEL tracing.""" + + if TYPE_CHECKING: import pandas as pd # type: ignore from langchain_core.runnables import Runnable @@ -403,6 +427,7 @@ class Client: "compressed_traces", "_data_available_event", "_futures", + "otel_exporter", ] def __init__( @@ -420,6 +445,7 @@ def __init__( hide_outputs: Optional[Union[Callable[[dict], dict], bool]] = None, info: Optional[Union[dict, ls_schemas.LangSmithInfo]] = None, api_urls: Optional[Dict[str, str]] = None, + otel_tracer_provider: Optional[TracerProvider] = None, tracing_sampling_rate: Optional[float] = None, ) -> None: """Initialize a Client instance. @@ -452,6 +478,8 @@ def __init__( URL in the dictionary. However, ONLY Runs are written (POST and PATCH) to all URLs in the dictionary. Feedback, sessions, datasets, examples, annotation queues and evaluation results are only written to the first. + otel_tracer_provider (Optional[TracerProvider]): Optional tracer provider for OpenTelemetry integration. + If not provided, a LangSmith-specific tracer provider will be used. tracing_sampling_rate (Optional[float]): The sampling rate for tracing. If provided, overrides the LANGCHAIN_TRACING_SAMPLING_RATE environment variable. Should be a float between 0 and 1, where 1 means trace everything @@ -508,6 +536,8 @@ def __init__( self.compressed_traces: Optional[CompressedTraces] = None self._data_available_event: Optional[threading.Event] = None self._futures: Optional[set[cf.Future]] = None + self.otel_exporter: Optional[OTELExporter] = None + # Initialize auto batching if auto_batch_tracing: self.tracing_queue: Optional[PriorityQueue] = PriorityQueue() @@ -587,6 +617,19 @@ def __init__( self._manual_cleanup = False + if ls_utils.is_truish(ls_utils.get_env_var("OTEL_ENABLED")): + if not HAS_OTEL: + warnings.warn( + "LANGSMITH_OTEL_ENABLED is set but OpenTelemetry packages are not installed. " + "Install with `pip install langsmith[otel]`" + ) + if otel_tracer_provider is None: + otel_tracer_provider = get_otlp_tracer_provider() + # Set as global tracer provider if we're creating a new one + otel_trace.set_tracer_provider(otel_tracer_provider) + + self.otel_exporter = OTELExporter(tracer_provider=otel_tracer_provider) + def _repr_html_(self) -> str: """Return an HTML representation of the instance with a link to the URL. @@ -5603,6 +5646,7 @@ def create_feedback( self.tracing_queue is not None or self.compressed_traces is not None ) and feedback.trace_id is not None + and self.otel_exporter is None ): serialized_op = serialize_feedback_dict(feedback) if self.compressed_traces is not None: diff --git a/python/langsmith/utils.py b/python/langsmith/utils.py index 7fdf7f5b06..04323dd1e7 100644 --- a/python/langsmith/utils.py +++ b/python/langsmith/utils.py @@ -811,4 +811,6 @@ def is_truish(val: Any) -> bool: Returns: bool: True if the value is truish, False otherwise. """ - return val is True or val == "true" or val == "True" or val == "TRUE" or val == "1" + if isinstance(val, str): + return val.lower() == "true" or val == "1" + return bool(val) diff --git a/python/poetry.lock b/python/poetry.lock index fe9619b2d2..081aaf7271 100644 --- a/python/poetry.lock +++ b/python/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.0.1 and should not be changed by hand. [[package]] name = "annotated-types" @@ -6,6 +6,7 @@ version = "0.7.0" description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" +groups = ["main", "dev", "lint", "test"] files = [ {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, @@ -17,6 +18,7 @@ version = "0.45.2" description = "The official Python library for the anthropic API" optional = false python-versions = ">=3.8" +groups = ["test"] files = [ {file = "anthropic-0.45.2-py3-none-any.whl", hash = "sha256:ecd746f7274451dfcb7e1180571ead624c7e1195d1d46cb7c70143d2aedb4d35"}, {file = "anthropic-0.45.2.tar.gz", hash = "sha256:32a18b9ecd12c91b2be4cae6ca2ab46a06937b5aa01b21308d97a6d29794fb5e"}, @@ -41,6 +43,7 @@ version = "4.8.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" +groups = ["main", "dev", "lint", "test"] files = [ {file = "anyio-4.8.0-py3-none-any.whl", hash = "sha256:b5011f270ab5eb0abf13385f851315585cc37ef330dd88e27ec3d34d651fd47a"}, {file = "anyio-4.8.0.tar.gz", hash = "sha256:1d9fe889df5212298c0c0723fa20479d1b94883a2df44bd3897aa91083316f7a"}, @@ -63,6 +66,7 @@ version = "25.3.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3"}, {file = "attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b"}, @@ -82,6 +86,7 @@ version = "24.10.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "black-24.10.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e6668650ea4b685440857138e5fe40cde4d652633b1bdffc62933d0db4ed9812"}, {file = "black-24.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1c536fcf674217e87b8cc3657b81809d3c085d7bf3ef262ead700da345bfa6ea"}, @@ -128,6 +133,7 @@ version = "2025.1.31" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" +groups = ["main", "dev", "lint", "test"] files = [ {file = "certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe"}, {file = "certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651"}, @@ -139,6 +145,8 @@ version = "1.17.1" description = "Foreign Function Interface for Python calling C code." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "platform_python_implementation == \"PyPy\"" files = [ {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, @@ -218,6 +226,7 @@ version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, @@ -319,6 +328,7 @@ version = "8.1.8" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, @@ -333,10 +343,12 @@ version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["main", "dev", "lint", "test"] files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +markers = {main = "sys_platform == \"win32\" or extra == \"openai-agents\" or platform_system == \"Windows\"", dev = "sys_platform == \"win32\" or platform_system == \"Windows\"", lint = "platform_system == \"Windows\"", test = "sys_platform == \"win32\""} [[package]] name = "coverage" @@ -344,6 +356,7 @@ version = "7.6.12" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "coverage-7.6.12-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:704c8c8c6ce6569286ae9622e534b4f5b9759b6f2cd643f1c1a61f666d534fe8"}, {file = "coverage-7.6.12-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ad7525bf0241e5502168ae9c643a2f6c219fa0a283001cee4cf23a9b7da75879"}, @@ -422,6 +435,7 @@ version = "0.6.7" description = "Easily serialize dataclasses to and from JSON." optional = false python-versions = "<4.0,>=3.7" +groups = ["dev"] files = [ {file = "dataclasses_json-0.6.7-py3-none-any.whl", hash = "sha256:0dbf33f26c8d5305befd61b39d2b3414e8a407bedc2834dea9b8d642666fb40a"}, {file = "dataclasses_json-0.6.7.tar.gz", hash = "sha256:b6b3e528266ea45b9535223bc53ca645f5208833c29229e847b3f26a1cc55fc0"}, @@ -431,12 +445,32 @@ files = [ marshmallow = ">=3.18.0,<4.0.0" typing-inspect = ">=0.4.0,<1" +[[package]] +name = "deprecated" +version = "1.2.18" +description = "Python @deprecated decorator to deprecate old python classes, functions or methods." +optional = true +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" +groups = ["main"] +markers = "extra == \"otel\"" +files = [ + {file = "Deprecated-1.2.18-py2.py3-none-any.whl", hash = "sha256:bd5011788200372a32418f888e326a09ff80d0214bd961147cfed01b5c018eec"}, + {file = "deprecated-1.2.18.tar.gz", hash = "sha256:422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d"}, +] + +[package.dependencies] +wrapt = ">=1.10,<2" + +[package.extras] +dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "setuptools", "tox"] + [[package]] name = "distro" version = "1.9.0" description = "Distro - an OS platform information API" optional = false python-versions = ">=3.6" +groups = ["main", "lint", "test"] files = [ {file = "distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2"}, {file = "distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"}, @@ -448,6 +482,8 @@ version = "1.2.2" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" +groups = ["main", "dev", "lint", "test"] +markers = "python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, @@ -462,6 +498,7 @@ version = "2.1.1" description = "execnet: rapid multi-Python deployment" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "execnet-2.1.1-py3-none-any.whl", hash = "sha256:26dee51f1b80cebd6d0ca8e74dd8745419761d3bef34163928cbebbdc4749fdc"}, {file = "execnet-2.1.1.tar.gz", hash = "sha256:5189b52c6121c24feae288166ab41b32549c7e2348652736540b9e6e7d4e72e3"}, @@ -476,6 +513,7 @@ version = "0.115.11" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "fastapi-0.115.11-py3-none-any.whl", hash = "sha256:32e1541b7b74602e4ef4a0260ecaf3aadf9d4f19590bba3e1bf2ac4666aa2c64"}, {file = "fastapi-0.115.11.tar.gz", hash = "sha256:cc81f03f688678b92600a65a5e618b93592c65005db37157147204d8924bf94f"}, @@ -496,6 +534,7 @@ version = "1.5.1" description = "Let your Python tests travel through time" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "freezegun-1.5.1-py3-none-any.whl", hash = "sha256:bf111d7138a8abe55ab48a71755673dbaa4ab87f4cff5634a4442dfec34c15f1"}, {file = "freezegun-1.5.1.tar.gz", hash = "sha256:b29dedfcda6d5e8e083ce71b2b542753ad48cfec44037b3fc79702e2980a89e9"}, @@ -504,12 +543,33 @@ files = [ [package.dependencies] python-dateutil = ">=2.7" +[[package]] +name = "googleapis-common-protos" +version = "1.69.2" +description = "Common protobufs used in Google APIs" +optional = true +python-versions = ">=3.7" +groups = ["main"] +markers = "extra == \"otel\"" +files = [ + {file = "googleapis_common_protos-1.69.2-py3-none-any.whl", hash = "sha256:0b30452ff9c7a27d80bfc5718954063e8ab53dd3697093d3bc99581f5fd24212"}, + {file = "googleapis_common_protos-1.69.2.tar.gz", hash = "sha256:3e1b904a27a33c821b4b749fd31d334c0c9c30e6113023d495e48979a3dc9c5f"}, +] + +[package.dependencies] +protobuf = ">=3.20.2,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<7.0.0" + +[package.extras] +grpc = ["grpcio (>=1.44.0,<2.0.0)"] + [[package]] name = "griffe" version = "1.6.0" description = "Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API." optional = true python-versions = ">=3.9" +groups = ["main"] +markers = "extra == \"openai-agents\"" files = [ {file = "griffe-1.6.0-py3-none-any.whl", hash = "sha256:9f1dfe035d4715a244ed2050dfbceb05b1f470809ed4f6bb10ece5a7302f8dd1"}, {file = "griffe-1.6.0.tar.gz", hash = "sha256:eb5758088b9c73ad61c7ac014f3cdfb4c57b5c2fcbfca69996584b702aefa354"}, @@ -524,6 +584,7 @@ version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false python-versions = ">=3.7" +groups = ["main", "dev", "lint", "test"] files = [ {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, @@ -535,6 +596,7 @@ version = "1.0.7" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" +groups = ["main", "dev", "lint", "test"] files = [ {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"}, {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"}, @@ -556,6 +618,7 @@ version = "0.27.2" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" +groups = ["main", "dev", "lint", "test"] files = [ {file = "httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0"}, {file = "httpx-0.27.2.tar.gz", hash = "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2"}, @@ -581,6 +644,7 @@ version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.6" +groups = ["main", "dev", "lint", "test"] files = [ {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, @@ -589,12 +653,38 @@ files = [ [package.extras] all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] +[[package]] +name = "importlib-metadata" +version = "8.6.1" +description = "Read metadata from Python packages" +optional = true +python-versions = ">=3.9" +groups = ["main"] +markers = "extra == \"otel\"" +files = [ + {file = "importlib_metadata-8.6.1-py3-none-any.whl", hash = "sha256:02a89390c1e15fdfdc0d7c6b25cb3e62650d0494005c97d6f148bf5b9787525e"}, + {file = "importlib_metadata-8.6.1.tar.gz", hash = "sha256:310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580"}, +] + +[package.dependencies] +zipp = ">=3.20" + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +perf = ["ipython"] +test = ["flufl.flake8", "importlib_resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] +type = ["pytest-mypy"] + [[package]] name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.7" +groups = ["main", "dev", "test"] files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, @@ -606,6 +696,7 @@ version = "0.9.0" description = "Fast iterable JSON parser." optional = false python-versions = ">=3.8" +groups = ["main", "lint", "test"] files = [ {file = "jiter-0.9.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:816ec9b60fdfd1fec87da1d7ed46c66c44ffec37ab2ef7de5b147b2fce3fd5ad"}, {file = "jiter-0.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9b1d3086f8a3ee0194ecf2008cf81286a5c3e540d977fa038ff23576c023c0ea"}, @@ -691,6 +782,8 @@ version = "0.1.0rc5" description = "" optional = true python-versions = ">=3.9" +groups = ["main"] +markers = "extra == \"langsmith-pyo3\"" files = [ {file = "langsmith_pyo3-0.1.0rc5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:670e5707f09e756e3b71f12a46f546826893158c2dde3250e212234e15ac8c70"}, {file = "langsmith_pyo3-0.1.0rc5-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:e0d2261c3f9ba07594c7450187604c4c4b1e10e3b3f4a4eb39587a495d6945e3"}, @@ -730,6 +823,8 @@ version = "3.0.0" description = "Python port of markdown-it. Markdown parsing, done right!" optional = true python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"pytest\"" files = [ {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, @@ -754,6 +849,7 @@ version = "3.26.1" description = "A lightweight library for converting complex datatypes to and from native Python datatypes." optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "marshmallow-3.26.1-py3-none-any.whl", hash = "sha256:3350409f20a70a7e4e11a27661187b77cdcaeb20abca41c1454fe33636bea09c"}, {file = "marshmallow-3.26.1.tar.gz", hash = "sha256:e6d8affb6cb61d39d26402096dc0aee12d5a26d490a121f118d2e81dc0719dc6"}, @@ -773,6 +869,8 @@ version = "0.1.2" description = "Markdown URL utilities" optional = true python-versions = ">=3.7" +groups = ["main"] +markers = "extra == \"pytest\"" files = [ {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, @@ -784,6 +882,7 @@ version = "6.1.0" description = "multidict implementation" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "multidict-6.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3380252550e372e8511d49481bd836264c009adb826b23fefcc5dd3c69692f60"}, {file = "multidict-6.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:99f826cbf970077383d7de805c0681799491cb939c25450b9b5b3ced03ca99f1"}, @@ -888,6 +987,7 @@ version = "1.2.1" description = "Parser for multipart/form-data" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "multipart-1.2.1-py3-none-any.whl", hash = "sha256:c03dc203bc2e67f6b46a599467ae0d87cf71d7530504b2c1ff4a9ea21d8b8c8c"}, {file = "multipart-1.2.1.tar.gz", hash = "sha256:829b909b67bc1ad1c6d4488fcdc6391c2847842b08323addf5200db88dbe9480"}, @@ -903,6 +1003,7 @@ version = "1.15.0" description = "Optional static typing for Python" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "mypy-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:979e4e1a006511dacf628e36fadfecbcc0160a8af6ca7dad2f5025529e082c13"}, {file = "mypy-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c4bb0e1bd29f7d34efcccd71cf733580191e9a264a2202b0239da95984c5b559"}, @@ -956,6 +1057,7 @@ version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, @@ -967,6 +1069,7 @@ version = "2.0.2" description = "Fundamental package for array computing in Python" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "numpy-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:51129a29dbe56f9ca83438b706e2e69a39892b5eda6cedcb6b0c9fdc9b0d3ece"}, {file = "numpy-2.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f15975dfec0cf2239224d80e32c3170b1d168335eaedee69da84fbe9f1f9cd04"}, @@ -1021,6 +1124,7 @@ version = "1.66.3" description = "The official Python library for the openai API" optional = false python-versions = ">=3.8" +groups = ["main", "lint"] files = [ {file = "openai-1.66.3-py3-none-any.whl", hash = "sha256:a427c920f727711877ab17c11b95f1230b27767ba7a01e5b66102945141ceca9"}, {file = "openai-1.66.3.tar.gz", hash = "sha256:8dde3aebe2d081258d4159c4cb27bdc13b5bb3f7ea2201d9bd940b9a89faf0c9"}, @@ -1046,6 +1150,8 @@ version = "0.0.3" description = "OpenAI Agents SDK" optional = true python-versions = ">=3.9" +groups = ["main"] +markers = "extra == \"openai-agents\"" files = [ {file = "openai_agents-0.0.3-py3-none-any.whl", hash = "sha256:74ac0004e1f95d383863a41ab819cfb4bca9939c67ed74b26a1265a173bfdeb4"}, {file = "openai_agents-0.0.3.tar.gz", hash = "sha256:f0958b94e775aa3b50c00309896fb1a009823c785bc9a6d0a0b853149f5b5ce6"}, @@ -1059,12 +1165,120 @@ requests = ">=2.0,<3" types-requests = ">=2.0,<3" typing-extensions = ">=4.12.2,<5" +[[package]] +name = "opentelemetry-api" +version = "1.31.0" +description = "OpenTelemetry Python API" +optional = true +python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"otel\"" +files = [ + {file = "opentelemetry_api-1.31.0-py3-none-any.whl", hash = "sha256:145b72c6c16977c005c568ec32f4946054ab793d8474a17fd884b0397582c5f2"}, + {file = "opentelemetry_api-1.31.0.tar.gz", hash = "sha256:d8da59e83e8e3993b4726e4c1023cd46f57c4d5a73142e239247e7d814309de1"}, +] + +[package.dependencies] +deprecated = ">=1.2.6" +importlib-metadata = ">=6.0,<8.7.0" + +[[package]] +name = "opentelemetry-exporter-otlp-proto-common" +version = "1.31.0" +description = "OpenTelemetry Protobuf encoding" +optional = true +python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"otel\"" +files = [ + {file = "opentelemetry_exporter_otlp_proto_common-1.31.0-py3-none-any.whl", hash = "sha256:42b402f2340c0612907799d91d13b928314f06c57c362dfa0c074e20b673f43d"}, + {file = "opentelemetry_exporter_otlp_proto_common-1.31.0.tar.gz", hash = "sha256:e7fa0fe8cf2f87c190a59d820b6ba0821234178bc1227b5bd40ca057622d4ddc"}, +] + +[package.dependencies] +opentelemetry-proto = "1.31.0" + +[[package]] +name = "opentelemetry-exporter-otlp-proto-http" +version = "1.31.0" +description = "OpenTelemetry Collector Protobuf over HTTP Exporter" +optional = true +python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"otel\"" +files = [ + {file = "opentelemetry_exporter_otlp_proto_http-1.31.0-py3-none-any.whl", hash = "sha256:d9f00fd0684324e8c2dc13cd9580f94d85b6e10040c5f89a533f611c7583f910"}, + {file = "opentelemetry_exporter_otlp_proto_http-1.31.0.tar.gz", hash = "sha256:09cbe2f96a1996cae94a426fbc59cc2f5bbe9a246233f15832d295e750b407de"}, +] + +[package.dependencies] +deprecated = ">=1.2.6" +googleapis-common-protos = ">=1.52,<2.0" +opentelemetry-api = ">=1.15,<2.0" +opentelemetry-exporter-otlp-proto-common = "1.31.0" +opentelemetry-proto = "1.31.0" +opentelemetry-sdk = ">=1.31.0,<1.32.0" +requests = ">=2.7,<3.0" + +[[package]] +name = "opentelemetry-proto" +version = "1.31.0" +description = "OpenTelemetry Python Proto" +optional = true +python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"otel\"" +files = [ + {file = "opentelemetry_proto-1.31.0-py3-none-any.whl", hash = "sha256:ad4ded738e3d48d3280b37984eae75e63be01d8a0b04c83c743714aba960670d"}, + {file = "opentelemetry_proto-1.31.0.tar.gz", hash = "sha256:5efe313788a8f4b739a94beb207749587a449a5e90c68b0b6a931567e8ca721d"}, +] + +[package.dependencies] +protobuf = ">=5.0,<6.0" + +[[package]] +name = "opentelemetry-sdk" +version = "1.31.0" +description = "OpenTelemetry Python SDK" +optional = true +python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"otel\"" +files = [ + {file = "opentelemetry_sdk-1.31.0-py3-none-any.whl", hash = "sha256:97c9a03865e69723725fb64fe04343a488c3e61e684eb804bd7d6da2215dfc60"}, + {file = "opentelemetry_sdk-1.31.0.tar.gz", hash = "sha256:452d7d5b3c1db2e5e4cb64abede0ddd20690cb244a559c73a59652fdf6726070"}, +] + +[package.dependencies] +opentelemetry-api = "1.31.0" +opentelemetry-semantic-conventions = "0.52b0" +typing-extensions = ">=3.7.4" + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.52b0" +description = "OpenTelemetry Semantic Conventions" +optional = true +python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"otel\"" +files = [ + {file = "opentelemetry_semantic_conventions-0.52b0-py3-none-any.whl", hash = "sha256:4d843652ae1f9f3c0d4d8df0bfef740627c90495ac043fc33f0a04bad3b606e2"}, + {file = "opentelemetry_semantic_conventions-0.52b0.tar.gz", hash = "sha256:f8bc8873a69d0a2f45746c31980baad2bb10ccee16b1816497ccf99417770386"}, +] + +[package.dependencies] +deprecated = ">=1.2.6" +opentelemetry-api = "1.31.0" + [[package]] name = "orjson" version = "3.10.15" description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "platform_python_implementation != \"PyPy\"" files = [ {file = "orjson-3.10.15-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:552c883d03ad185f720d0c09583ebde257e41b9521b74ff40e08b7dec4559c04"}, {file = "orjson-3.10.15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:616e3e8d438d02e4854f70bfdc03a6bcdb697358dbaa6bcd19cbe24d24ece1f8"}, @@ -1153,6 +1367,7 @@ version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" +groups = ["main", "dev", "test"] files = [ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, @@ -1164,6 +1379,7 @@ version = "2.2.2.240807" description = "Type annotations for pandas" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "pandas_stubs-2.2.2.240807-py3-none-any.whl", hash = "sha256:893919ad82be4275f0d07bb47a95d08bae580d3fdea308a7acfcb3f02e76186e"}, {file = "pandas_stubs-2.2.2.240807.tar.gz", hash = "sha256:64a559725a57a449f46225fbafc422520b7410bff9252b661a225b5559192a93"}, @@ -1179,6 +1395,7 @@ version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, @@ -1190,6 +1407,7 @@ version = "4.3.6" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, @@ -1206,6 +1424,7 @@ version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" +groups = ["main", "dev", "test"] files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -1221,6 +1440,7 @@ version = "0.3.0" description = "Accelerated property cache" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "propcache-0.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:efa44f64c37cc30c9f05932c740a8b40ce359f51882c70883cc95feac842da4d"}, {file = "propcache-0.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2383a17385d9800b6eb5855c2f05ee550f803878f344f58b6e194de08b96352c"}, @@ -1322,12 +1542,35 @@ files = [ {file = "propcache-0.3.0.tar.gz", hash = "sha256:a8fd93de4e1d278046345f49e2238cdb298589325849b2645d4a94c53faeffc5"}, ] +[[package]] +name = "protobuf" +version = "5.29.3" +description = "" +optional = true +python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"otel\"" +files = [ + {file = "protobuf-5.29.3-cp310-abi3-win32.whl", hash = "sha256:3ea51771449e1035f26069c4c7fd51fba990d07bc55ba80701c78f886bf9c888"}, + {file = "protobuf-5.29.3-cp310-abi3-win_amd64.whl", hash = "sha256:a4fa6f80816a9a0678429e84973f2f98cbc218cca434abe8db2ad0bffc98503a"}, + {file = "protobuf-5.29.3-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:a8434404bbf139aa9e1300dbf989667a83d42ddda9153d8ab76e0d5dcaca484e"}, + {file = "protobuf-5.29.3-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:daaf63f70f25e8689c072cfad4334ca0ac1d1e05a92fc15c54eb9cf23c3efd84"}, + {file = "protobuf-5.29.3-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:c027e08a08be10b67c06bf2370b99c811c466398c357e615ca88c91c07f0910f"}, + {file = "protobuf-5.29.3-cp38-cp38-win32.whl", hash = "sha256:84a57163a0ccef3f96e4b6a20516cedcf5bb3a95a657131c5c3ac62200d23252"}, + {file = "protobuf-5.29.3-cp38-cp38-win_amd64.whl", hash = "sha256:b89c115d877892a512f79a8114564fb435943b59067615894c3b13cd3e1fa107"}, + {file = "protobuf-5.29.3-cp39-cp39-win32.whl", hash = "sha256:0eb32bfa5219fc8d4111803e9a690658aa2e6366384fd0851064b963b6d1f2a7"}, + {file = "protobuf-5.29.3-cp39-cp39-win_amd64.whl", hash = "sha256:6ce8cc3389a20693bfde6c6562e03474c40851b44975c9b2bf6df7d8c4f864da"}, + {file = "protobuf-5.29.3-py3-none-any.whl", hash = "sha256:0a18ed4a24198528f2333802eb075e59dea9d679ab7a6c5efb017a59004d849f"}, + {file = "protobuf-5.29.3.tar.gz", hash = "sha256:5da0f41edaf117bde316404bad1a486cb4ededf8e4a54891296f648e8e076620"}, +] + [[package]] name = "psutil" version = "5.9.8" description = "Cross-platform lib for process and system monitoring in Python." optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +groups = ["dev"] files = [ {file = "psutil-5.9.8-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:26bd09967ae00920df88e0352a91cff1a78f8d69b3ecabbfe733610c0af486c8"}, {file = "psutil-5.9.8-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:05806de88103b25903dff19bb6692bd2e714ccf9e668d050d144012055cbca73"}, @@ -1356,6 +1599,7 @@ version = "0.3.14" description = "Sampling profiler for Python programs" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "py_spy-0.3.14-py2.py3-none-macosx_10_7_x86_64.whl", hash = "sha256:5b342cc5feb8d160d57a7ff308de153f6be68dcf506ad02b4d67065f2bae7f45"}, {file = "py_spy-0.3.14-py2.py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:fe7efe6c91f723442259d428bf1f9ddb9c1679828866b353d539345ca40d9dd2"}, @@ -1372,6 +1616,8 @@ version = "2.22" description = "C parser in Python" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "platform_python_implementation == \"PyPy\"" files = [ {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, @@ -1383,6 +1629,7 @@ version = "2.10.6" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" +groups = ["main", "dev", "lint", "test"] files = [ {file = "pydantic-2.10.6-py3-none-any.whl", hash = "sha256:427d664bf0b8a2b34ff5dd0f5a18df00591adcee7198fbd71981054cef37b584"}, {file = "pydantic-2.10.6.tar.gz", hash = "sha256:ca5daa827cce33de7a42be142548b0096bf05a7e7b365aebfa5f8eeec7128236"}, @@ -1403,6 +1650,7 @@ version = "2.27.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" +groups = ["main", "dev", "lint", "test"] files = [ {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"}, {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"}, @@ -1515,6 +1763,8 @@ version = "2.19.1" description = "Pygments is a syntax highlighting package written in Python." optional = true python-versions = ">=3.8" +groups = ["main"] +markers = "extra == \"pytest\"" files = [ {file = "pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c"}, {file = "pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f"}, @@ -1529,6 +1779,7 @@ version = "2.9.0" description = "Python module to run and analyze benchmarks" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "pyperf-2.9.0-py3-none-any.whl", hash = "sha256:215673fb60f3fbbc6c7a90b609b0806d8466fded8dd502bf5731e2b92506076e"}, {file = "pyperf-2.9.0.tar.gz", hash = "sha256:dbe0feef8ec1a465df191bba2576149762d15a8c9985c9fea93ab625d875c362"}, @@ -1546,6 +1797,7 @@ version = "7.4.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.7" +groups = ["main", "dev", "test"] files = [ {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, @@ -1568,6 +1820,7 @@ version = "0.21.2" description = "Pytest support for asyncio" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pytest_asyncio-0.21.2-py3-none-any.whl", hash = "sha256:ab664c88bb7998f711d8039cacd4884da6430886ae8bbd4eded552ed2004f16b"}, {file = "pytest_asyncio-0.21.2.tar.gz", hash = "sha256:d67738fc232b94b326b9d060750beb16e0074210b98dd8b58a5239fa2a154f45"}, @@ -1586,6 +1839,7 @@ version = "4.1.0" description = "Pytest plugin for measuring coverage." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"}, {file = "pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"}, @@ -1604,6 +1858,7 @@ version = "14.0" description = "pytest plugin to re-run tests to eliminate flaky failures" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pytest-rerunfailures-14.0.tar.gz", hash = "sha256:4a400bcbcd3c7a4ad151ab8afac123d90eca3abe27f98725dc4d9702887d2e92"}, {file = "pytest_rerunfailures-14.0-py3-none-any.whl", hash = "sha256:4197bdd2eaeffdbf50b5ea6e7236f47ff0e44d1def8dae08e409f536d84e7b32"}, @@ -1619,6 +1874,7 @@ version = "0.7.0" description = "Pytest Plugin to disable socket calls during tests" optional = false python-versions = ">=3.8,<4.0" +groups = ["dev", "test"] files = [ {file = "pytest_socket-0.7.0-py3-none-any.whl", hash = "sha256:7e0f4642177d55d317bbd58fc68c6bd9048d6eadb2d46a89307fa9221336ce45"}, {file = "pytest_socket-0.7.0.tar.gz", hash = "sha256:71ab048cbbcb085c15a4423b73b619a8b35d6a307f46f78ea46be51b1b7e11b3"}, @@ -1633,6 +1889,7 @@ version = "0.11.0" description = "unittest subTest() support and subtests fixture" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pytest-subtests-0.11.0.tar.gz", hash = "sha256:51865c88457545f51fb72011942f0a3c6901ee9e24cbfb6d1b9dc1348bafbe37"}, {file = "pytest_subtests-0.11.0-py3-none-any.whl", hash = "sha256:453389984952eec85ab0ce0c4f026337153df79587048271c7fd0f49119c07e4"}, @@ -1648,6 +1905,7 @@ version = "0.3.5" description = "Automatically rerun your tests on file modifications" optional = false python-versions = ">=3.7.0,<4.0.0" +groups = ["dev"] files = [ {file = "pytest_watcher-0.3.5-py3-none-any.whl", hash = "sha256:af00ca52c7be22dc34c0fd3d7ffef99057207a73b05dc5161fe3b2fe91f58130"}, {file = "pytest_watcher-0.3.5.tar.gz", hash = "sha256:8896152460ba2b1a8200c12117c6611008ec96c8b2d811f0a05ab8a82b043ff8"}, @@ -1663,6 +1921,7 @@ version = "3.6.1" description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pytest_xdist-3.6.1-py3-none-any.whl", hash = "sha256:9ed4adfb68a016610848639bb7e02c9352d5d9f03d04809919e2dafc3be4cca7"}, {file = "pytest_xdist-3.6.1.tar.gz", hash = "sha256:ead156a4db231eec769737f57668ef58a2084a34b2e55c4a8fa20d861107300d"}, @@ -1683,6 +1942,7 @@ version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +groups = ["dev"] files = [ {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, @@ -1697,6 +1957,7 @@ version = "6.0.2" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, @@ -1759,6 +2020,7 @@ version = "2.32.3" description = "Python HTTP for Humans." optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, @@ -1780,6 +2042,7 @@ version = "1.0.0" description = "A utility belt for advanced users of python-requests" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +groups = ["main"] files = [ {file = "requests-toolbelt-1.0.0.tar.gz", hash = "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6"}, {file = "requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06"}, @@ -1794,6 +2057,8 @@ version = "13.9.4" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = true python-versions = ">=3.8.0" +groups = ["main"] +markers = "extra == \"pytest\"" files = [ {file = "rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90"}, {file = "rich-13.9.4.tar.gz", hash = "sha256:439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098"}, @@ -1813,6 +2078,7 @@ version = "0.6.9" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "ruff-0.6.9-py3-none-linux_armv6l.whl", hash = "sha256:064df58d84ccc0ac0fcd63bc3090b251d90e2a372558c0f057c3f75ed73e1ccd"}, {file = "ruff-0.6.9-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:140d4b5c9f5fc7a7b074908a78ab8d384dd7f6510402267bc76c37195c02a7ec"}, @@ -1840,6 +2106,7 @@ version = "1.17.0" description = "Python 2 and 3 compatibility utilities" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +groups = ["dev"] files = [ {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, @@ -1851,6 +2118,7 @@ version = "1.3.1" description = "Sniff out which async library your code is running under" optional = false python-versions = ">=3.7" +groups = ["main", "dev", "lint", "test"] files = [ {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, @@ -1862,6 +2130,7 @@ version = "0.46.1" description = "The little ASGI library that shines." optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "starlette-0.46.1-py3-none-any.whl", hash = "sha256:77c74ed9d2720138b25875133f3a2dae6d854af2ec37dceb56aef370c1d8a227"}, {file = "starlette-0.46.1.tar.gz", hash = "sha256:3c88d58ee4bd1bb807c0d1acb381838afc7752f9ddaec81bbe4383611d833230"}, @@ -1880,6 +2149,7 @@ version = "2.2.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" +groups = ["main", "dev", "test"] files = [ {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, @@ -1914,6 +2184,7 @@ files = [ {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, ] +markers = {main = "python_version < \"3.11\"", dev = "python_full_version <= \"3.11.0a6\"", test = "python_version < \"3.11\""} [[package]] name = "tqdm" @@ -1921,6 +2192,7 @@ version = "4.67.1" description = "Fast, Extensible Progress Meter" optional = false python-versions = ">=3.7" +groups = ["main", "lint"] files = [ {file = "tqdm-4.67.1-py3-none-any.whl", hash = "sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2"}, {file = "tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2"}, @@ -1942,6 +2214,7 @@ version = "5.9.5.20240516" description = "Typing stubs for psutil" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "types-psutil-5.9.5.20240516.tar.gz", hash = "sha256:bb296f59fc56458891d0feb1994717e548a1bcf89936a2877df8792b822b4696"}, {file = "types_psutil-5.9.5.20240516-py3-none-any.whl", hash = "sha256:83146ded949a10167d9895e567b3b71e53ebc5e23fd8363eab62b3c76cce7b89"}, @@ -1953,6 +2226,7 @@ version = "2025.1.0.20250204" description = "Typing stubs for pytz" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "types_pytz-2025.1.0.20250204-py3-none-any.whl", hash = "sha256:32ca4a35430e8b94f6603b35beb7f56c32260ddddd4f4bb305fdf8f92358b87e"}, {file = "types_pytz-2025.1.0.20250204.tar.gz", hash = "sha256:00f750132769f1c65a4f7240bc84f13985b4da774bd17dfbe5d9cd442746bd49"}, @@ -1964,6 +2238,7 @@ version = "6.0.12.20241230" description = "Typing stubs for PyYAML" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "types_PyYAML-6.0.12.20241230-py3-none-any.whl", hash = "sha256:fa4d32565219b68e6dee5f67534c722e53c00d1cfc09c435ef04d7353e1e96e6"}, {file = "types_pyyaml-6.0.12.20241230.tar.gz", hash = "sha256:7f07622dbd34bb9c8b264fe860a17e0efcad00d50b5f27e93984909d9363498c"}, @@ -1975,6 +2250,8 @@ version = "2.31.0.6" description = "Typing stubs for requests" optional = false python-versions = ">=3.7" +groups = ["main", "dev"] +markers = "platform_python_implementation == \"PyPy\" or python_version < \"3.10\"" files = [ {file = "types-requests-2.31.0.6.tar.gz", hash = "sha256:cd74ce3b53c461f1228a9b783929ac73a666658f223e28ed29753771477b3bd0"}, {file = "types_requests-2.31.0.6-py3-none-any.whl", hash = "sha256:a2db9cb228a81da8348b49ad6db3f5519452dd20a9c1e1a868c83c5fe88fd1a9"}, @@ -1989,6 +2266,8 @@ version = "2.32.0.20250306" description = "Typing stubs for requests" optional = false python-versions = ">=3.9" +groups = ["main", "dev"] +markers = "platform_python_implementation != \"PyPy\" and python_version >= \"3.10\"" files = [ {file = "types_requests-2.32.0.20250306-py3-none-any.whl", hash = "sha256:25f2cbb5c8710b2022f8bbee7b2b66f319ef14aeea2f35d80f18c9dbf3b60a0b"}, {file = "types_requests-2.32.0.20250306.tar.gz", hash = "sha256:0962352694ec5b2f95fda877ee60a159abdf84a0fc6fdace599f20acb41a03d1"}, @@ -2003,6 +2282,7 @@ version = "4.67.0.20250301" description = "Typing stubs for tqdm" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "types_tqdm-4.67.0.20250301-py3-none-any.whl", hash = "sha256:8af97deb8e6874af833555dc1fe0fcd456b1a789470bf6cd8813d4e7ee4f6c5b"}, {file = "types_tqdm-4.67.0.20250301.tar.gz", hash = "sha256:5e89a38ad89b867823368eb97d9f90d2fc69806bb055dde62716a05da62b5e0d"}, @@ -2017,6 +2297,8 @@ version = "1.26.25.14" description = "Typing stubs for urllib3" optional = false python-versions = "*" +groups = ["main", "dev"] +markers = "platform_python_implementation == \"PyPy\" or python_version < \"3.10\"" files = [ {file = "types-urllib3-1.26.25.14.tar.gz", hash = "sha256:229b7f577c951b8c1b92c1bc2b2fdb0b49847bd2af6d1cc2a2e3dd340f3bda8f"}, {file = "types_urllib3-1.26.25.14-py3-none-any.whl", hash = "sha256:9683bbb7fb72e32bfe9d2be6e04875fbe1b3eeec3cbb4ea231435aa7fd6b4f0e"}, @@ -2028,6 +2310,7 @@ version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" +groups = ["main", "dev", "lint", "test"] files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, @@ -2039,6 +2322,7 @@ version = "0.9.0" description = "Runtime inspection utilities for typing module." optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "typing_inspect-0.9.0-py3-none-any.whl", hash = "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f"}, {file = "typing_inspect-0.9.0.tar.gz", hash = "sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78"}, @@ -2054,6 +2338,8 @@ version = "1.26.20" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" +groups = ["main", "dev"] +markers = "platform_python_implementation == \"PyPy\" or python_version < \"3.10\"" files = [ {file = "urllib3-1.26.20-py2.py3-none-any.whl", hash = "sha256:0ed14ccfbf1c30a9072c7ca157e4319b70d65f623e91e7b32fadb2853431016e"}, {file = "urllib3-1.26.20.tar.gz", hash = "sha256:40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32"}, @@ -2070,6 +2356,8 @@ version = "2.3.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.9" +groups = ["main", "dev"] +markers = "platform_python_implementation != \"PyPy\" and python_version >= \"3.10\"" files = [ {file = "urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"}, {file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"}, @@ -2087,6 +2375,7 @@ version = "0.29.0" description = "The lightning-fast ASGI server." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "uvicorn-0.29.0-py3-none-any.whl", hash = "sha256:2c2aac7ff4f4365c206fd773a39bf4ebd1047c238f8b8268ad996829323473de"}, {file = "uvicorn-0.29.0.tar.gz", hash = "sha256:6a69214c0b6a087462412670b3ef21224fa48cae0e452b5883e8e8bdfdd11dd0"}, @@ -2106,6 +2395,7 @@ version = "6.0.2" description = "Automatically mock your HTTP interactions to simplify and speed up testing" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "vcrpy-6.0.2-py2.py3-none-any.whl", hash = "sha256:40370223861181bc76a5e5d4b743a95058bb1ad516c3c08570316ab592f56cad"}, {file = "vcrpy-6.0.2.tar.gz", hash = "sha256:88e13d9111846745898411dbc74a75ce85870af96dd320d75f1ee33158addc09"}, @@ -2129,6 +2419,7 @@ version = "6.0.0" description = "Filesystem events monitoring" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "watchdog-6.0.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d1cdb490583ebd691c012b3d6dae011000fe42edb7a82ece80965b42abd61f26"}, {file = "watchdog-6.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bc64ab3bdb6a04d69d4023b29422170b74681784ffb9463ed4870cf2f3e66112"}, @@ -2171,6 +2462,7 @@ version = "1.17.2" description = "Module for decorators, wrappers and monkey patching." optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3d57c572081fed831ad2d26fd430d565b76aa277ed1d30ff4d40670b1c0dd984"}, {file = "wrapt-1.17.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b5e251054542ae57ac7f3fba5d10bfff615b6c2fb09abeb37d2f1463f841ae22"}, @@ -2252,6 +2544,7 @@ files = [ {file = "wrapt-1.17.2-py3-none-any.whl", hash = "sha256:b18f2d1533a71f069c7f82d524a52599053d4c7166e9dd374ae2136b7f40f7c8"}, {file = "wrapt-1.17.2.tar.gz", hash = "sha256:41388e9d4d1522446fe79d3213196bd9e3b301a336965b9e27ca2788ebd122f3"}, ] +markers = {main = "extra == \"otel\""} [[package]] name = "yarl" @@ -2259,6 +2552,7 @@ version = "1.18.3" description = "Yet another URL library" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7df647e8edd71f000a5208fe6ff8c382a1de8edfbccdbbfe649d263de07d8c34"}, {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c69697d3adff5aa4f874b19c0e4ed65180ceed6318ec856ebc423aa5850d84f7"}, @@ -2349,12 +2643,34 @@ idna = ">=2.0" multidict = ">=4.0" propcache = ">=0.2.0" +[[package]] +name = "zipp" +version = "3.21.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = true +python-versions = ">=3.9" +groups = ["main"] +markers = "extra == \"otel\"" +files = [ + {file = "zipp-3.21.0-py3-none-any.whl", hash = "sha256:ac1bbe05fd2991f160ebce24ffbac5f6d11d83dc90891255885223d42b3cd931"}, + {file = "zipp-3.21.0.tar.gz", hash = "sha256:2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4"}, +] + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +type = ["pytest-mypy"] + [[package]] name = "zstandard" version = "0.23.0" description = "Zstandard bindings for Python" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "zstandard-0.23.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bf0a05b6059c0528477fba9054d09179beb63744355cab9f38059548fedd46a9"}, {file = "zstandard-0.23.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fc9ca1c9718cb3b06634c7c8dec57d24e9438b2aa9a0f02b8bb36bf478538880"}, @@ -2464,10 +2780,11 @@ cffi = ["cffi (>=1.11)"] [extras] langsmith-pyo3 = ["langsmith-pyo3"] openai-agents = ["openai-agents"] +otel = ["opentelemetry-api", "opentelemetry-exporter-otlp-proto-http", "opentelemetry-sdk"] pytest = ["pytest", "rich"] vcr = [] [metadata] -lock-version = "2.0" +lock-version = "2.1" python-versions = ">=3.9,<4.0" -content-hash = "7043d21f2518e524327468b1d9b981a1c2adb1bef984d0f30765c3d5e3bfca33" +content-hash = "f6f556c69439df8ab51d65bb043da47e15ee6f8e4be88c5ab721f7c9b06db639" diff --git a/python/pyproject.toml b/python/pyproject.toml index 35953cbd38..615dd86329 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -41,6 +41,11 @@ packaging = ">=23.2" # Enabled via `openai-agents` extra: `pip install langsmith[openai-agents]` openai-agents = { version = "^0.0.3", optional = true } +# Enabled via `otel` extra: `pip install langsmith[otel]` +opentelemetry-sdk = {version = "^1.30.0", optional = true} +opentelemetry-api = {version = "^1.30.0", optional = true} +opentelemetry-exporter-otlp-proto-http = {version = "^1.30.0", optional = true} + [tool.poetry.group.dev.dependencies] pytest = "^7.3.1" black = ">=23.3,<25.0" @@ -82,6 +87,7 @@ anthropic = "^0.45.0" [tool.poetry.extras] vcr = ["vcrpy"] langsmith_pyo3 = ["langsmith-pyo3"] +otel = ["opentelemetry-api", "opentelemetry-sdk", "opentelemetry-exporter-otlp-proto-http"] pytest = ["pytest", "rich", "vcrpy"] openai-agents = ["openai-agents"]