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

Add context and system message support for Claude #438

Merged
merged 4 commits into from
Dec 7, 2024

Conversation

cce
Copy link
Contributor

@cce cce commented Dec 7, 2024

this provides a few improvements for claude_translator.py:

  • --context_flag and --context_paragraph_limit support, based on chatgptapi_translator.py
  • system message support (when set in prompt template JSON)
  • ability to select between different Claude models (like --model claude-3-5-sonnet-20240620 vs --model claude-3-5-sonnet-20241022)

謝謝 for this great project! 我覺得 Claude 3.5 Sonnet 在文學翻譯方面比其他 translators 好 ... I have been trying different values like 0.8 temperature and 5-10 paragraphs of context, with pretty good results.

@cce cce changed the title Add context_flag and context_paragraph_limit support for Claude Add context and system message support for Claude Dec 7, 2024
@yihong0618
Copy link
Owner

will take a look tonight thanks

Copy link
Owner

@yihong0618 yihong0618 left a comment

Choose a reason for hiding this comment

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

LGTM

@yihong0618 yihong0618 merged commit b80f1ba into yihong0618:main Dec 7, 2024
2 checks passed
@cce cce deleted the claude-context branch December 9, 2024 01:45
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