
    +jV                        S SK JrJr   " S S\5      r " S S\5      r " S S\5      r " S S	\5      r " S
 S\5      r " S S\5      r " S S\5      r	 " S S\5      r
 " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S  S!\	\
5      r " S" S#\5      r " S$ S%\5      r " S& S'\5      r " S( S)\	\
5      rg*)+    )	BaseModelFieldc                   p    \ rS rSr% \" SSS9r\S-  \S'   \" SSS9r\S-  \S'   \" SSS9r	\S-  \S	'   S
r
g)Datum2   NzBase64 encoded image datadescriptionb64_jsonzRevised promptrevised_promptzURL of the imageurl )__name__
__module____qualname____firstlineno__r   r
   str__annotations__r   r   __static_attributes__r       ;/home/wildlama/comfy/ComfyUI/comfy_api_nodes/apis/openai.pyr   r      sD     3NOHcDjO!&t9I!JNC$JJD.@ACtAr   r   c                   V    \ rS rSr% \" S5      r\S-  \S'   \" S5      r\S-  \S'   Sr	g)InputTokensDetails
   Nimage_tokenstext_tokensr   )
r   r   r   r   r   r   intr   r   r   r   r   r   r   r   
   s&    $T{L#**#DkKt)r   r   c                       \ rS rSr% \" S5      r\S-  \S'   \" S5      r\	S-  \S'   \" S5      r
\S-  \S'   \" S5      r\S-  \S'   Srg)Usage   Ninput_tokensinput_tokens_detailsoutput_tokenstotal_tokensr   )r   r   r   r   r   r    r   r   r!   r   r"   r#   r   r   r   r   r   r      sM    $T{L#**6;Dk,t3A %dM3:+$T{L#**r   r   c                   \    \ rS rSr% \" S5      r\\   S-  \S'   \" S5      r	\
S-  \S'   Srg)OpenAIImageGenerationResponse   Ndatausager   )r   r   r   r   r   r'   listr   r   r(   r   r   r   r   r   r%   r%      s+     %dD$v,
++E54<%r   r%   c                       \ rS rSr% \" SSS9r\S-  \S'   \" S5      r\\S'   \" S5      r	\S-  \S'   \" SS	S9r
\S-  \S
'   \" SSS9r\S-  \S'   \" S5      r\S-  \S'   \" S5      r\\S'   \" SSS9r\S-  \S'   \" SSS9r\S-  \S'   Srg)OpenAIImageEditRequest   NBackground transparencyr   
background.model
moderationz The number of images to generaten*Compression level for JPEG or WebP (0-100)output_compressionoutput_formatprompt4Size of the image (e.g., 1024x1024, 1536x1024, auto)qualityzSize of the output imagesizer   )r   r   r   r   r   r.   r   r   r/   r0   r1   r   r3   r4   r5   r7   r8   r   r   r   r   r+   r+      s    "45NOJd
OsE3"4[Jd
($,NOAsTzO%*4=i%jd
j %dM3:+*FC2hiGS4ZiT/IJD#*Jr   r+   c                   D   \ rS rSr% \" SSS9r\S-  \S'   \" S5      r\S-  \S'   \" S5      r	\S-  \S'   \" SSS9r
\S-  \S	'   \" SS
S9r\S-  \S'   \" S5      r\S-  \S'   \" S5      r\\S'   \" SSS9r\S-  \S'   \" SSS9r\S-  \S'   \" SSS9r\S-  \S'   Srg)OpenAIImageGenerationRequest'   Nr-   r   r.   r/   r0   z!The number of images to generate.r1   r2   r3   r4   .r5   z"The quality of the generated imager7   r6   r8   z&Style of the image (only for dall-e-3)styler   )r   r   r   r   r   r.   r   r   r/   r0   r1   r   r3   r4   r5   r7   r8   r<   r   r   r   r   r:   r:   '   s    "45NOJd
OdE3:#"4[Jd
(7AsTz  &+4=i%jd
j %dM3:+*FC2VWGS4ZWT/efD#*fd0XYE3:Yr   r:   c                       \ rS rSr% \" S5      r\S-  \S'   \" S5      r\	S-  \S'   \" S5      r
\S-  \S'   \" SSSSS	9r\S-  \S
'   \" SSSSS	9r\S-  \S'   \" SSS9r\S-  \S'   Srg)ModelResponseProperties7   Ninstructionsmax_output_tokensr/   z#Controls randomness in the responseg        g       @)r	   geletemperaturez7Controls diversity of the response via nucleus samplingg      ?top_p$Allowed values: 'auto' or 'disabled'r   
truncationr   )r   r   r   r   r   r@   r   r   rA   r   r/   rD   floatrE   rG   r   r   r   r   r>   r>   7   s    $T{L#**$)$KsTz/dE3:# %d8]bejm nKnM	E54<  #45[\Jd
\r   r>   c                       \ rS rSr% \" S5      r\S-  \S'   \" S5      r\	S-  \S'   \" S5      r
\S-  \S'   \" S5      r\S-  \S'   \" SSS	9r\S-  \S
'   Srg)ResponsePropertiesE   Nr@   rA   r/   previous_response_iddisabledrF   r   rG   r   )r   r   r   r   r   r@   r   r   rA   r   r/   rL   rG   r   r   r   r   rJ   rJ   E   sb    $T{L#**$)$KsTz/dE3:#',T{#*2":;abJd
br   rJ   c                   J    \ rS rSr% \" S5      r\\S'   \" S5      r\\S'   Sr	g)ResponseErrorM   .codemessager   N)
r   r   r   r   r   rQ   r   r   rR   r   r   r   r   rO   rO   M   s    c
D#:GSr   rO   c                   .    \ rS rSr% \" SSS9r\\S'   Srg)OutputTokensDetailsR   .zThe number of reasoning tokens.r   reasoning_tokensr   N)	r   r   r   r   r   rV   r   r   r   r   r   r   rT   rT   R   s    !#3TUcUr   rT   c                   .    \ rS rSr% \" SSS9r\\S'   Srg)CachedTokensDetailsV   .z8The number of tokens that were retrieved from the cache.r   cached_tokensr   N)	r   r   r   r   r   rZ   r   r   r   r   r   r   rX   rX   V   s    NM3 r   rX   c                       \ rS rSr% \" SSS9r\\S'   \" S5      r\	\S'   \" SSS9r
\\S'   \" S5      r\\S	'   \" SS
S9r\\S'   Srg)ResponseUsage]   .zThe number of input tokens.r   r    r!   zThe number of output tokens.r"   output_tokens_detailsz The total number of tokens used.r#   r   N)r   r   r   r   r   r    r   r   r!   rX   r"   r^   rT   r#   r   r   r   r   r\   r\   ]   sX    c/LML#M05c
-:s0NOM3O16s.;c/QRL#Rr   r\   c                   H    \ rS rSr% \" SSS9r\\S'   \" S5      r\\S'   Sr	g	)
InputTextContente   .zThe text input to the model.r   text
input_texttyper   N)
r   r   r   r   r   rb   r   r   rd   r   r   r   r   r`   r`   e   s#    c'EFD#Fl#D##r   r`   c                       \ rS rSr% \" SSS9r\\S'   \" SSS9r\S-  \S'   \" SS	S9r	\S-  \S
'   \" SSS9r
\S-  \S'   Srg)OutputContentj   .zThe type of output contentr   rd   NzThe text contentrb   zBase64-encoded audio datar'   zTranscript of the audio
transcriptr   )r   r   r   r   r   rd   r   r   rb   r'   rh   r   r   r   r   rf   rf   j   sV    c'CDD#DT/ABD#*BT/JKD#*K"45NOJd
Or   rf   c                   p    \ rS rSr% \" SSS9r\\S'   \" SSS9r\	\
   S-  \S'   \" SS	S9r\S-  \S
