U
    h                     @  s   d Z ddlmZ ddlZddlZddlmZ ejddG dd dZejG d	d
 d
Z	G dd dej
ZG dd deZdS )zAbstract interface for models.    )annotationsN)SequenceT)frozenc                   @  s6   e Zd ZU dZdZded< dZded< dZded< dS )	ModelArgumentszCommon arguments for models.

  Attributes:
    model: The model string to use. If None a default model will be selected.
    temperature: The temperature. Must be greater-than-or-equal-to zero.
    candidate_count: Number of candidates to return.
  Nz
str | Nonemodelzfloat | Nonetemperaturez
int | Nonecandidate_count)__name__
__module____qualname____doc__r   __annotations__r   r    r   r   J/tmp/pip-unpacked-wheel-doshhd5e/google/generativeai/notebook/lib/model.pyr      s   
r   c                   @  s"   e Zd ZU dZded< ded< dS )ModelResultsz0Results from calling AbstractModel.call_model().strmodel_inputzSequence[str]text_resultsN)r	   r
   r   r   r   r   r   r   r   r   &   s   
r   c                   @  s&   e Zd ZejdddddddZdS )	AbstractModelNr   ModelArguments | Noner   r   
model_argsreturnc                 C  s   dS )zExecutes the model.Nr   )selfr   r   r   r   r   
call_model0   s    zAbstractModel.call_model)N)r	   r
   r   abcabstractmethodr   r   r   r   r   r   .   s    r   c                   @  s$   e Zd ZdZd	ddddddZdS )
	EchoModelzPModel that returns the original input.

  This is primarily used for testing.
  Nr   r   r   r   c                 C  s,   |r
|j nd }|d krd}t||g| dS )N   )r   r   )r   r   )r   r   r   r   r   r   r   r   =   s     zEchoModel.call_model)N)r	   r
   r   r   r   r   r   r   r   r   7   s    r   )r   
__future__r   r   Zdataclassestypingr   Z	dataclassr   r   ABCr   r   r   r   r   r   <module>   s   
	