Skip to content

Conversation

@pamelafox
Copy link
Collaborator

@pamelafox pamelafox commented May 28, 2025

Purpose

This pull request includes updates to the Azure infrastructure configuration, refactors the OpenAI client integration in the Quart app, and simplifies the chat response streaming logic. Additionally, it includes a minor fix in the front-end template for handling response content.

Infrastructure Updates:

  • Updated aiServicesEndpoint in infra/main.bicep to remove the /models suffix in both the module definition and the output AZURE_INFERENCE_ENDPOINT. This ensures consistency with the new endpoint format. [1] [2]

OpenAI Client Refactoring:

  • Replaced the AsyncOpenAI client with AsyncAzureOpenAI in src/quartapp/chat.py. This change removes the custom TokenBasedAuth class and simplifies authentication by directly using the Azure AD token provider. The API version was also updated to 2025-04-01-preview. [1] [2]

Chat Response Streaming Simplification:

  • Simplified the logic in async def response_stream() by removing handling for <think> tags and directly yielding the JSON representation of the model's response updates.

Front-End Template Fix:

  • Adjusted the condition in src/quartapp/templates/index.html to ensure the loading bar is hidden only when event.delta.content is present.

Does this introduce a breaking change?

[ ] Yes
[ ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

@pamelafox pamelafox merged commit d6ade4d into main Jun 2, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants