llama.cpp serverを使って、入力文字列を翻訳するスクリプト。
使用方法
python LLM_Translator.py
[-h]
[-i 入力ファイルパス] [-o 出力ファイルパス] [-p プロンプトファイルパス] [-d 辞書ファイルパス]
[-u llama.cpp serverのURL] [--quiet] [--no-outfile] [--include-input] [--min-context-count 最小保持ターン数]
llama.cpp serverを使って、入力文字列を翻訳するスクリプト。
使用方法
python LLM_Translator.py
[-h]
[-i 入力ファイルパス] [-o 出力ファイルパス] [-p プロンプトファイルパス] [-d 辞書ファイルパス]
[-u llama.cpp serverのURL] [--quiet] [--no-outfile] [--include-input] [--min-context-count 最小保持ターン数]
| import aiohttp | |
| import asyncio | |
| import json | |
| import mediawiki | |
| import re | |
| import datetime | |
| """ | |
| reasoning LLMにWikipediaを検索させてからユーザーに回答させるAgentのサンプル実装。 | |
| <think>タグ内で検索コマンドが生成されると、その時点で推論を中断し、function callingを行い、Wikipediaを検索し、検索結果を<think>タグ内に埋め込み、推論を続行する。 |
| <# | |
| This script customizes the PowerShell command line to detect when an entered command is not found. | |
| If a command is not recognized, it automatically rewrites the line to call a LLM assistant for help. | |
| To run this script, execute it in the console as follows: | |
| . .\copilot_shell.ps1 | |
| このスクリプトは、PowerShellのコマンドラインをカスタマイズし、入力されたコマンドが見つからない場合に検出します。 | |
| コマンドが見つからない場合、自動的にLLMアシスタントに問い合わせる形に行を書き換えます。 | |
| コンソールで | |
| . .\copilot_shell.ps1 |
| import os | |
| import random | |
| import sys | |
| import argparse | |
| import tempfile | |
| import shutil | |
| import threading | |
| import time | |
| import json | |
| import qrcode |