ó
    |¤jà  ã                   ó–  • S SK r S SKrS SK Jr  \R                  " SS\S9  S SKJr  S SKJr  S SK	J
r
JrJr  S S	KJrJr  S S
KJr  S SKJrJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJ r   S SK!J"r"  S SK#J$r$  S SK%J&r&J'r'J(r(J)q)J*q*J+q+J,r,  S SK-J.r.  S SK/J0r0  S SK1J2r2  S SK3J4r4  S SK5J6r6J7r7J8r8J9r9J:r:  S SK;J<r<  S SK=J>r>  S SK?J@r@  S SKAJBrB  S SKCJDrDJErE  S SKFJGrGJHrHJIrI  S S KJJKrKJLrL  S S!KMJNrNJOrOJPrPJQrQJRrRJSrSJTrTJUrUJVrVJWrWJXrXJYrY  S S"KZJ[r[J\r\J]r]J^r^  1 \&kS#ir_S(S$\`S%\`4S& jjra/ S'Qrb\ RÆ                  " \d5      RË                  \" 5       5        g))é    N)ÚNullHandlerÚignorez".*urllib3.*only supports OpenSSL.*)ÚmessageÚcategory)Ú__version__)ÚCodeGeneration)ÚConversationÚHistoryÚHistoryItem)ÚAioGenerationÚ
Generation)ÚImageSynthesis)ÚMultiModalConversationÚAioMultiModalConversation)ÚVideoSynthesis)ÚApplication)ÚTranscription)ÚHttpSpeechSynthesizer)ÚSpeechSynthesizer)Úclose_shared_aio_session)Úclose_shared_sync_session)Úsave_api_key)ÚMAAS_REGIONSÚapi_keyÚapi_key_file_pathÚbase_compatible_api_urlÚbase_http_api_urlÚbase_websocket_api_urlÚvalidate_workspace_id)ÚDeployments)Ú	FineTunes)ÚBatchTextEmbedding)ÚBatchTextEmbeddingResponse)ÚMultiModalEmbeddingÚMultiModalEmbeddingItemAudioÚMultiModalEmbeddingItemImageÚMultiModalEmbeddingItemTextÚAioMultiModalEmbedding)ÚTextEmbedding)ÚFiles)ÚModels)ÚUnderstanding)ÚAioTextReRankÚ
TextReRank)Ú	AssistantÚAssistantListÚ
Assistants)ÚAssistantFileÚDeleteResponse)ÚMessageFileÚMessagesÚRunÚRunListÚRunsÚRunStepÚRunStepListÚStepsÚThreadÚThreadMessageÚThreadMessageListÚThreads)ÚTokenizationÚ	TokenizerÚget_tokenizerÚlist_tokenizersz
cn-beijingÚregionÚworkspace_idc                 óÂ   • U [         ;  a  [        SU  S[        [         5       35      eU(       d  [        S5      e[        U5        U SU  S3nSU S3qSU S3qS	U S
3qg)a1  Switch to a specific MaaS region.

Updates base_http_api_url, base_compatible_api_url and
base_websocket_api_url to point to the MaaS endpoint for the
given region and workspace.

Args:
    region (str): The MaaS region, e.g. "ap-southeast-1",
        "us-east-1", "cn-hongkong", "cn-beijing", "eu-central-1",
        "ap-northeast-1".
    workspace_id (str): The workspace ID, used as the subdomain
        of the MaaS endpoint.

Raises:
    ValueError: If region is not supported, workspace_id is
        empty, or workspace_id is not a valid hostname label.
zUnsupported region 'z'. Supported regions: zworkspace_id is requiredÚ.z.maas.aliyuncs.comzhttps://z/api/v1z/compatible-mode/v1zwss://z/api-ws/v1/inferenceN)Ú_MAAS_REGIONSÚ
ValueErrorÚsortedr   r   r   r   )rD   rE   Úhosts      Ú C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\dashscope/__init__.pyÚ
set_regionrM   \   s’   € ð$ ”]Ó"ÜØ" 6 (ð +"Ü"(¬Ó"7Ð!8ð:ó
ð 	
ö
 ÜÐ3Ó4Ð4ä˜,Ô'ð
 ˆ^˜1˜V˜HÐ$6Ð7€DØ" 4 &¨Ð0ÐØ (¨¨Ð.AÐBÐØ% d VÐ+?Ð@Ñó    )<r   r   r   r   r   r   r   r   r   r   r	   r   r
   r   r   r   r*   r    r!   r+   r)   r$   r(   r%   r&   r'   r   r   r   r   r"   r#   r,   r   r@   rA   rB   rC   r   r.   r-   r1   r?   r5   r8   r/   r=   r6   r;   r0   r>   r7   r:   r<   r3   r9   r4   r2   r   rM   )N)fÚloggingÚwarningsr   ÚfilterwarningsÚWarningÚdashscope.versionr   Údashscope.aigc.code_generationr   Údashscope.aigc.conversationr	   r
   r   Údashscope.aigc.generationr   r   Údashscope.aigc.image_synthesisr   Ú&dashscope.aigc.multimodal_conversationr   r   Údashscope.aigc.video_synthesisr   Údashscope.app.applicationr   Ú!dashscope.audio.asr.transcriptionr   Ú0dashscope.audio.http_tts.http_speech_synthesizerr   Ú&dashscope.audio.tts.speech_synthesizerr   Ú"dashscope.api_entities.aio_sessionr   Ú#dashscope.api_entities.http_requestr   Údashscope.common.api_keyr   Údashscope.common.envr   r   r   r   r   r   r   Údashscope.finetune.deploymentsr    Údashscope.finetune.finetunesr!   Ú)dashscope.embeddings.batch_text_embeddingr"   Ú2dashscope.embeddings.batch_text_embedding_responser#   Ú)dashscope.embeddings.multimodal_embeddingr$   r%   r&   r'   r(   Ú#dashscope.embeddings.text_embeddingr)   Údashscope.filesr*   Údashscope.modelsr+   Údashscope.nlp.understandingr,   Údashscope.rerankr-   r.   Údashscope.assistantsr/   r0   r1   Ú$dashscope.assistants.assistant_typesr2   r3   Údashscope.threadsr4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   Údashscope.tokenizersr@   rA   rB   rC   rH   ÚstrrM   Ú__all__Ú	getLoggerÚ__name__Ú
addHandler© rN   rL   Ú<module>rv      s  ðó
 Û Ý ð 	× Ò ØØ0Øòõ *Ý 9ß JÑ Jß ?Ý 9÷õ :Ý 1Ý ;õõ EÝ GÝ IÝ 1÷÷ ñ õ 7Ý 2Ý Hõ÷õ õ >Ý !Ý #Ý 5ß 6ß EÑ Eß N÷÷ ÷ ó ÷ó ð .�,Ð- Ð-€ñ#A�sð #A¨#õ #AòL=€ð~ × Ò �(Ó × &Ñ &¡{£}Õ 5rN   