8000 GitHub - aipx-proto/fluent-code-gen: Generate Fluent 2 UI based on public documentation
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

aipx-proto/fluent-code-gen

Repository files navigation

Setups

Prerequisite

Entra ID

Entra ID -> App registration -> SPA Redirect URI: add http://localhost:5200

OpenAI API Management service

Follow this documentation to create the API managment

<policies>
  <inbound>
    <set-backend-service id="apim-generated-policy" backend-id="{{will_be_auto_populated_when_creating_the_endpoint}}" />
    <!-- validate-azure-ad-token rule checks if the client sent a valid Entra ID token. Customize to meet your authorization goals.
    Ref: https://learn.microsoft.com/en-us/azure/api-management/validate-azure-ad-token-policy -->
    <validate-azure-ad-token tenant-id="{{replace_with_your_tenant_id}}">
      <client-application-ids>
        <application-id>{{replace_with_your_client_id}}</application-id>
      </client-application-ids>
    </validate-azure-ad-token>
    <!-- authentication-managed-identity rule replaces the Entra ID token in the Authorization header with a managed identity token. -->
    <authentication-managed-identity resource="https://cognitiveservices.azure.com/" />
    <cors>
      <allowed-origins>
        <origin>*</origin>
      </allowed-origins>
      <allowed-methods>
        <method>*</method>
      </allowed-methods>
      <allowed-headers>
        <header>*</header>
      </allowed-headers>
      <expose-headers>
        <header>*</header>
      </expose-headers>
    </cors>
    <base />
  </inbound>
  <backend>
    <base />
  </backend>
  <outbound>
    <base />
  </outbound>
  <on-error>
    <base />
  </on-error>
</policies>

Fast Transcripotion API Management service

Make sure to enable HTTP/2 protocol support in the API Management. Search for protocol to find the relevant settting.

<policies>
  <inbound>
    <validate-azure-ad-token tenant-id="{{replace_with_your_tenant_id}}">
      <client-application-ids>
        <application-id>{{replace_with_your_client_id}}</application-id>
      </client-application-ids>
    </validate-azure-ad-token>
    <set-header name="Ocp-Apim-Subscription-Key" exists-action="override">
      <value>{{EastUSSpeechKey}}</value>
    </set-header>
    <cors>
      <allowed-origins>
        <origin>*</origin>
      </allowed-origins>
      <allowed-methods>
        <method>GET</method>
        <method>POST</method>
      </allowed-methods>
      <allowed-headers>
        <header>*</header>
      </allowed-headers>
    </cors>
    <base />
  </inbound>
  <backend>
    <base />
  </backend>
  <outbound>
    <base />
  </outbound>
  <on-error>
    <base />
  </on-error>
</policies>

Project architecture

About

Generate Fluent 2 UI based on public documentation

Resources

Stars

Watchers

Forks

0