Ë
    ñEj¡" ã                  ó¬  — d dl mZ d dlmZmZmZmZmZmZ d dl	m
Z
 d dlZddlmZ ddlmZmZmZmZmZ ddlmZmZmZ dd	lmZ dd
lmZmZ ddlmZmZ ddl m!Z!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddl3m4Z4 ddgZ5 G d„ de«      Z6 G d„ de«      Z7 G d„ d«      Z8 G d„ d«      Z9 G d„ d«      Z: G d „ d!«      Z;y)"é    )Úannotations)ÚDictÚListÚUnionÚIterableÚOptionalÚoverload)ÚLiteralNé   )Ú_legacy_response)Ú	NOT_GIVENÚBodyÚQueryÚHeadersÚNotGiven)Úrequired_argsÚmaybe_transformÚasync_maybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)ÚStreamÚAsyncStream)Úcompletion_create_params)Úmake_request_options)Ú	ChatModel)ÚChatCompletion)ÚChatCompletionChunk)ÚChatCompletionToolParam)ÚChatCompletionMessageParam)Ú ChatCompletionStreamOptionsParam)Ú#ChatCompletionToolChoiceOptionParamÚCompletionsÚAsyncCompletionsc                  ó  — e Zd Zedd„«       Zedd„«       Zeeeeeeeeeeeeeeeeeeeeeedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zeeeeeeeeeeeeeeeeeeeeedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd	„«       Zeeeeeeeeeeeeeeeeeeeeedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd
„«       Z e	ddgg d¢«      eeeeeeeeeeeeeeeeeeeeedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zy)r%   c                ó   — t        | «      S ©N)ÚCompletionsWithRawResponse©Úselfs    úd/var/www/html/peoplehubportal/venv/lib/python3.12/site-packages/openai/resources/chat/completions.pyÚwith_raw_responsezCompletions.with_raw_response%   s   € ä)¨$Ó/Ð/ó    c                ó   — t        | «      S r)   )Ú CompletionsWithStreamingResponser+   s    r-   Úwith_streaming_responsez#Completions.with_streaming_response)   s   € ä/°Ó5Ð5r/   N©Úfrequency_penaltyÚfunction_callÚ	functionsÚ
logit_biasÚlogprobsÚ
max_tokensÚnÚparallel_tool_callsÚpresence_penaltyÚresponse_formatÚseedÚservice_tierÚstopÚstreamÚstream_optionsÚtemperatureÚtool_choiceÚtoolsÚtop_logprobsÚtop_pÚuserÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutÚmessagesÚmodelc                ó   — y©a¨!  
        Creates a model response for the given chat conversation.

        Args:
          messages: A list of messages comprising the conversation so far.
              [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).

          model: ID of the model to use. See the
              [model endpoint compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility)
              table for details on which models work with the Chat API.

          frequency_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on their
              existing frequency in the text so far, decreasing the model's likelihood to
              repeat the same line verbatim.

              [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details)

          function_call: Deprecated in favor of `tool_choice`.

              Controls which (if any) function is called by the model. `none` means the model
              will not call a function and instead generates a message. `auto` means the model
              can pick between generating a message or calling a function. Specifying a
              particular function via `{"name": "my_function"}` forces the model to call that
              function.

              `none` is the default when no functions are present. `auto` is the default if
              functions are present.

          functions: Deprecated in favor of `tools`.

              A list of functions the model may generate JSON inputs for.

          logit_bias: Modify the likelihood of specified tokens appearing in the completion.

              Accepts a JSON object that maps tokens (specified by their token ID in the
              tokenizer) to an associated bias value from -100 to 100. Mathematically, the
              bias is added to the logits generated by the model prior to sampling. The exact
              effect will vary per model, but values between -1 and 1 should decrease or
              increase likelihood of selection; values like -100 or 100 should result in a ban
              or exclusive selection of the relevant token.

          logprobs: Whether to return log probabilities of the output tokens or not. If true,
              returns the log probabilities of each output token returned in the `content` of
              `message`.

          max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the chat
              completion.

              The total length of input tokens and generated tokens is limited by the model's
              context length.
              [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken)
              for counting tokens.

          n: How many chat completion choices to generate for each input message. Note that
              you will be charged based on the number of generated tokens across all of the
              choices. Keep `n` as `1` to minimize costs.

          parallel_tool_calls: Whether to enable
              [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
              during tool use.

          presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on
              whether they appear in the text so far, increasing the model's likelihood to
              talk about new topics.

              [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details)

          response_format: An object specifying the format that the model must output. Compatible with
              [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
              all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.

              Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
              message the model generates is valid JSON.

              **Important:** when using JSON mode, you **must** also instruct the model to
              produce JSON yourself via a system or user message. Without this, the model may
              generate an unending stream of whitespace until the generation reaches the token
              limit, resulting in a long-running and seemingly "stuck" request. Also note that
              the message content may be partially cut off if `finish_reason="length"`, which
              indicates the generation exceeded `max_tokens` or the conversation exceeded the
              max context length.

          seed: This feature is in Beta. If specified, our system will make a best effort to
              sample deterministically, such that repeated requests with the same `seed` and
              parameters should return the same result. Determinism is not guaranteed, and you
              should refer to the `system_fingerprint` response parameter to monitor changes
              in the backend.

          service_tier: Specifies the latency tier to use for processing the request. This parameter is
              relevant for customers subscribed to the scale tier service:

              - If set to 'auto', the system will utilize scale tier credits until they are
                exhausted.
              - If set to 'default', the request will be processed in the shared cluster.

              When this parameter is set, the response body will include the `service_tier`
              utilized.

          stop: Up to 4 sequences where the API will stop generating further tokens.

          stream: If set, partial message deltas will be sent, like in ChatGPT. Tokens will be
              sent as data-only
              [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
              as they become available, with the stream terminated by a `data: [DONE]`
              message.
              [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).

          stream_options: Options for streaming response. Only set this when you set `stream: true`.

          temperature: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
              make the output more random, while lower values like 0.2 will make it more
              focused and deterministic.

              We generally recommend altering this or `top_p` but not both.

          tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
              not call any tool and instead generates a message. `auto` means the model can
              pick between generating a message or calling one or more tools. `required` means
              the model must call one or more tools. Specifying a particular tool via
              `{"type": "function", "function": {"name": "my_function"}}` forces the model to
              call that tool.

              `none` is the default when no tools are present. `auto` is the default if tools
              are present.

          tools: A list of tools the model may call. Currently, only functions are supported as a
              tool. Use this to provide a list of functions the model may generate JSON inputs
              for. A max of 128 functions are supported.

          top_logprobs: An integer between 0 and 20 specifying the number of most likely tokens to
              return at each token position, each with an associated log probability.
              `logprobs` must be set to `true` if this parameter is used.

          top_p: An alternative to sampling with temperature, called nucleus sampling, where the
              model considers the results of the tokens with top_p probability mass. So 0.1
              means only the tokens comprising the top 10% probability mass are considered.

              We generally recommend altering this or `temperature` but not both.

          user: A unique identifier representing your end-user, which can help OpenAI to monitor
              and detect abuse.
              [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).

          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
        N© ©r,   rM   rN   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   s                               r-   ÚcreatezCompletions.create-   ó   € ðr 	r/   ©r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   c                ó   — y©a¨!  
        Creates a model response for the given chat conversation.

        Args:
          messages: A list of messages comprising the conversation so far.
              [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).

          model: ID of the model to use. See the
              [model endpoint compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility)
              table for details on which models work with the Chat API.

          stream: If set, partial message deltas will be sent, like in ChatGPT. Tokens will be
              sent as data-only
              [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
              as they become available, with the stream terminated by a `data: [DONE]`
              message.
              [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).

          frequency_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on their
              existing frequency in the text so far, decreasing the model's likelihood to
              repeat the same line verbatim.

              [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details)

          function_call: Deprecated in favor of `tool_choice`.

              Controls which (if any) function is called by the model. `none` means the model
              will not call a function and instead generates a message. `auto` means the model
              can pick between generating a message or calling a function. Specifying a
              particular function via `{"name": "my_function"}` forces the model to call that
              function.

              `none` is the default when no functions are present. `auto` is the default if
              functions are present.

          functions: Deprecated in favor of `tools`.

              A list of functions the model may generate JSON inputs for.

          logit_bias: Modify the likelihood of specified tokens appearing in the completion.

              Accepts a JSON object that maps tokens (specified by their token ID in the
              tokenizer) to an associated bias value from -100 to 100. Mathematically, the
              bias is added to the logits generated by the model prior to sampling. The exact
              effect will vary per model, but values between -1 and 1 should decrease or
              increase likelihood of selection; values like -100 or 100 should result in a ban
              or exclusive selection of the relevant token.

          logprobs: Whether to return log probabilities of the output tokens or not. If true,
              returns the log probabilities of each output token returned in the `content` of
              `message`.

          max_tokens: The maximum number of [tokens](/tokenizer) that can be generated in the chat
              completion.

              The total length of input tokens and generated tokens is limited by the model's
              context length.
              [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken)
              for counting tokens.

          n: How many chat completion choices to generate for each input message. Note that
              you will be charged based on the number of generated tokens across all of the
              choices. Keep `n` as `1` to minimize costs.

          parallel_tool_calls: Whether to enable
              [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
              during tool use.

          presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on
              whether they appear in the text so far, increasing the model's likelihood to
              talk about new topics.

              [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation/parameter-details)

          response_format: An object specifying the format that the model must output. Compatible with
              [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
              all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.

              Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
              message the model generates is valid JSON.

              **Important:** when using JSON mode, you **must** also instruct the model to
              produce JSON yourself via a system or user message. Without this, the model may
              generate an unending stream of whitespace until the generation reaches the token
              limit, resulting in a long-running and seemingly "stuck" request. Also note that
              the message content may be partially cut off if `finish_reason="length"`, which
              indicates the generation exceeded `max_tokens` or the conversation exceeded the
              max context length.

          seed: This feature is in Beta. If specified, our system will make a best effort to
              sample deterministically, such that repeated requests with the same `seed` and
              parameters should return the same result. Determinism is not guaranteed, and you
              should refer to the `system_fingerprint` response parameter to monitor changes
              in the backend.

          service_tier: Specifies the latency tier to use for processing the request. This parameter is
              relevant for customers subscribed to the scale tier service:

              - If set to 'auto', the system will utilize scale tier credits until they are
                exhausted.
              - If set to 'default', the request will be processed in the shared cluster.

              When this parameter is set, the response body will include the `service_tier`
              utilized.

          stop: Up to 4 sequences where the API will stop generating further tokens.

          stream_options: Options for streaming response. Only set this when you set `stream: true`.

          temperature: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
              make the output more random, while lower values like 0.2 will make it more
              focused and deterministic.

              We generally recommend altering this or `top_p` but not both.

          tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
              not call any tool and instead generates a message. `auto` means the model can
              pick between generating a message or calling one or more tools. `required` means
              the model must call one or more tools. Specifying a particular tool via
              `{"type": "function", "function": {"name": "my_function"}}` forces the model to
              call that tool.

              `none` is the default when no tools are present. `auto` is the default if tools
              are present.

          tools: A list of tools the model may call. Currently, only functions are supported as a
              tool. Use this to provide a list of functions the model may generate JSON inputs
              for. A max of 128 functions are supported.

          top_logprobs: An integer between 0 and 20 specifying the number of most likely tokens to
              return at each token position, each with an associated log probability.
              `logprobs` must be set to `true` if this parameter is used.

          top_p: An alternative to sampling with temperature, called nucleus sampling, where the
              model considers the results of the tokens with top_p probability mass. So 0.1
              means only the tokens comprising the top 10% probability mass are considered.

              We generally recommend altering this or `temperature` but not both.

          user: A unique identifier representing your end-user, which can help OpenAI to monitor
              and detect abuse.
              [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).

          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
        NrQ   ©r,   rM   rN   rA   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   s                               r-   rS   zCompletions.createè   rT   r/   c                ó   — yrW   rQ   rX   s                               r-   rS   zCompletions.create£  rT   r/   ©rM   rN   rA   c               ó  — | j                  dt        i d|“d|“d|“d|“d|“d|“d|“d	|“d
|	“d|
“d|“d|“d|“d|“d|“d|“d|“||||||dœ¥t        j                  «      t	        ||||¬«      t
        |xs dt        t           ¬«      S ©Nz/chat/completionsrM   rN   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   )rC   rD   rE   rF   rG   rH   )rI   rJ   rK   rL   F)ÚbodyÚoptionsÚcast_torA   Ú
stream_cls)Ú_postr   r   ÚCompletionCreateParamsr   r   r   r    rR   s                               r-   rS   zCompletions.create^  sE  € ðD �z‰zØÜ ðØ ðà˜Uðð (Ð):ðð $ ]ð	ð
   ðð ! *ðð  ðð ! *ðð ˜ðð *Ð+>ðð 'Ð(8ðð & ðð ˜Dðð # Lðð ˜Dðð  ˜fð!ð" % nð#ð$ $/Ø#.Ø"Ø$0Ø"Ø ò/ô2 )×?Ñ?ó5ô8 )Ø+¸ÐQ[Ðelôô #Ø’?˜UÜÔ1Ñ2ðG ó $
ð $	
r/   )Úreturnr*   )rc   r1   ©8rM   ú$Iterable[ChatCompletionMessageParam]rN   úUnion[str, ChatModel]r4   úOptional[float] | NotGivenr5   ú0completion_create_params.FunctionCall | NotGivenr6   ú6Iterable[completion_create_params.Function] | NotGivenr7   ú#Optional[Dict[str, int]] | NotGivenr8   úOptional[bool] | NotGivenr9   úOptional[int] | NotGivenr:   rl   r;   úbool | NotGivenr<   rg   r=   ú2completion_create_params.ResponseFormat | NotGivenr>   rl   r?   ú/Optional[Literal['auto', 'default']] | NotGivenr@   ú*Union[Optional[str], List[str]] | NotGivenrA   z#Optional[Literal[False]] | NotGivenrB   ú5Optional[ChatCompletionStreamOptionsParam] | NotGivenrC   rg   rD   ú.ChatCompletionToolChoiceOptionParam | NotGivenrE   ú,Iterable[ChatCompletionToolParam] | NotGivenrF   rl   rG   rg   rH   ústr | NotGivenrI   úHeaders | NonerJ   úQuery | NonerK   úBody | NonerL   ú'float | httpx.Timeout | None | NotGivenrc   r   )8rM   re   rN   rf   rA   úLiteral[True]r4   rg   r5   rh   r6   ri   r7   rj   r8   rk   r9   rl   r:   rl   r;   rm   r<   rg   r=   rn   r>   rl   r?   ro   r@   rp   rB   rq   rC   rg   rD   rr   rE   rs   rF   rl   rG   rg   rH   rt   rI   ru   rJ   rv   rK   rw   rL   rx   rc   zStream[ChatCompletionChunk])8rM   re   rN   rf   rA   Úboolr4   rg   r5   rh   r6   ri   r7   rj   r8   rk   r9   rl   r:   rl   r;   rm   r<   rg   r=   rn   r>   rl   r?   ro   r@   rp   rB   rq   rC   rg   rD   rr   rE   rs   rF   rl   rG   rg   rH   rt   rI   ru   rJ   rv   rK   rw   rL   rx   rc   ú,ChatCompletion | Stream[ChatCompletionChunk])8rM   re   rN   rf   r4   rg   r5   rh   r6   ri   r7   rj   r8   rk   r9   rl   r:   rl   r;   rm   r<   rg   r=   rn   r>   rl   r?   ro   r@   rp   rA   ú3Optional[Literal[False]] | Literal[True] | NotGivenrB   rq   rC   rg   rD   rr   rE   rs   rF   rl   rG   rg   rH   rt   rI   ru   rJ   rv   rK   rw   rL   rx   rc   r{   ©
Ú__name__Ú
__module__Ú__qualname__r   r.   r2   r	   r   rS   r   rQ   r/   r-   r%   r%   $   s¼  „ Øò0ó ð0ð ò6ó ð6ð ð 9BØJSØLUØ:CØ.7Ø/8Ø&/Ø/8Ø7@ØNWØ)2ØHQØ;DØ6?ØPYØ2;ØFOØ>GØ1:Ø,5Ø(ð )-Ø$(Ø"&Ø;Dñ?xð 7ðxð %ð	xð
 6ðxð Hðxð Jðxð 8ðxð ,ðxð -ðxð $ðxð -ðxð 5ðxð Lðxð 'ðxð  Fð!xð" 9ð#xð$ 4ð%xð& Nð'xð( 0ð)xð* Dð+xð, <ð-xð. /ð/xð0 *ð1xð2 ð3xð8 &ð9xð: "ð;xð<  ð=xð> 9ð?xð@ 
òAxó ðxðt ð 9BØJSØLUØ:CØ.7Ø/8Ø&/Ø/8Ø7@ØNWØ)2ØHQØ;DØPYØ2;ØFOØ>GØ1:Ø,5Ø(ð )-Ø$(Ø"&Ø;Dñ?xð 7ðxð %ð	xð
 ðxð 6ðxð Hðxð Jðxð 8ðxð ,ðxð -ðxð $ðxð -ðxð 5ðxð Lðxð  'ð!xð" Fð#xð$ 9ð%xð& Nð'xð( 0ð)xð* Dð+xð, <ð-xð. /ð/xð0 *ð1xð2 ð3xð8 &ð9xð: "ð;xð<  ð=xð> 9ð?xð@ 
%òAxó ðxðt ð 9BØJSØLUØ:CØ.7Ø/8Ø&/Ø/8Ø7@ØNWØ)2ØHQØ;DØPYØ2;ØFOØ>GØ1:Ø,5Ø(ð )-Ø$(Ø"&Ø;Dñ?xð 7ðxð %ð	xð
 ðxð 6ðxð Hðxð Jðxð 8ðxð ,ðxð -ðxð $ðxð -ðxð 5ðxð Lðxð  'ð!xð" Fð#xð$ 9ð%xð& Nð'xð( 0ð)xð* Dð+xð, <ð-xð. /ð/xð0 *ð1xð2 ð3xð8 &ð9xð: "ð;xð<  ð=xð> 9ð?xð@ 
6òAxó ðxñt �J Ð(Ò*IÓJð 9BØJSØLUØ:CØ.7Ø/8Ø&/Ø/8Ø7@ØNWØ)2ØHQØ;DØFOØPYØ2;ØFOØ>GØ1:Ø,5Ø(ð )-Ø$(Ø"&Ø;Dñ?E
ð 7ðE
ð %ð	E
ð
 6ðE
ð HðE
ð JðE
ð 8ðE
ð ,ðE
ð -ðE
ð $ðE
ð -ðE
ð 5ðE
ð LðE
ð 'ðE
ð  Fð!E
ð" 9ð#E
ð$ Dð%E
ð& Nð'E
ð( 0ð)E
ð* Dð+E
ð, <ð-E
ð. /ð/E
ð0 *ð1E
ð2 ð3E
ð8 &ð9E
ð: "ð;E
ð<  ð=E
ð> 9ð?E
ð@ 
6òAE
ó KñE
r/   c                  ó  — e Zd Zedd„«       Zedd„«       Zeeeeeeeeeeeeeeeeeeeeeedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zeeeeeeeeeeeeeeeeeeeeedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd	„«       Zeeeeeeeeeeeeeeeeeeeeedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd
„«       Z e	ddgg d¢«      eeeeeeeeeeeeeeeeeeeeedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zy)r&   c                ó   — t        | «      S r)   )ÚAsyncCompletionsWithRawResponser+   s    r-   r.   z"AsyncCompletions.with_raw_response¨  s   € ä.¨tÓ4Ð4r/   c                ó   — t        | «      S r)   )Ú%AsyncCompletionsWithStreamingResponser+   s    r-   r2   z(AsyncCompletions.with_streaming_response¬  s   € ä4°TÓ:Ð:r/   Nr3   rM   rN   c             ƒ  ó   K  — y­wrP   rQ   rR   s                               r-   rS   zAsyncCompletions.create°  ó   è ø€ ðr 	ùó   ‚rU   c             ƒ  ó   K  — y­wrW   rQ   rX   s                               r-   rS   zAsyncCompletions.createk  r‡   rˆ   c             ƒ  ó   K  — y­wrW   rQ   rX   s                               r-   rS   zAsyncCompletions.create&  r‡   rˆ   rZ   c             ƒ  óH  K  — | j                  dt        i d|“d|“d|“d|“d|“d|“d|“d	|“d
|	“d|
“d|“d|“d|“d|“d|“d|“d|“||||||dœ¥t        j                  «      ƒ d {  –—† t	        ||||¬«      t
        |xs dt        t           ¬«      ƒ d {  –—† S 7 Œ57 Œ­wr\   )ra   r   r   rb   r   r   r   r    rR   s                               r-   rS   zAsyncCompletions.createá  s^  è ø€ ðD —Z‘ZØÜ,ðØ ðà˜Uðð (Ð):ðð $ ]ð	ð
   ðð ! *ðð  ðð ! *ðð ˜ðð *Ð+>ðð 'Ð(8ðð & ðð ˜Dðð # Lðð ˜Dðð  ˜fð!ð" % nð#ð$ $/Ø#.Ø"Ø$0Ø"Ø ò/ô2 )×?Ñ?ó5÷ ô8 )Ø+¸ÐQ[Ðelôô #Ø’?˜UÜ"Ô#6Ñ7ðG  ó $
