enhance: add LLM translation support with openai compatible API#15697
Open
ybw2016v wants to merge 9 commits intomisskey-dev:developfrom
Open
enhance: add LLM translation support with openai compatible API#15697ybw2016v wants to merge 9 commits intomisskey-dev:developfrom
ybw2016v wants to merge 9 commits intomisskey-dev:developfrom
Conversation
Contributor
|
このPRによるapi.jsonの差分 差分はこちら--- base
+++ head
@@ -9993,6 +9993,63 @@
"items": {
"type": "string"
}
+ },
+ "enableLlmTranslator": {
+ "type": "boolean"
+ },
+ "enableLlmTranslatorRedisCache": {
+ "type": "boolean"
+ },
+ "llmTranslatorRedisCacheTtl": {
+ "type": "number"
+ },
+ "llmTranslatorBaseUrl": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "llmTranslatorApiKey": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "llmTranslatorModel": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "llmTranslatorTemperature": {
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "llmTranslatorTopP": {
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "llmTranslatorMaxTokens": {
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "llmTranslatorSysPrompt": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "llmTranslatorUserPrompt": {
+ "type": [
+ "string",
+ "null"
+ ]
}
},
"required": [
@@ -10108,7 +10165,18 @@
"urlPreviewUserAgent",
"urlPreviewSummaryProxyUrl",
"federation",
- "federationHosts"
+ "federationHosts",
+ "enableLlmTranslator",
+ "enableLlmTranslatorRedisCache",
+ "llmTranslatorRedisCacheTtl",
+ "llmTranslatorBaseUrl",
+ "llmTranslatorApiKey",
+ "llmTranslatorModel",
+ "llmTranslatorTemperature",
+ "llmTranslatorTopP",
+ "llmTranslatorMaxTokens",
+ "llmTranslatorSysPrompt",
+ "llmTranslatorUserPrompt"
]
}
}
@@ -17767,6 +17835,63 @@
"items": {
"type": "string"
}
+ },
+ "enableLlmTranslator": {
+ "type": "boolean"
+ },
+ "enableLlmTranslatorRedisCache": {
+ "type": "boolean"
+ },
+ "llmTranslatorRedisCacheTtl": {
+ "type": "integer"
+ },
+ "llmTranslatorBaseUrl": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "llmTranslatorApiKey": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "llmTranslatorModel": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "llmTranslatorTemperature": {
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "llmTranslatorTopP": {
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "llmTranslatorMaxTokens": {
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "llmTranslatorSysPrompt": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "llmTranslatorUserPrompt": {
+ "type": [
+ "string",
+ "null"
+ ]
}
}
} |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #15697 +/- ##
===========================================
+ Coverage 42.14% 44.12% +1.97%
===========================================
Files 1683 1687 +4
Lines 171284 177779 +6495
Branches 4027 4219 +192
===========================================
+ Hits 72195 78448 +6253
- Misses 98595 98836 +241
- Partials 494 495 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
KisaragiEffective
left a comment
There was a problem hiding this comment.
I don't see reasons to use LLM to translate user input over the old method... But I'd like to note some minor things:
Co-authored-by: Kisaragi <48310258+KisaragiEffective@users.noreply.github.com>
Co-authored-by: Kisaragi <48310258+KisaragiEffective@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add LLM translation support with openai compatible API
Why
#15696
Additional info (optional)
Checklist