-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
enhance: add LLM translation support with openai compatible API #15697
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
Open
ybw2016v
wants to merge
9
commits into
misskey-dev:develop
Choose a base branch
from
ybw2016v:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9ef78e2
addLlmTrans
ybw2016v 9256eb3
lint
ybw2016v 1ae15be
Merge branch 'misskey-dev:develop' into develop
ybw2016v 789e0a0
Update CHANGELOG.md
ybw2016v 3a1cd81
Update packages/frontend/src/pages/admin/external-services.vue
ybw2016v 5e9756c
Update CHANGELOG.md
ybw2016v 42f8462
types
ybw2016v e1a9193
Merge branch 'develop' of github.com:ybw2016v/misskey into develop
ybw2016v b6d2f02
Merge branch 'develop' into develop
ybw2016v File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
36 changes: 36 additions & 0 deletions
36
packages/backend/migration/1740989976502-addLlmTranslatorSupport.js
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: syuilo and misskey-project | ||
| * SPDX-License-Identifier: AGPL-3.0-only | ||
| */ | ||
|
|
||
| export class AddLlmTranslatorSupport1740989976502 { | ||
| name = 'AddLlmTranslatorSupport1740989976502' | ||
|
|
||
| async up(queryRunner) { | ||
| await queryRunner.query(`ALTER TABLE "meta" ADD "enableLlmTranslator" boolean NOT NULL DEFAULT false`); | ||
| await queryRunner.query(`ALTER TABLE "meta" ADD "enableLlmTranslatorRedisCache" boolean NOT NULL DEFAULT false`); | ||
| await queryRunner.query(`ALTER TABLE "meta" ADD "llmTranslatorRedisCacheTtl" integer NOT NULL DEFAULT '2880'`); | ||
| await queryRunner.query(`ALTER TABLE "meta" ADD "llmTranslatorBaseUrl" character varying(1024)`); | ||
| await queryRunner.query(`ALTER TABLE "meta" ADD "llmTranslatorApiKey" character varying(1024)`); | ||
| await queryRunner.query(`ALTER TABLE "meta" ADD "llmTranslatorModel" character varying(1024)`); | ||
| await queryRunner.query(`ALTER TABLE "meta" ADD "llmTranslatorTemperature" real`); | ||
| await queryRunner.query(`ALTER TABLE "meta" ADD "llmTranslatorTopP" real`); | ||
| await queryRunner.query(`ALTER TABLE "meta" ADD "llmTranslatorMaxTokens" integer`); | ||
| await queryRunner.query(`ALTER TABLE "meta" ADD "llmTranslatorSysPrompt" character varying(1024)`); | ||
| await queryRunner.query(`ALTER TABLE "meta" ADD "llmTranslatorUserPrompt" character varying(1024)`); | ||
| } | ||
|
|
||
| async down(queryRunner) { | ||
| await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableLlmTranslator"`); | ||
| await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableLlmTranslatorRedisCache"`); | ||
| await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "llmTranslatorRedisCacheTtl"`); | ||
| await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "llmTranslatorBaseUrl"`); | ||
| await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "llmTranslatorApiKey"`); | ||
| await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "llmTranslatorModel"`); | ||
| await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "llmTranslatorTemperature"`); | ||
| await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "llmTranslatorTopP"`); | ||
| await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "llmTranslatorMaxTokens"`); | ||
| await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "llmTranslatorSysPrompt"`); | ||
| await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "llmTranslatorUserPrompt"`); | ||
| } | ||
| } |
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.