÷ $
ð $	
ðøð$
ús$   ‚A&B"Á(B
Á)0B"ÂB ÂB"Â B")rc   rƒ   )rc   r…   rd   )8rM   re   rN   rf   rA   ry   r4   rg   r5   rh   r6   ri   r7   rj   r8   rk   r9   rl   r:   rl   r;   rm   r<   rg   r=   rn   r>   rl   r?   ro   r@   rp   rB   rq   rC   rg   rD   rr   rE   rs   rF   rl   rG   rg   rH   rt   rI   ru   rJ   rv   rK   rw   rL   rx   rc   z AsyncStream[ChatCompletionChunk])8rM   re   rN   rf   rA   rz   r4   rg   r5   rh   r6   ri   r7   rj   r8   rk   r9   rl   r:   rl   r;   rm   r<   rg   r=   rn   r>   rl   r?   ro   r@   rp   rB   rq   rC   rg   rD   rr   rE   rs   rF   rl   rG   rg   rH   rt   rI   ru   rJ   rv   rK   rw   rL   rx   rc   ú1ChatCompletion | AsyncStream[ChatCompletionChunk])8rM   re   rN   rf   r4   rg   r5   rh   r6   ri   r7   rj   r8   rk   r9   rl   r:   rl   r;   rm   r<   rg   r=   rn   r>   rl   r?   ro   r@   rp   rA   r|   rB   rq   rC   rg   rD   rr   rE   rs   rF   rl   rG   rg   rH   rt   rI   ru   rJ   rv   rK   rw   rL   rx   rc   rŒ   r}   rQ   r/   r-   r&   r&   §  s¼  „ Øò5ó ð5ð ò;ó ð;ð ð 9BØJSØLUØ:CØ.7Ø/8Ø&/Ø/8Ø7@ØNWØ)2ØHQØ;DØ6?ØPYØ2;ØFOØ>GØ1:Ø,5Ø(ð )-Ø$(Ø"&Ø;Dñ?xð 7ðxð %ð	xð
 6ðxð Hðxð Jðxð 8ðxð ,ðxð -ðxð $ðxð -ðxð 5ðxð Lðxð 'ðxð  Fð!xð" 9ð#xð$ 4ð%xð& Nð'xð( 0ð)xð* Dð+xð, <ð-xð. /ð/xð0 *ð1xð2 ð3xð8 &ð9xð: "ð;xð<  ð=xð> 9ð?xð@ 
