
    .h                        d dl mZ d dlZd dlmZmZmZ d dlmZmZ d dl	m
Z
mZmZ d dlmZ d dlmZ e G d d	                      ZdS )
    )annotationsN)	dataclassfieldsreplace)AnyLiteral)BodyHeadersQuery)	Reasoning)	BaseModelc                     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	<   	 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<   	 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<   	 d"dZd#d!ZdS )$ModelSettingsa?  Settings to use when calling an LLM.

    This class holds optional model configuration parameters (e.g. temperature,
    top_p, penalties, truncation, etc.).

    Not all models/providers support all of these parameters, so please check the API documentation
    for the specific model and provider you are using.
    Nzfloat | Nonetemperaturetop_pfrequency_penaltypresence_penaltyz0Literal['auto', 'required', 'none'] | str | Nonetool_choicezbool | Noneparallel_tool_callsz"Literal['auto', 'disabled'] | None
truncationz
int | None
max_tokenszReasoning | None	reasoningzdict[str, str] | Nonemetadatastoreinclude_usagezQuery | Noneextra_queryzBody | None
extra_bodyzHeaders | Noneextra_headersoverrideModelSettings | Nonereturnc                \    | S fdt          |           D             }t          | fi |S )zpProduce a new ModelSettings by overlaying any non-None values from the
        override on top of this instance.Nc                p    i | ]2}t          |j                  |j        t          |j                  3S )N)getattrname).0fieldr   s     R/var/www/FlaskApp/flask-venv/lib/python3.11/site-packages/agents/model_settings.py
<dictcomp>z)ModelSettings.resolve.<locals>.<dictcomp>R   sE     
 
 
x,,8 J%*55888    )r   r   )selfr   changess    ` r(   resolvezModelSettings.resolveL   sV     K
 
 
 

 
 

 t''w'''r*   dict[str, Any]c                    t          j        |           }i }|                                D ]9\  }}t          |t                    r|                    d          ||<   4|||<   :|S )Njson)mode)dataclassesasdictitems
isinstancer   
model_dump)r+   dataclass_dict	json_dict
field_namevalues        r(   to_json_dictzModelSettings.to_json_dictY   sz    $+D11$&	!/!5!5!7!7 	. 	.J%++ .(-(8(8f(8(E(E	*%%(-	*%%r*   )r   r    r!   r   )r!   r.   )__name__
__module____qualname____doc__r   __annotations__r   r   r   r   r   r   r   r   r   r   r   r   r   r   r-   r;    r*   r(   r   r      s          !%K$$$$8E2&*****>%)))))=DHKHHHH8'+++++* 6:J9999@!J!!!!:"&I&&&& '+H****;E) "&M%%%%) !%K$$$$) #J"""") %)M(((()( ( ( (     r*   r   )
__future__r   r2   r   r   r   typingr   r   openai._typesr	   r
   r   openai.types.sharedr   pydanticr   r   rA   r*   r(   <module>rG      s    " " " " " "     2 2 2 2 2 2 2 2 2 2         . . . . . . . . . . ) ) ) ) ) )       W W W W W W W W W Wr*   