Skip to content

Commit

Permalink
feat(lib): add terms option
Browse files Browse the repository at this point in the history
  • Loading branch information
snowyu committed Aug 31, 2024
1 parent 762da8d commit 714e06c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/translator.ai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ input: # the input items
- file
# the content to be translated
- content
# The terms
- terms
# Required, Target language
- target: {required: true}
output:
Expand Down Expand Up @@ -66,6 +68,11 @@ parameters:
lang: "?=this.$detectLang(content.slice(0, 120))"
- user: |-
Output high-quality translation result before the completion delimiter "{{completion_delimiter}}".
{% if terms %}
Translation according to terms:
{{terms}}
{% endif %}
{%- if content.length > 100 -%}
Translate the following content {% if lang %}from {{lang}} {% endif %}to {{target}}.
---
Expand Down

0 comments on commit 714e06c

Please sign in to comment.