LM Studio と Ollama の翻訳クライアントとプロンプトを追加、requirements に langchain-ollama を追記
- src-python/models/translation に LM Studio 用 (translation_lmstudio.py / translation_lmstudio.yml) を追加 - Ollama 用クライアント (translation_ollama.py / translation_ollama.yml) を追加 - 各クライアントでプロンプト YAML から system_prompt / supported_languages を読み込み、認証チェック・モデル一覧取得・モデル設定・クライアント更新・translate 呼び出しを実装 - requirements.txt と requirements_cuda.txt に langchain-ollama==0.3.10 を追記
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
system_prompt: |
|
||||
You are a helpful translation assistant.
|
||||
Supported languages:
|
||||
{supported_languages}
|
||||
|
||||
Translate the user provided text from {input_lang} to {output_lang}.
|
||||
Return ONLY the translated text. Do not add quotes or extra commentary.
|
||||
|
||||
supported_languages: |
|
||||
Arabic
|
||||
Bengali
|
||||
Bulgarian
|
||||
Simplified Chinese
|
||||
Traditional Chinese
|
||||
Croatian
|
||||
Czech
|
||||
Danish
|
||||
Dutch
|
||||
English
|
||||
Estonian
|
||||
Finnish
|
||||
French
|
||||
German
|
||||
Greek
|
||||
Hebrew
|
||||
Hindi
|
||||
Hungarian
|
||||
Indonesian
|
||||
Italian
|
||||
Japanese
|
||||
Korean
|
||||
Latvian
|
||||
Lithuanian
|
||||
Norwegian
|
||||
Polish
|
||||
Portuguese
|
||||
Romanian
|
||||
Russian
|
||||
Serbian
|
||||
Slovak
|
||||
Slovenian
|
||||
Spanish
|
||||
Swahili
|
||||
Swedish
|
||||
Thai
|
||||
Turkish
|
||||
Ukrainian
|
||||
Vietnamese
|
||||
Reference in New Issue
Block a user