<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using the Azure Open AI Proxy outside of a notebook in Hack Together</title>
    <link>https://community.fabric.microsoft.com/t5/Hack-Together/Using-the-Azure-Open-AI-Proxy-outside-of-a-notebook/m-p/3724628#M140</link>
    <description>&lt;P&gt;Some of you might want to use the Azure Open AI proxy outside of a notebook. Maybe in some custom code or in Powerautomate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's easy, if you know the url...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) use the correct url to post a chat completion request:&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://polite-ground-030dc3103.4.azurestaticapps.net/api/v1/openai/deployments/gpt-35-turbo-16k/chat/completions" target="_blank" rel="noopener"&gt;https://polite-ground-030dc3103.4.azurestaticapps.net/api/v1/openai/deployments/gpt-35-turbo-16k/chat/completions&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;replace the model name with whatever one you want to play with. Careful, the /chat/ part of the url is paramount&lt;/P&gt;&lt;P&gt;2) add a header to the request:&amp;nbsp;&lt;SPAN&gt;api-key&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3) add your api key as the header value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4) construct the body using the messages syntax. a good example can be found here:&amp;nbsp;&lt;A href="https://microsoft.github.io/azure-openai-service-proxy/raw-api-access/chat-completion/" target="_blank" rel="noopener"&gt;https://microsoft.github.io/azure-openai-service-proxy/raw-api-access/chat-completion/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;careful! the last link has an outdated url structure. make sure to use&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://polite-ground-030dc3103.4.azurestaticapps.net/api/v1/openai/deployments/{model-name}/" target="_blank" rel="noopener"&gt;https://polite-ground-030dc3103.4.azurestaticapps.net/api/v1/openai/deployments/{model-name}/&lt;/A&gt;&lt;STRONG&gt;chat&lt;/STRONG&gt;/completions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and voilla you can use the openai api also in other places like powerautomate &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2024 16:59:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-02-26T16:59:00Z</dc:date>
    <item>
      <title>Using the Azure Open AI Proxy outside of a notebook</title>
      <link>https://community.fabric.microsoft.com/t5/Hack-Together/Using-the-Azure-Open-AI-Proxy-outside-of-a-notebook/m-p/3724628#M140</link>
      <description>&lt;P&gt;Some of you might want to use the Azure Open AI proxy outside of a notebook. Maybe in some custom code or in Powerautomate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's easy, if you know the url...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) use the correct url to post a chat completion request:&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://polite-ground-030dc3103.4.azurestaticapps.net/api/v1/openai/deployments/gpt-35-turbo-16k/chat/completions" target="_blank" rel="noopener"&gt;https://polite-ground-030dc3103.4.azurestaticapps.net/api/v1/openai/deployments/gpt-35-turbo-16k/chat/completions&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;replace the model name with whatever one you want to play with. Careful, the /chat/ part of the url is paramount&lt;/P&gt;&lt;P&gt;2) add a header to the request:&amp;nbsp;&lt;SPAN&gt;api-key&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3) add your api key as the header value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4) construct the body using the messages syntax. a good example can be found here:&amp;nbsp;&lt;A href="https://microsoft.github.io/azure-openai-service-proxy/raw-api-access/chat-completion/" target="_blank" rel="noopener"&gt;https://microsoft.github.io/azure-openai-service-proxy/raw-api-access/chat-completion/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;careful! the last link has an outdated url structure. make sure to use&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://polite-ground-030dc3103.4.azurestaticapps.net/api/v1/openai/deployments/{model-name}/" target="_blank" rel="noopener"&gt;https://polite-ground-030dc3103.4.azurestaticapps.net/api/v1/openai/deployments/{model-name}/&lt;/A&gt;&lt;STRONG&gt;chat&lt;/STRONG&gt;/completions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and voilla you can use the openai api also in other places like powerautomate &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 16:59:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Hack-Together/Using-the-Azure-Open-AI-Proxy-outside-of-a-notebook/m-p/3724628#M140</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-26T16:59:00Z</dc:date>
    </item>
  </channel>
</rss>

