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 some issues when parsing <message> tags in prompts #6270

Open
markwallace-microsoft opened this issue May 15, 2024 · 0 comments
Open

Fix some issues when parsing <message> tags in prompts #6270

markwallace-microsoft opened this issue May 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented May 15, 2024

Issue 1

<message role="system">You are a helpful assistant who knows all about cities in the USA</message>
<message role="user"><text>What is Washington?</text></message>
<message role="user"><text>What is Seattle?</text><text>What is New York?</text></message>

Multiple elements are not handled

{
    "messages": [
        {
            "content": "You are a helpful assistant who knows all about cities in the USA",
            "role": "system"
        },
        {
            "content": "What is Washington?",
            "role": "user"
        }
    ],
    "temperature": 1,
    "top_p": 1,
    "n": 1,
    "presence_penalty": 0,
    "frequency_penalty": 0,
    "model": "gpt-3.5-turbo-0125"
}    

Issue 2

<message role=user>Some random text <text>in tag text</text></message>

Text outside of the tag is lost

{
    "messages": [
        {
            "content": "You are a helpful assistant who knows all about cities in the USA",
            "role": "system"
        },
        {
            "content": "What is Washington?",
            "role": "user"
        },
        {
            "content": "in tag text",
            "role": "user"
        }
    ],
    "temperature": 1,
    "top_p": 1,
    "n": 1,
    "presence_penalty": 0,
    "frequency_penalty": 0,
    "model": "gpt-3.5-turbo-0125"
}

In both cases an exception should be thrown

@markwallace-microsoft markwallace-microsoft added bug Something isn't working triage and removed triage labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Sprint: Planned
Development

No branches or pull requests

1 participant