Skip to content

Conversation

@declark1
Copy link
Collaborator

@declark1 declark1 commented Sep 24, 2025

Changes:

  • Refactor ToolCall changes merged in Update ToolCall #505
    • Serde wasn't able to correctly identify the ToolCall enum variant using #[serde(untagged) as not all fields are populated for tool call chunks
    • Drop ToolCall enum and separate FunctionToolCall and CustomToolCall variants in favor of single ToolCall struct with optional function and custom fields, so that it can be used for both types.
  • Update Message::text(), add Message::has_content() convenience methods
  • Add chat completions support for spawning text chat detector tasks
  • Add merge_tools_calls() helper to build tool calls from chat completion chunks containing tool call chunks
  • Add merge_content() helper to build content from chat completion chunks containing content chunks
  • Update no content warning logic and message
    • Dropped ". Output detection was not executed" from warning message as text_chat detections are still executed for this scenario.
  • Add text_chat_detectors_with_tools() integration tests for chat completions unary and streaming

Closes #305

@declark1 declark1 force-pushed the chat-completions-text-chat-detectors branch 4 times, most recently from f1b2a4f to d77bf6e Compare October 2, 2025 18:46
@declark1 declark1 force-pushed the chat-completions-text-chat-detectors branch from 26c4171 to db8136a Compare October 3, 2025 20:56
@declark1 declark1 force-pushed the chat-completions-text-chat-detectors branch 4 times, most recently from f98edc6 to c94e367 Compare October 14, 2025 17:40
Signed-off-by: declark1 <[email protected]>
Signed-off-by: declark1 <[email protected]>
… test for chat completions streaming, impl FromIterator for DetectorParams

Signed-off-by: declark1 <[email protected]>
Signed-off-by: declark1 <[email protected]>
Signed-off-by: declark1 <[email protected]>
@declark1 declark1 force-pushed the chat-completions-text-chat-detectors branch from ac7af75 to 206565d Compare October 16, 2025 19:10
@declark1 declark1 marked this pull request as ready for review October 16, 2025 19:19
@declark1 declark1 marked this pull request as draft October 16, 2025 19:40
…ere is content text, add Message::has_content

Signed-off-by: declark1 <[email protected]>
@declark1 declark1 force-pushed the chat-completions-text-chat-detectors branch from d34ab1a to ef0a309 Compare October 16, 2025 20:29
@declark1 declark1 marked this pull request as ready for review October 16, 2025 20:37
Copy link
Collaborator

@mdevino mdevino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@declark1 declark1 merged commit 8dc485a into foundation-model-stack:main Oct 17, 2025
2 checks passed
@declark1 declark1 deleted the chat-completions-text-chat-detectors branch October 17, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add chat detection ability for detections on chat completions

2 participants