-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Lots of HTML output #1024
Comments
Hey @motaatmo thanks for the issue. What context are you running this code in? Jupyter? ipython at the shell? The standard python repl? |
I called the script using standard python (non-interactive, from the
command line)
Hudson Cooper ***@***.***> schrieb am Mo., 16. Sept. 2024,
21:18:
… Hey @motaatmo <https://github.com/motaatmo> thanks for the issue. What
context are you running this code in? Jupyter? ipython at the shell? The
standard python repl?
—
Reply to this email directly, view it on GitHub
<#1024 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACO5DS2TBOIAMDQOQ722QYDZW4VJNAVCNFSM6AAAAABOHSFLNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJTG4ZDKMZYHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Got it. By default, models are quite verbose (and the experience is optimized for Jupyter notebooks -- the command line needs some love...). For now, you should be able instantiate the model with model = guidance.models.OpenAI(
"gpt-4o-mini-2024-07-18",
api_key=(
"XXXXXXXXXXXXXXXXXXXX"
),
echo=False,
) |
Works perfectly, thank you!
…On Mon, Sep 16, 2024 at 9:54 PM Hudson Cooper ***@***.***> wrote:
Got it. By default, models are quite verbose (and the experience is
optimized for Jupyter notebooks -- the command line needs some love...).
For now, you should be able instantiate the model with echo=False to
suppress this verbose output:
model = guidance.models.OpenAI(
"gpt-4o-mini-2024-07-18",
api_key=(
"XXXXXXXXXXXXXXXXXXXX"
),
echo=False,
)
—
Reply to this email directly, view it on GitHub
<#1024 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACO5DS54RA3BTHIWONJNENLZW4ZO7AVCNFSM6AAAAABOHSFLNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJTG44TCOJZGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
My code: @guidance
def main():
Check if this script is being run as the main programif name == "main": Output:
<|im_start|>assistant @hudson-ai ,Iam still getting the HTML code in output even I add echo=False also. |
@ramchennuru sorry that you're getting unexpected output! I'm not currently able to reproduce on my end. I see the output of your print statement (slightly different response, but basically the same):
Can you paste a snippet here of the HTML you are seeing? It might help dig into the cause. Also, are you able to test your code using a different model (e.g. just straight OpenAI or a local model)? Doing so might help determine whether the problem is with the AzureOpenAI class itself or if something more is going on. Thanks :) |
I can confirm the same <|im_start|> style output when using the OpenAI models directly (both gpt-4o-mini and gpt-4o) |
Hey @rnybergh, thanks for chiming in! The original issue concerned HTML that was being printed as a side effect of model generation, not HTML content in the model's output itself (what you see when you do The @ramchennuru can you confirm whether the role tags are what you were referring to when you said you were getting HTML in your output? If either of you have expectations about what model output should look like that disagree with what you are seeing here, I would recommend opening a separate "Feature Request" issue that includes some examples of what you'd like to see instead. Thank you! |
The bug
When calling guidance using an openai model (GPT4o-mini; I didn't try other models yet), lots of output are created, that clutter my own output. It looks HTMLish:
To Reproduce
System info (please complete the following information):
The text was updated successfully, but these errors were encountered: