L i0\ddlmZddlmZddlZddlmZddlmZm Z m Z m Z m Z m Z mZddlmZmZmZddlmZdd lmZmZdd lmZmZdd lmZmZdd lmZdd l m!Z!m"Z"ddl#m$Z$ddl%m&Z&ddgZ'GddeZ(GddeZ)GddZ*GddZ+GddZ,GddZ-y)) annotations)ListN)_legacy_response)BodyOmitQueryHeadersNotGivenomit not_given)is_givenmaybe_transformstrip_not_given)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncPage AsyncPage)model_list_params)AsyncPaginatormake_request_options)AnthropicBetaParam) BetaModelInfoModels AsyncModelsc eZdZeddZed dZeddded d dZeeeeddded d dZ y) rct|Sa This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers )ModelsWithRawResponseselfs e/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/anthropic/resources/beta/models.pywith_raw_responsezModels.with_raw_responses%T**ct|Sz An alternative to `.with_raw_response` that doesn't eagerly read the response body. For more information, see https://www.github.com/anthropics/anthropic-sdk-python#with_streaming_response )ModelsWithStreamingResponser#s r%with_streaming_responsezModels.with_streaming_response#s+400r'Nbetas extra_headers extra_query extra_bodytimeoutc |std|itdt|rdjd|Dnti|xsi}|j d|dt ||||tS) X Get a specific model. The Models API response can be used to determine information about a specific model or resolve a model alias to a model ID. Args: model_id: Model identifier or alias. betas: Optional header to specify the beta version(s) you want to use. extra_headers: Send extra headers extra_query: Add additional query parameters to the request extra_body: Add additional JSON properties to the request timeout: Override the client-level default timeout for this request, in seconds 7Expected a non-empty value for `model_id` but received anthropic-beta,c32K|]}t|ywNstr.0es r% z"Models.retrieve..N9PQ#a&9P /v1/models/ ?beta=truer.r/r0r1optionscast_to ValueErrorrrjoinr _getrrr$model_idr-r.r/r0r1s r%retrievezModels.retrieve,s>VW_Vbcd d /T\]bTc9P%9P1Pirst " yy(: .(+Q[el"   r'after_id before_idlimitr-r.r/r0r1citdt|rdjd|Dnti|xsi}|j dt t t||||t|||dtjt S) List available models. The Models API response can be used to determine which models are available for use in the API. More recently released models are listed first. Args: after_id: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. before_id: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. limit: Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`. betas: Optional header to specify the beta version(s) you want to use. extra_headers: Send extra headers extra_query: Add additional query parameters to the request extra_body: Add additional JSON properties to the request timeout: Override the client-level default timeout for this request, in seconds r5r6c32K|]}t|ywr8r9r;s r%r>zModels.list..r?r@/v1/models?beta=truerOrPrQr.r/r0r1querypagerEmodel) rrrIr _get_api_listrrrrrModelListParams r$rOrPrQr-r.r/r0r1s r%listz Models.listYsR /T\]bTc9P%9P1Pirst " !! "-((+'%%$,%.!& &55   #"  r')returnr")r`r*rLr:r-List[AnthropicBetaParam] | Omitr.Headers | Noner/ Query | Noner0 Body | Noner1'float | httpx.Timeout | None | NotGivenr`r)rO str | OmitrPrgrQ int | Omitr-rbr.rcr/rdr0rer1rfr`zSyncPage[BetaModelInfo] __name__ __module__ __qualname__rr&r+r r rMr_r'r%rrs++1126)-$("&;D+ + / + &+ "+  + 9+  + ` $ $ 15)-$("&;D? ?  ?  ? / ? &? "?  ? 9?  !? r'c eZdZeddZed dZeddded d dZeeeeddded d dZ y) rct|Sr!)AsyncModelsWithRawResponser#s r%r&zAsyncModels.with_raw_responses*$//r'ct|Sr)) AsyncModelsWithStreamingResponser#s r%r+z#AsyncModels.with_streaming_responses055r'Nr,c K|std|itdt|rdjd|Dnti|xsi}|j d|dt ||||td {S7w) r3r4r5r6c32K|]}t|ywr8r9r;s r%r>z'AsyncModels.retrieve..r?r@rArBrCrDNrGrKs r%rMzAsyncModels.retrieves>VW_Vbcd d /T\]bTc9P%9P1Pirst " YY(: .(+Q[el"     sA9B;B<BrNcitdt|rdjd|Dnti|xsi}|j dt t t||||t|||dtjt S)rSr5r6c32K|]}t|ywr8r9r;s r%r>z#AsyncModels.list..r?r@rUrVrWrY) rrrIr r\rrrrrr]r^s r%r_zAsyncModels.listsR /T\]bTc9P%9P1Pirst " !! "=)(+'%%$,%.!& &55   #"  r')r`rp)r`rrra)rOrgrPrgrQrhr-rbr.rcr/rdr0rer1rfr`z7AsyncPaginator[BetaModelInfo, AsyncPage[BetaModelInfo]]rirmr'r%rrs006626)-$("&;D+ + / + &+ "+  + 9+  + ` $ $ 15)-$("&;D? ?  ?  ? / ? &? "?  ? 9?  A? r'ceZdZddZy)r"c||_tj|j|_tj|j|_yr8)_modelsrto_raw_response_wrapperrMr_r$modelss r%__init__zModelsWithRawResponse.__init__s= (@@ OO  %<< KK  r'Nr|rr`Nonerjrkrlr}rmr'r%r"r" r'r"ceZdZddZy)rpc||_tj|j|_tj|j|_yr8)ryrasync_to_raw_response_wrapperrMr_r{s r%r}z#AsyncModelsWithRawResponse.__init__+s= (FF OO  %BB KK  r'Nr|rr`rrrmr'r%rprp*rr'rpceZdZddZy)r*cz||_t|j|_t|j|_yr8)ryrrMr_r{s r%r}z$ModelsWithStreamingResponse.__init__7s1 4 OO  1 KK  r'Nr~rrmr'r%r*r*6rr'r*ceZdZddZy)rrcz||_t|j|_t|j|_yr8)ryrrMr_r{s r%r}z)AsyncModelsWithStreamingResponse.__init__Cs1 : OO  7 KK  r'Nrrrmr'r%rrrrBrr'rr). __future__rtypingrhttpxr_typesrrr r r r r _utilsrrr_compatr _resourcerr _responserr paginationrr types.betar _base_clientrrtypes.anthropic_beta_paramrtypes.beta.beta_model_infor__all__rrr"rpr*rrrmr'r%rs# KKK@@&:Y-+@<7 ] #@ _@ F@ "@ F            r'