Skip to content

Refactor CLI to include system prompt in request methods and tests #51

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

Merged
merged 1 commit into from
Sep 1, 2024

Conversation

catatsuy
Copy link
Owner

@catatsuy catatsuy commented Sep 1, 2024

This pull request introduces a new systemPrompt parameter to the CLI tool, which allows for more detailed and context-specific translations. The changes span several functions and include updates to both the implementation and the tests.

Implementation Changes:

  • internal/cli/cli.go:
    • Added systemPrompt parameter to the Translator interface's request method.
    • Updated the Run method to handle the new systemPrompt parameter. [1] [2] [3] [4]
    • Modified the multiRequest method to include systemPrompt. [1] [2] [3]
    • Adjusted the request method in the translator struct to handle the systemPrompt and construct the payload accordingly. [1] [2]

Test Updates:

  • internal/cli/cli_test.go:

    • Updated mock translator and tests to accommodate the new systemPrompt parameter.
  • internal/cli/export_test.go:

    • Modified the MockTranslator and related functions to include systemPrompt.

@catatsuy catatsuy merged commit 989a99b into main Sep 1, 2024
5 checks passed
@catatsuy catatsuy deleted the feature-request-system-prompt branch September 1, 2024 01:37
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.

1 participant