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

Changes to quiet mode #9

Merged
merged 4 commits into from
Sep 10, 2024
Merged

Changes to quiet mode #9

merged 4 commits into from
Sep 10, 2024

Conversation

jcheng5
Copy link
Collaborator

@jcheng5 jcheng5 commented Sep 9, 2024

  • Change quiet = TRUE to echo = FALSE
  • Default to echo = FALSE (i.e. quiet by default)
  • stream, chat_async, and stream_async never echo
  • Add tests for echoing behavior
  • Changed README examples from single code block showing prompt + code, and output, to one code block for code and one code block for output, for easier copy/pasting

@jcheng5 jcheng5 marked this pull request as draft September 9, 2024 19:50
@jcheng5
Copy link
Collaborator Author

jcheng5 commented Sep 9, 2024

Not to be merged until streaming branch is merged, and this branch is rebased against it

@jcheng5 jcheng5 marked this pull request as ready for review September 10, 2024 16:28
@jcheng5 jcheng5 requested a review from hadley September 10, 2024 16:28
@@ -14,7 +14,9 @@ NULL
#' not supply this directly, but instead set the `OPENAI_API_KEY` environment
#' variable.
#' @param model The model to use for the chat; defaults to GPT-4o mini.
#' @param quiet If `TRUE` does not print output as its received.
#' @param echo If `TRUE`, the `chat()` method streams the response to stdout by
Copy link
Member

Choose a reason for hiding this comment

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

Since it only affects chat() it seems weird to make it a class property to me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought so too at first, but for interactive uses (the only place where this will be useful) it seemed annoying to have to remember to do echo=TRUE every time?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But I don't feel strongly--happy to take it out if you prefer

@jcheng5 jcheng5 merged commit df48d31 into tidyverse:main Sep 10, 2024
10 checks passed
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.

2 participants