관리-도구
편집 파일: anthropic.cpython-38.pyc
U �Mg/% � @ s& d dl mZ d dlmZ d dlZd dlmZ d dlmZm Z d dl mZmZ d dl mZ d dlmZmZmZ z$d d lmZmZ er�d d lmZ W n ek r� ed��Y nX er�d dlmZmZmZ d d lmZ G dd� de�Zdd� Zdd� Z dd� Z!dd� Z"dd� Z#dd� Z$dd� Z%dd� Z&dS ) � ��wraps)� TYPE_CHECKINGN)�record_token_usage)�OP�SPANDATA)�DidNotEnable�Integration)�should_send_default_pii)�capture_internal_exceptions�event_from_exception�package_version)� AsyncMessages�Messages)�MessageStreamEventzAnthropic not installed)�Any� AsyncIterator�Iterator)�Spanc @ s0 e Zd ZdZde� �Zd dd�Zedd� �ZdS ) �AnthropicIntegration� anthropiczauto.ai.Tc C s || _ d S �N)�include_prompts)�selfr � r �O/opt/hc_python/lib/python3.8/site-packages/sentry_sdk/integrations/anthropic.py�__init__ s zAnthropicIntegration.__init__c C sD t d�} | d krtd��| dk r(td��ttj�t_ttj�t_d S )Nr zUnparsable anthropic version.)r � z!anthropic 0.16 or newer required.)r r �_wrap_message_creater �create�_wrap_message_create_asyncr )�versionr r r � setup_once$ s zAnthropicIntegration.setup_onceN)T)�__name__� __module__�__qualname__� identifier�originr �staticmethodr"