Spaces:
Paused
Paused
Add more debug logging to trace stream iteration
Browse files157 unmodified lines15815916016116216320 unmodified lines184185186187188189157 unmodified lineslogger.error(f"An OpenAI error occurred: {ex}")raise ModelServiceError(exception=ex) from exif delta_stream:chunk_count = 0for chunk in response:20 unmodified linesfunction_json = json.dumps(function_call, ensure_ascii=False)yield [Message(role=ASSISTANT, content=f'<tool_call>{function_json}</tool_call>')]logger.info(f'delta_stream message chunk: {chunk}')else:full_response = ''full_reasoning_content = ''157 unmodified lines15815916016116216316420 unmodified lines185186187188189190191157 unmodified lineslogger.error(f"An OpenAI error occurred: {ex}")raise ModelServiceError(exception=ex) from exlogger.info(f'delta_stream={delta_stream}, response={response}')if delta_stream:chunk_count = 0for chunk in response:20 unmodified linesfunction_json = json.dumps(function_call, ensure_ascii=False)yield [Message(role=ASSISTANT, content=f'<tool_call>{function_json}</tool_call>')]logger.info(f'delta_stream message chunk: {chunk}')logger.info(f'delta_stream finished, total chunks: {chunk_count}')else:full_response = ''full_reasoning_content = ''
llm/oai.py+2