'   Srg)OutputMessageq   .zThe type of output itemr   rd   NzThe content of the messagecontentzThe role of the messageroler   )r   r   r   r   r   rd   r   r   rl   r)   rf   rm   r   r   r   r   rj   rj   q   sF    c'@AD#A*/B^*_GT- 4'_T/HID#*Ir   rj   c                      \ rS rSr% \" SSS9r\S-  \S'   \" S5      r\	S-  \S'   \" SSS9r
\S-  \S'   \" SS	S9r\S-  \S
'   \" S5      r\\   S-  \S'   \" S5      r\S-  \S'   \" SSS9r\S-  \S'   \" S5      r\S-  \S'   Srg)OpenAIResponsew   Nz>Unix timestamp (in seconds) of when this Response was created.r   
created_aterrorz$Unique identifier for this Response.idz<The object type of this resource - always set to `response`.objectoutputTparallel_tool_callsz=One of `completed`, `failed`, `in_progress`, or `incomplete`.statusr(   r   )r   r   r   r   r   rq   rH   r   rr   rO   rs   r   rt   ru   r)   rj   rv   boolrw   r(   r\   r   r   r   r   ro   ro   w   s    $T J  #(+E=4-4-STBd
Tt1opFC$Jp).tFD$&4',T{2SFC$J  #(+E=4-r   ro   c                       \ rS rSr% \" SSS9r\\S'   \" S5      r\S-  \S'   \" S5      r	\S-  \S'   \" SS	S9r
\\S
'   Srg)InputImageContent   .z4One of `high`, `low`, or `auto`. Defaults to `auto`.r   detailNfile_id	image_urlz1The type of the input item. Always `input_image`.rd   r   )r   r   r   r   r   r|   r   r   r}   r~   rd   r   r   r   r   rz   rz      sJ    )_`FC`+GS4Z%!$KIsTz'c'Z[D#[r   rz   c                       \ rS rSr% \" S5      r\S-  \S'   \" S5      r\S-  \S'   \" SSS9r	\S-  \S'   \" SS	S9r
\\S
'   Srg)InputFileContent   N	file_datar}   z-The name of the file to be sent to the model.r   filename.z0The type of the input item. Always `input_file`.rd   r   )r   r   r   r   r   r   r   r   r}   r   rd   r   r   r   r   r   r      sN    !$KIsTz'+GS4Z% 3bcHcDjcc'YZD#Zr   r   c                       \ rS rSr% \" SSS9r\\\-  \	-     \
S'   \" S5      r\S-  \
S'   \" S5      r\S-  \
S'   S	rg)
InputMessage   .zSA list of one or many input items to the model, containing different content types.r   rl   Nrm   rd   r   )r   r   r   r   r   rl   r)   r`   rz   r   r   rm   r   rd   r   r   r   r   r   r      sR    MRiNGT"%669IIJ  T{D#*"T{D#*"r   r   c                       \ rS rSr% \" S5      r\S-  \S'   \" S5      r\	\
   \S'   \" SSS9r\S-  \S	'   \" SS
S9r\S-  \S'   \" S5      r\S-  \S'   \" S5      r\S-  \S'   Srg)OpenAICreateResponse   Ninclude.inputTz9Whether to allow the model to run tool calls in parallel.r   rv   zJWhether to store the generated model response for later retrieval via API.storeFstreamr(   r   )r   r   r   r   r   r   r   r   r   r)   r   rv   rx   r   r   r(   r\   r   r   r   r   r   r      s    +GS4Z% %c
E4*',U(  `E4$;   ,FD4K&"'+E=4-r   r   N)pydanticr   r   r   r   r   r%   r+   r:   r>   rJ   rO   rT   rX   r\   r`   rf   rj   ro   rz   r   r   r   r   r   r   <module>r      s   %BY B* *
+I +&I &
	KY 	KZ9 Z ]i ]c cI 
V) V) SI S$y $
PI PJI J.,.@ ."\	 \[y [#9 #.24F .r   