o
    ưi                     @   s   U d dl mZmZ erddlmZ d dlmZmZ d dlm	Z	 d dlm
Z
 ddlmZ dZee ed< d	ed
dfddZ					
	dddZe
jjeiZg dZdS )    )TYPE_CHECKINGOptional   )BitBucketPromptManager)PromptLiteLLMParams
PromptSpec)CustomPromptManagement)SupportedPromptIntegrationsNglobal_bitbucket_configconfigreturnc                 C   s   ddl }| |_dS )ar  
    Set the global BitBucket configuration for prompt management.

    Args:
        config: Dictionary containing BitBucket configuration
                - workspace: BitBucket workspace name
                - repository: Repository name
                - access_token: BitBucket access token
                - branch: Branch to fetch prompts from (default: main)
    r   N)litellmr
   )r   r    r   ^/home/app/Keep/.python/lib/python3.10/site-packages/litellm/integrations/bitbucket/__init__.pyset_global_bitbucket_config   s   
r   litellm_paramsr   prompt_specr   r   c              
   C   sT   t | dd}t | dd}|stdz	t||d}|W S  ty) } z|d}~ww )z:
    Initialize a prompt from a BitBucket repository.
    bitbucket_configN	prompt_idz=bitbucket_config is required for BitBucket prompt integration)r   r   )getattr
ValueErrorr   	Exception)r   r   r   r   bitbucket_prompt_managerer   r   r   prompt_initializer    s    r   )r   r   r
   )r   r   r   r   r   r   )typingr   r   r   r   Z"litellm.types.prompts.init_promptsr   r   Z-litellm.integrations.custom_prompt_managementr   r	   r
   dict__annotations__r   r   Z	BITBUCKETvalueZprompt_initializer_registry__all__r   r   r   r   <module>   s&    
