Skip to content

AWS: ignore chain of thought for agent speech#1603

Open
jayeshp19 wants to merge 1 commit into0.xfrom
ignore-cot-aws
Open

AWS: ignore chain of thought for agent speech#1603
jayeshp19 wants to merge 1 commit into0.xfrom
ignore-cot-aws

Conversation

@jayeshp19
Copy link
Contributor

@jayeshp19 jayeshp19 commented Mar 5, 2025

fixes: #1599

@changeset-bot
Copy link

changeset-bot bot commented Mar 5, 2025

🦋 Changeset detected

Latest commit: ea43888

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-plugins-aws Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jayeshp19 jayeshp19 requested review from a team and davidzhao March 5, 2025 15:02
elif "contentBlockStop" in chunk:
if self._text:
# ignore chain of thought
text = re.sub(r"<thinking>.*?</thinking>", "", self._text)
Copy link
Member

Choose a reason for hiding this comment

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

should this be AWS specific? or a general thing we should do in the LLM superclass? maybe an option: remove_thinking?

also is it guaranteed the chain of thought appears in the same chunk?

Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep the thinking tokens (in v1.0 at least).

It should be the responsability of the tts_node to remove those tokens.

Tho not against merging this PR for main as a temporary solution

Copy link
Member

Choose a reason for hiding this comment

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

we need a util to strip tags in a streaming fashion

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.

tool calling with aws nova models in bedrock issue

3 participants