Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Claude no-arg tool calling in streaming mode #229

Merged
merged 2 commits into from
Dec 18, 2024
Merged

Conversation

jcheng5
Copy link
Collaborator

@jcheng5 jcheng5 commented Dec 18, 2024

Closes #228

@jcheng5
Copy link
Collaborator Author

jcheng5 commented Dec 18, 2024

The failing CI tests are due to the Gemini streaming issue (fixed in #201) and the Claude output token accounting issue (fixed incidentally in #226).

@@ -52,7 +52,7 @@ test_tools_simple <- function(chat_fun) {
chat <- chat_fun(system_prompt = "Be very terse, not even punctuation.")
chat$register_tool(tool(function() "2024-01-01", "Return the current date"))

result <- chat$chat("What's the current date in YMD format?")
result <- chat$chat("What's the current date in YMD format?", echo = TRUE)
Copy link
Member

Choose a reason for hiding this comment

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

Did you mean to change this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes--this turns on streaming, which makes the test fail without this fix and pass with this fix.

I know this also makes Gemini fail, until we merge the other PR.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, gotcha. Let's merge and then fix gemini ASAP.

@hadley hadley merged commit 678b9f8 into main Dec 18, 2024
10 of 11 checks passed
@hadley hadley deleted the claude-no-args branch December 18, 2024 18:43
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.

Claude tool calling fails in streaming mode when no args are given
2 participants