Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for stream_chat (0.05 seconds)

  1. docs_src/server_sent_events/tutorial005_py310.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Prompt(BaseModel):
        text: str
    
    
    @app.post("/chat/stream", response_class=EventSourceResponse)
    async def stream_chat(prompt: Prompt) -> AsyncIterable[ServerSentEvent]:
        words = prompt.text.split()
        for word in words:
            yield ServerSentEvent(data=word, event="token")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 09:21:52 GMT 2026
    - 528 bytes
    - Click Count (0)
  2. src/main/java/org/codelibs/fess/llm/LlmClient.java

         * @param request the chat request containing messages and parameters
         * @param callback the callback to receive streaming chunks
         * @throws LlmException if an error occurs during the request
         */
        void streamChat(LlmChatRequest request, LlmStreamCallback callback);
    
        /**
         * Returns the name of this LLM client.
         *
         * @return the client name (e.g., "ollama", "openai", "gemini")
         */
        String getName();
    
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Mar 19 07:04:54 GMT 2026
    - 7.3K bytes
    - Click Count (0)
Back to Top