refactor: add type hint to generator function in structured output parser

- Enhanced the generator function with a return type hint for improved type safety and clarity.
- Maintained existing functionality while improving code readability and maintainability.
pull/21565/head
Yeuoly 11 months ago
parent ade1e8a120
commit 655cfd25cf

@ -143,7 +143,7 @@ def invoke_llm_with_structured_output(
)
else:
def generator():
def generator() -> Generator[LLMStructuredOutput, None, None]:
result_text = ""
for event in llm_result:
if isinstance(event, LLMResultChunk):

Loading…
Cancel
Save