Conversation
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Fixed
Show fixed
Hide fixed
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces the initial implementation of the microsoft-agents-hosting-fastapi library, providing FastAPI-based hosting capabilities for Microsoft Agents with robust streaming, citation handling, and authorization features.
Key changes include:
- Implementation of streaming response functionality with support for Teams and Direct Line channels
- JWT authorization middleware and dependency injection patterns for FastAPI
- Channel service API endpoints and cloud adapter for processing agent activities
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Package configuration with FastAPI dependency |
| pyproject.toml | Project metadata and build configuration |
| readme.md | Documentation with usage examples |
| streaming_response.py | Core streaming functionality for chunked responses |
| citation.py & citation_util.py | Citation handling utilities and data structures |
| jwt_authorization_middleware.py | JWT authentication middleware for FastAPI |
| cloud_adapter.py | HTTP adapter for processing agent activities |
| channel_service_route_table.py | API route definitions for channel service |
| agent_http_adapter.py | Protocol definition for HTTP adapters |
| _start_agent_process.py | Function to bootstrap agent processes |
| init.py files | Package structure and exports |
| LICENSE | MIT license file |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Outdated
Show resolved
Hide resolved
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Outdated
Show resolved
Hide resolved
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Outdated
Show resolved
Hide resolved
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Outdated
Show resolved
Hide resolved
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Outdated
Show resolved
Hide resolved
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Outdated
Show resolved
Hide resolved
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Outdated
Show resolved
Hide resolved
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Show resolved
Hide resolved
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Outdated
Show resolved
Hide resolved
...-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/app/streaming/streaming_response.py
Outdated
Show resolved
Hide resolved
…rough an exception Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…sting/fastapi/app/streaming/streaming_response.py Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Outdated
Show resolved
Hide resolved
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Outdated
Show resolved
Hide resolved
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Outdated
Show resolved
Hide resolved
...soft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/jwt_authorization_middleware.py
Outdated
Show resolved
Hide resolved
…into users/axsuarez/fast-api-integration
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
libraries/microsoft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/__init__.py
Show resolved
Hide resolved
…into users/axsuarez/fast-api-integration
This reverts commit 3024b7c.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 28 out of 28 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
libraries/microsoft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/__init__.py
Outdated
Show resolved
Hide resolved
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/typing_indicator.py
Outdated
Show resolved
Hide resolved
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/typing_indicator.py
Outdated
Show resolved
Hide resolved
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/agent_application.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/typing_indicator.py
Outdated
Show resolved
Hide resolved
This reverts commit e7f0cad.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
libraries/microsoft-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/app/streaming/streaming_response.py:1
- The magic number 477 should be extracted to a named constant (e.g.,
MAX_CITATION_ABSTRACT_LENGTH) to improve code readability and maintainability.
# Copyright (c) Microsoft Corporation. All rights reserved.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/app/streaming/streaming_response.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ed merge conflicts
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...-agents-hosting-fastapi/microsoft_agents/hosting/fastapi/app/streaming/streaming_response.py
Outdated
Show resolved
Hide resolved
…sting/fastapi/app/streaming/streaming_response.py Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request introduces the initial implementation of the
microsoft-agents-hosting-fastapilibrary, providing FastAPI-based hosting capabilities for Microsoft Agents. The changes establish the package structure, core streaming response functionality, and utilities for handling citations and feedback in conversational AI scenarios.Key additions and features include:
Core Streaming and Citation Functionality:
StreamingResponseclass, enabling chunked and interactive streaming of messages, citations, and feedback to clients, with support for Teams and Direct Line channels (streaming_response.py).Citationdataclass andCitationUtilfor formatting and extracting citations from text (citation.py,citation_util.py). [1] [2]FastAPI Hosting Adapters and Process Management:
AgentHttpAdapterprotocol for handling HTTP requests to agents, and provides thestart_agent_processasync function to bootstrap agent processes with adapters (agent_http_adapter.py,_start_agent_process.py). [1] [2]Package Structure and Metadata:
__init__.pyfiles and sets up exports for all major components (__init__.pyin relevant directories). [1] [2] [3] [4] [5]These changes lay the groundwork for FastAPI-based hosting of Microsoft Agents with robust streaming and citation capabilities.