OwlCyberSecurity - MANAGER
Edit File: huggingface_hub.cpython-312.pyc
� G��g� � �� � d dl mZ d dlmZ d dlmZ d dlmZ d dlm Z d dl mZmZm Z d dlZd dlmZ d d lmZmZ d d lmZmZ d dlZd dlmZmZ G d � de� Zd� Zd� Zy# e$ r ed� �w xY w)� ��wraps)�consts)�record_token_usage)�set_data_normalized)�SPANDATA)�Any�Iterable�CallableN)�should_send_default_pii)�DidNotEnable�Integration)�capture_internal_exceptions�event_from_exception)�ChatCompletionStreamOutput�TextGenerationOutputzHuggingface not installedc �2 � e Zd ZdZde� �Zdd�Zed� � Zy)�HuggingfaceHubIntegration�huggingface_hubzauto.ai.c � � || _ y �N)�include_prompts)�selfr s �V/opt/hc_python/lib/python3.12/site-packages/sentry_sdk/integrations/huggingface_hub.py�__init__z"HuggingfaceHubIntegration.__init__ s � �.��� c � � t t j j j j � t j j j _ y r )�_wrap_text_generationr � inference�_client�InferenceClient�text_generation� r r � setup_oncez$HuggingfaceHubIntegration.setup_once"