Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 42 for sse (0.01 seconds)

  1. fastapi/sse.py

        Use as `response_class=EventSourceResponse` on a *path operation* that uses `yield`
        to enable Server Sent Events (SSE) responses.
    
        Works with **any HTTP method** (`GET`, `POST`, etc.), which makes it compatible
        with protocols like MCP that stream SSE over `POST`.
    
        The actual encoding logic lives in the FastAPI routing layer. This class
        serves mainly as a marker and sets the correct `Content-Type`.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 09:21:52 GMT 2026
    - 6.2K bytes
    - Click Count (0)
  2. src/main/java/org/codelibs/fess/api/chat/ChatApiManager.java

    import jakarta.servlet.FilterChain;
    import jakarta.servlet.ServletException;
    import jakarta.servlet.http.HttpServletRequest;
    import jakarta.servlet.http.HttpServletResponse;
    
    /**
     * API Manager for RAG chat endpoints with SSE streaming support.
     *
     * @author FessProject
     */
    public class ChatApiManager extends BaseApiManager {
    
        private static final Logger logger = LogManager.getLogger(ChatApiManager.class);
    
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Mar 26 06:06:55 GMT 2026
    - 25.8K bytes
    - Click Count (0)
  3. docs/en/docs/tutorial/server-sent-events.md

    ## SSE with POST { #sse-with-post }
    
    SSE works with **any HTTP method**, not just `GET`.
    
    This is useful for protocols like [MCP](https://modelcontextprotocol.io) that stream SSE over `POST`:
    
    {* ../../docs_src/server_sent_events/tutorial005_py310.py hl[14] *}
    
    ## Technical Details { #technical-details }
    
    FastAPI implements some SSE best practices out of the box.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 4.6K bytes
    - Click Count (0)
  4. docs/zh-hant/docs/tutorial/server-sent-events.md

    data: {"name": "Plumbus", "price": 32.99}
    
    ```
    
    SSE 常用於 AI 聊天串流、即時通知、日誌與可觀察性,以及其他由伺服器主動推送更新給用戶端的情境。
    
    /// tip
    
    如果你要串流二進位資料,例如影片或音訊,請參考進階指南:[串流資料](../advanced/stream-data.md)。
    
    ///
    
    ## 使用 FastAPI 串流 SSE { #stream-sse-with-fastapi }
    
    要在 FastAPI 中串流 SSE,請在你的路徑操作函式(path operation function)中使用 `yield`,並設定 `response_class=EventSourceResponse`。
    
    從 `fastapi.sse` 匯入 `EventSourceResponse`:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:33:04 GMT 2026
    - 4.6K bytes
    - Click Count (0)
  5. docs/zh/docs/tutorial/server-sent-events.md

    data: {"name": "Plumbus", "price": 32.99}
    
    ```
    
    SSE 常用于 AI 聊天流式输出、实时通知、日志与可观测性,以及其他服务器向客户端推送更新的场景。
    
    /// tip | 提示
    
    如果你想流式传输二进制数据(例如视频或音频),请查看高级指南:[流式传输数据](../advanced/stream-data.md)。
    
    ///
    
    ## 使用 FastAPI 流式传输 SSE { #stream-sse-with-fastapi }
    
    要在 FastAPI 中流式传输 SSE,在你的*路径操作函数*中使用 `yield`,并设置 `response_class=EventSourceResponse`。
    
    从 `fastapi.sse` 导入 `EventSourceResponse`:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:29:48 GMT 2026
    - 4.6K bytes
    - Click Count (0)
  6. docs/ko/docs/tutorial/stream-json-lines.md

    {* ../../docs_src/stream_json_lines/tutorial001_py310.py ln[33:36] hl[34] *}
    
    ## 서버 전송 이벤트(SSE) { #server-sent-events-sse }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:56:39 GMT 2026
    - 4.8K bytes
    - Click Count (0)
  7. fastapi/.agents/skills/fastapi/references/streaming.md

    ```
    
    ## Server-Sent Events (SSE)
    
    To stream Server-Sent Events, use `response_class=EventSourceResponse` and `yield` items from the endpoint.
    
    Plain objects are automatically JSON-serialized as `data:` fields, declare the return type so the serialization is done by Pydantic:
    
    ```python
    from collections.abc import AsyncIterable
    
    from fastapi import FastAPI
    from fastapi.sse import EventSourceResponse
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 10:05:57 GMT 2026
    - 2.5K bytes
    - Click Count (0)
  8. docs/ja/docs/tutorial/server-sent-events.md

    ## POST での SSE { #sse-with-post }
    
    SSE は `GET` だけでなく、**任意の HTTP メソッド**で動作します。
    
    これは、`POST` 上で SSE をストリーミングする [MCP](https://modelcontextprotocol.io) のようなプロトコルで有用です:
    
    {* ../../docs_src/server_sent_events/tutorial005_py310.py hl[14] *}
    
    ## 技術詳細 { #technical-details }
    
    FastAPI は SSE のいくつかのベストプラクティスを標準で実装しています。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:55:22 GMT 2026
    - 5.8K bytes
    - Click Count (0)
  9. docs/ko/docs/tutorial/server-sent-events.md

    ///
    
    ## FastAPI로 SSE 스트리밍 { #stream-sse-with-fastapi }
    
    FastAPI에서 SSE를 스트리밍하려면, 경로 처리 함수에서 `yield`를 사용하고 `response_class=EventSourceResponse`를 설정하세요.
    
    `EventSourceResponse`는 `fastapi.sse`에서 임포트합니다:
    
    {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *}
    
    각 `yield`된 항목은 JSON으로 인코딩되어 SSE 이벤트의 `data:` 필드로 전송됩니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:56:39 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  10. docs/en/docs/tutorial/stream-json-lines.md

    {* ../../docs_src/stream_json_lines/tutorial001_py310.py ln[33:36] hl[34] *}
    
    ## Server-Sent Events (SSE) { #server-sent-events-sse }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 4.3K bytes
    - Click Count (0)
Back to Top