òAxó ðxðt ð 9BØJSØLUØ:CØ.7Ø/8Ø&/Ø/8Ø7@ØNWØ)2ØHQØ;DØPYØ2;ØFOØ>GØ1:Ø,5Ø(ð )-Ø$(Ø"&Ø;Dñ?xð 7ðxð %ð	xð
 ðxð 6ðxð Hðxð Jðxð 8ðxð ,ðxð -ðxð $ðxð -ðxð 5ðxð Lðxð  'ð!xð" Fð#xð$ 9ð%xð& Nð'xð( 0ð)xð* Dð+xð, <ð-xð. /ð/xð0 *ð1xð2 ð3xð8 &ð9xð: "ð;xð<  ð=xð> 9ð?xð@ 
*òAxó ðxðt ð 9BØJSØLUØ:CØ.7Ø/8Ø&/Ø/8Ø7@ØNWØ)2ØHQØ;DØPYØ2;ØFOØ>GØ1:Ø,5Ø(ð )-Ø$(Ø"&Ø;Dñ?xð 7ðxð %ð	xð
 ðxð 6ðxð Hðxð Jðxð 8ðxð ,ðxð -ðxð $ðxð -ðxð 5ðxð Lðxð  'ð!xð" Fð#xð$ 9ð%xð& Nð'xð( 0ð)xð* Dð+xð, <ð-xð. /ð/xð0 *ð1xð2 ð3xð8 &ð9xð: "ð;xð<  ð=xð> 9ð?xð@ 
;òAxó ðxñt �J Ð(Ò*IÓJð 9BØJSØLUØ:CØ.7Ø/8Ø&/Ø/8Ø7@ØNWØ)2ØHQØ;DØFOØPYØ2;ØFOØ>GØ1:Ø,5Ø(ð )-Ø$(Ø"&Ø;Dñ?E
ð 7ðE
ð %ð	E
ð
 6ðE
ð HðE
ð JðE
ð 8ðE
ð ,ðE
ð -ðE
ð $ðE
ð -ðE
ð 5ðE
ð LðE
ð 'ðE
ð  Fð!E
ð" 9ð#E
ð$ Dð%E
ð& Nð'E
ð( 0ð)E
ð* Dð+E
ð, <ð-E
ð. /ð/E
ð0 *ð1E
ð2 ð3E
ð8 &ð9E
ð: "ð;E
ð<  ð=E
ð> 9ð?E
ð@ 
;òAE
ó KñE
r/   c                  ó   — e Zd Zdd„Zy)r*   c                óZ   — || _         t        j                  |j                  «      | _        y r)   )Ú_completionsr   Úto_raw_response_wrapperrS   ©r,   Úcompletionss     r-   Ú__init__z#CompletionsWithRawResponse.__init__+  s%   € Ø'ˆÔä&×>Ñ>Ø×Ñó
ˆ�r/   N©r’   r%   rc   ÚNone©r~   r   r€   r“   rQ   r/   r-   r*   r*   *  ó   „ ô
r/   r*   c                  ó   — e Zd Zdd„Zy)rƒ   c                óZ   — || _         t        j                  |j                  «      | _        y r)   )r�   r   Úasync_to_raw_response_wrapperrS   r‘   s     r-   r“   z(AsyncCompletionsWithRawResponse.__init__4  s%   € Ø'ˆÔä&×DÑDØ×Ñó
ˆ�r/   N©r’   r&   rc   r•   r–   rQ   r/   r-   rƒ   rƒ   3  r—   r/   rƒ   c                  ó   — e Zd Zdd„Zy)r1   c                óF   — || _         t        |j                  «      | _        y r)   )r�   r   rS   r‘   s     r-   r“   z)CompletionsWithStreamingResponse.__init__=  s   € Ø'ˆÔä2Ø×Ñó
ˆ�r/   Nr”   r–   rQ   r/   r-   r1   r1   <  r—   r/   r1   c                  ó   — e Zd Zdd„Zy)r…   c                óF   — || _         t        |j                  «      | _        y r)   )r�   r   rS   r‘   s     r-   r“   z.AsyncCompletionsWithStreamingResponse.__init__F  s   € Ø'ˆÔä8Ø×Ñó
ˆ�r/   Nr›   r–   rQ   r/   r-   r…   r…   E  r—   r/   r…   )<Ú
__future__r   Útypingr   r   r   r   r   r	   Útyping_extensionsr
   ÚhttpxÚ r   Ú_typesr   r   r   r   r   Ú_utilsr   r   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   Ú
_streamingr   r   Ú
types.chatr   Ú_base_clientr   Útypes.chat_modelr   Útypes.chat.chat_completionr   Ú types.chat.chat_completion_chunkr    Ú%types.chat.chat_completion_tool_paramr!   Ú(types.chat.chat_completion_message_paramr"   Ú/types.chat.chat_completion_stream_options_paramr#   Ú3types.chat.chat_completion_tool_choice_option_paramr$   Ú__all__r%   r&   r*   rƒ   r1   r…   rQ   r/   r-   ú<module>rµ      s¨   ðõ #ç B× BÝ %ã å  ß ?Õ ?÷ñ õ
 'ß :ß Yß -Ý 2õõ *Ý 8Ý CÝ LÝ RÝ _Ý fàÐ,Ð
-€ô@

�/ô @

ôF@

Ð'ô @

÷F
ñ 
÷
ñ 
÷
ñ 
÷
ò 
r/   