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

[BUG] Chat History Defaults to Spanish Despite English Language Selected #240

Open
marcwojcik opened this issue Apr 11, 2024 · 4 comments
Open
Labels
bug Something isn't working good first issue Good for newcomers identified Indicates that the root cause of the bug has been determined.

Comments

@marcwojcik
Copy link

Describe the bug

The Bedrock-Claude-Chat application is displaying the chat history in Spanish, despite the user selecting a different language (e.g., English) in the Menu settings.

To Reproduce

Open a new chat and the history will always come up default to Spanish.

Screenshots

2024-04-11_17-20-55

Additional context

Add any other context about the problem here.

@statefb statefb added bug Something isn't working identified Indicates that the root cause of the bug has been determined. labels Apr 16, 2024
@statefb
Copy link
Contributor

statefb commented Apr 16, 2024

Possible solution

Pass language explicitly to:

  • GET /conversation/{conversation_id}/proposed-title endpoint
  • propose_conversation_title

@statefb
Copy link
Contributor

statefb commented Apr 17, 2024

PR merged but leave the issue still open because enough evidence was not provided on #247. Please leave your comment below if you have still same issue.

@josephedward
Copy link
Contributor

I got this error, even though my backend had the update (ie "- Title must be in the same language as the conversation.")

Maybe interpolate a preferred/default language in the parameter for the prompt string? ie

def propose_conversation_title(
    user_id: str,
    conversation_id: str,
    language: str,
    model: Literal[
        "claude-instant-v1",
        "claude-v2",
        "claude-v3-opus",
        "claude-v3-sonnet",
        "claude-v3-haiku",
    ] = "claude-v3-haiku",
) -> str:
    PROMPT = f"""Reading the conversation above, what is the appropriate title for the conversation? When answering the title, please follow the rules below:
<rules>
- Title must be in {language}.
- Title length must be from 15 to 20 characters.
- Prefer more specific title than general. Your title should always be distinct from others.
- Return the conversation title only. DO NOT include any strings other than the title.
</rules>
"""

@statefb
Copy link
Contributor

statefb commented May 2, 2024

@josephedward I believe your proposal is one of the simplest and effective ways to address the root cause. It would be greatly appreciated if you could take the trouble to create a Pull Request. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers identified Indicates that the root cause of the bug has been determined.
Projects
None yet
Development

No branches or pull requests

3 participants