weiqingy commented on code in PR #922:
URL: https://github.com/apache/flink-agents/pull/922#discussion_r3840426580


##########
python/flink_agents/api/chat_models/chat_model.py:
##########
@@ -216,7 +216,10 @@ def _extract_reasoning(
                 reasoning_chunks.extend(m.strip() for m in matches if 
m.strip())
                 cleaned = pat.sub("", cleaned)
 
-        reasoning = "\n\n".join(reasoning_chunks) if reasoning_chunks else None
+        if not reasoning_chunks:
+            return content, None

Review Comment:
   That one is on the shared Python base, so watsonx Python inherits it. The 
Java side has its own copy though, and `WatsonxChatModelConnection.java:392` 
still returns `content`, so the connector now differs by language: 
`<think></think>Answer` gives `Answer` on Python and `<think></think>Answer` on 
Java. I ran both at `4e03d50f`.
   
   Does the same one-line change work there? And would an empty-block case fit 
alongside the assertions in `testExtractReasoning`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to