(stream: Iterator[Any])
| 7883 | |
| 7884 | @staticmethod |
| 7885 | def collect_completion(stream: Iterator[Any]) -> OpenAICompletion: |
| 7886 | iterator = iter(stream) |
| 7887 | while True: |
| 7888 | try: |
| 7889 | next(iterator) |
| 7890 | except StopIteration as stop: |
| 7891 | result = stop.value |
| 7892 | if result is None: |
| 7893 | raise RuntimeError("missing completion result") |
| 7894 | return cast(OpenAICompletion, result) |
| 7895 | |
| 7896 | @staticmethod |
| 7897 | def _tools_for_response_parser( |
nothing calls this directly
no outgoing calls
no test coverage detected