dspy.streaming.StreamListener

dspy.streaming.StreamListener

스트리밍 출력을 받아서 청크(chunk) 이벤트로 내보내는 리스너예요. dspy.streamify와 함께 써서 예측 결과를 실시간으로 흘려보낼 수 있어요.

출처: 문서

본문

dspy.streaming.StreamListener는 스트리밍 이벤트를 처리하는 리스너예요. 아래 레퍼런스는 소스 docstring에서 자동 생성돼요.

::: dspy.streaming.StreamListener
    handler: python
    options:
        members:
            - finalize
            - flush
            - receive
        show_source: true
        show_root_heading: true
        heading_level: 2
        docstring_style: google
        show_root_full_path: true
        show_object_full_path: false
        separate_signature: false
        inherited_members: true

더 알아보기 (Learn more)