o
    i9                     @  s   d dl mZ d dlmZ d dlmZmZmZ d dl	m
Z
 d dlmZ ddlmZmZ ddlmZ g d	Zed
dG dd dZeeegedB f B Ze ZdS )    )annotations)Callable)	dataclassfieldsreplace)dedent)Self   )InlineDefsJsonSchemaTransformerJsonSchemaTransformer)StructuredOutputMode)ModelProfileModelProfileSpecDEFAULT_PROFILEr
   r   T)kw_onlyc                   @  s   e Zd ZU dZdZded< 	 dZded< 	 dZded< 	 dZded< 	 d	Z	d
ed< 	 e
dZded< 	 dZded< 	 dZded< 	 dZded< 	 edddZdddZdS )r   zDescribes how requests to and responses from specific models or families of models need to be constructed and processed to get the best results, independent of the model and provider classes used.Tboolsupports_toolsFsupports_json_schema_outputsupports_json_object_outputsupports_image_outputtoolr   default_structured_output_modez
        Always respond with a JSON object that's compatible with this schema:

        {schema}

        Don't include any text or Markdown fencing before or after.
        strprompted_output_templateNz"type[JsonSchemaTransformer] | Nonejson_schema_transformer)z<think>z</think>ztuple[str, str]thinking_tags"ignore_streamed_leading_whitespaceprofileModelProfile | Nonereturnr   c                 C  s   t || r|S |  |S )zDBuild a ModelProfile subclass instance from a ModelProfile instance.)
isinstanceupdate)clsr    r#   c/var/www/html/karishye-ai-python/venv/lib/python3.10/site-packages/pydantic_ai/profiles/__init__.pyfrom_profile<   s   
zModelProfile.from_profilec                   sF   s| S t dd t| D   fddtD }t| fi |S )zlUpdate this ModelProfile (subclass) instance with the non-default values from another ModelProfile instance.c                 s  s    | ]}|j V  qd S )N)name.0fr#   r#   r$   	<genexpr>G   s    z&ModelProfile.update.<locals>.<genexpr>c                   s8   i | ]}|j  v rt|j |jkr|j t|j qS r#   )r&   getattrdefaultr'   field_namesr   r#   r$   
<dictcomp>H   s
    z'ModelProfile.update.<locals>.<dictcomp>)setr   r   )selfr   non_default_attrsr#   r-   r$   r!   C   s   zModelProfile.update)r   r   r   r   )__name__
__module____qualname____doc__r   __annotations__r   r   r   r   r   r   r   r   r   classmethodr%   r!   r#   r#   r#   r$   r      s2   
 	r   N)
__future__r   _annotationscollections.abcr   dataclassesr   r   r   textwrapr   typing_extensionsr   _json_schemar
   r   outputr   __all__r   r   r   r   r#   r#   r#   r$   <module>   s    	:
