59
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

背景

MacのコンソールからでもChatGPTを利用でるようになる,
aichat というパッケージがあったので導入してみた.
 

導入

homebrew経由でaichatを入れました.

初期設定

 
最初に aichat と打ち込むと初期設定が行われる.
スクリーンショット 2023-06-25 9.18.28.png

Openai API Keyがない場合は下記から作成.

これで完了です.

使ってみる

README をもとにやってみます.

modelの変更

.model でモデルの変更ができる.

みる感じ下記の4通り.

  • gpt-4
  • gpt-4-32k
  • gpt-3.5-turbo
  • gpt-3.5-turbo-16k

通常の対話

aichat と打つと質問できる.
スクリーンショット 2023-06-25 9.30.11.png

プロンプトで対話

.prompt を用いることでできる.
image.png

.clear role でもとに戻ることができる.
image.png

ロールで対話

プロンプトは一時的だが,
ロールを設定することでいつでも使えるようになる.

まずは .info でroles.yamlファイルの場所を確認する.

スクリーンショット 2023-06-25 16.28.46.png

なかったので roles.yamlファイル を作成して中身を埋める.
下記にしてみた.
https://github.com/sigoden/aichat/wiki/Role-Examples#code-generator

image.png

.role coder で設定を利用できる.

image.png

出力させてみる.

image.png

image.png

すげえ...😭

翻訳もやってみる.

image.png

やるなあ...

会話する

.conversation コマンドでできる.

image.png

.clear conversation で会話モードを止めることができる.

常に会話モードにしたい場合は,
config.conversation_firsttrue にすれば良い.

まとめ

結構便利ですね!
roleをうまく使い分けながら仕事に取り込んでいればめっちゃ良さそう...!

59
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
59
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?