Skip to content

Commit

Permalink
コマンドラインで使えるaiスクリプト添付
Browse files Browse the repository at this point in the history
  • Loading branch information
tanep3 committed Oct 7, 2024
1 parent dce5708 commit 3992b6c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions ai.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# 生成AIをコマンドで動かすスクリプト

# 引数がない場合、ヘルプメッセージを表示
if [ -z $1 ]; then
echo "使用方法: $0 '質問'"
exit 1
fi

curl -X POST -H "Content-Type: application/json" --no-buffer -d "{\"system_prompt\": \"50文字程度に要約して回答してください。\", \"user_input\": \"$1\", \"max_tokens\": 512, \"stream\": true}" http://127.0.0.1:5005/generate

echo
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
- MAX_INSTANCES=1 # 同時にリクエストを受け付ける数(多いとメモリを食います)
- NUM_WORKERS=1 # ワーカー数(基本このまま)
- PORT=5005 # Flaskアプリケーションのポート(ここは変更しないで下さい。)
- TITLE="たねちゃっと" # このシステムの見出し
- TITLE=たねちゃっと # このシステムの見出し
restart: always # PC再起動後に自動でコンテナを再起動
volumes:
- /LLMのggufファイルを置いているパス:/app/model # モデルファイルをコンテナにマウント
Expand Down

0 comments on commit 3992b6c

Please sign in to comment.