ChatGptを搭載したSwiss Armyナイフは、現代の開発者向けです! AI搭載のCLI Gitラッパー、ボイラープレートコードジェネレーター、コード検索エンジン、会話履歴マネージャーなどを提供します!

前提条件:
chat with documentsチャット機能を使用する場合は、Vectorデータベースを使用するPineconeアカウントを作成します。 brew tap mindflowai/homebrew-mindflow && brew install mindflow
pip install mindflow
pip install -e path/to/mindflow
mf loginを実行します: mf configを実行し、GPT 3.5ターボ(デフォルト)またはGPT 4のいずれかを選択して、応答の生成に使用されるモデルを構成します。GPT4を使用するには、APIに特別なアクセスを行う必要があります。アクセスできる場合は、 mf configを実行してGPT 4を選択できます。アクセスできない場合は、エラーメッセージが表示されます。
MindFlowのチャット機能を使用するには、複数のレベルがあります。
mf chat "explain what a programming language is"mf chat path/to/code.py "please summarize what this code does"mf chatコールで別の引数として任意の数のファイルを渡すことにより、ChatGPTにシングルまたはマルチファイルのコンテキストをCHATGPTに提供できます。十分に小さなファイル(ChatGptトークン制限を参照)については、これは機能し、チャット履歴も維持します。mf chat path/to/submodule1/ path/to/submodule2/ "what are these submodules responsible for?"mf index path/to/subdir/file1.txt path/to/file2.txtmf chat -s ./ "How do all of my classes relate to one another?"-sを通過すると、自動インデックスがスキップされ、代わりに現在既存のインデックスに延期されます。このインデックスは、それらのファイル/サブディルのみが含まれる最初のステップmf indexで生成されます。MindFlowを使用して、 mf genを使用してボイラープレートコードを即座に生成できます!コードとコメントのみを生成する必要があり、与えられたパスにファイルを保存します。
これがいくつかの例です:
mf gen setup.py "write me a setup.py file for my python package 'foobar'"mf gen main.py "write me a python script with a main if block that prints the first 10 fibonacci numbers"デフォルトでは、チャットの永続性を保持できるように、シンプルなチャットメッセージ(ファイルや非常に小さなファイルを参照したり、非常に小さなファイルを参照したり)がローカルに保存されます。
チャット履歴に関する統計を確認するには、 mf history statsを実行できます。
チャットの履歴をクリアしたい場合は、 mf history clearことができ、送信した以前のメッセージをすべて忘れます。
チャットメッセージにディレクトリを追加してみると、チャットの永続性が無効になり、以前のコンテキストは使用されません。これは、マインドフローが成熟するにつれて変化し、Openai APIはより多くのトークンレベル/会話の履歴をネイティブにサポートします。
注:git差の要約は、チャットの永続性をまだサポートしていません。
ステージング/コミットせずに、Git Repoにいくつかの変更を加えます。次に、 mf diffを実行します!次のように見える応答を取得する必要があります:
`mindflow/commands/diff.py` changes:
- Added import statement for `List` and `Tuple` from the `typing` module.
- Added a function `parse_git_diff` that takes in the output of a `git diff` command and returns a list of tuples containing the file name and the diff content.
- Added a function `batch_git_diffs` that takes in the list of tuples returned by `parse_git_diff` and batches them into smaller chunks of diffs that are less than 3000 characters long.
- Modified the `diff` function to use the new `parse_git_diff` and `batch_git_diffs` functions to batch the diffs and send them to the GPT model for processing.
`mindflow/commands/inspect.py` changes:
- Removed the `print` statement used to output the result of a database query. The git diff shows changes in two files: `mindflow/commands/diff.py` and `mindflow/commands/inspect.py`.
`mindflow/commands/diff.py` changes:
- Added import statement for `List` and `Tuple` from the `typing` module.
- Added a function `parse_git_diff` that takes in the output of a `git diff` command and returns a list of tuples containing the file name and the diff content.
- Added a function `batch_git_diffs` that takes in the list of tuples returned by `parse_git_diff` and batches them into smaller chunks of diffs that are less than 3000 characters long.
- Modified the `diff` function to use the new `parse_git_diff` and `batch_git_diffs` functions to batch the diffs and send them to the GPT model for processing.
`mindflow/commands/inspect.py` changes:
- Removed the `print` statement used to output the result of a database query.
Git Repoにいくつかの変更を加えて、それらをステージングします。次に、 mf commitを実行します!次のように見える応答を取得する必要があります:
[formatting 7770179] Add needs_push() function and check in run_pr() function.
1 file changed, 14 insertions(+)
ブランチとステージにいくつかの変更を加えてから、それらをコミットします。次に、Githubのmf prまたはGitLabのmf mrを実行します! GPTによって生成されたタイトルとボディを使用して、プルリクエスト/マージリクエストを作成する必要があり、PRへのリンクをコンソールに印刷する必要があります。



MindFlowは、再帰的な階層的な要約と埋め込み手法を使用して、ドキュメントの埋め込みを保存し、埋め込み手法を埋め込み、その後、埋め込み手法を埋め込んで、埋め込み手法を埋め込んで、埋め込み手法を実現するための、ドキュメントのハイスループットセグメンテーション、処理、保管、および検索のための最先端の方法を使用します。さらに、インデックス付きドキュメントを介したクエリや定期的なチャットのためにコンテキストに適合できる場合、チャット履歴は持続します。
将来、MindFlowは、最新の開発者のツールキットのさらに不可欠な部分になることを計画しています。従来のドキュメントを捨てる機能を追加し、代わりにプライベートドキュメントやコミュニケーションチャネルと直接統合し、よりシームレスで直感的な体験を可能にします。 MindFlowを使用すると、コード、ドキュメント、コミュニケーションチャネルを使用して真の「意識の流れ」を持つことができ、プロジェクトのトップにとどまり、チームと協力できるようになります。私たちは、言語モデルで可能なことの境界を押し広げ、開発者の仕組みに革命をもたらすことを続けていることを楽しみにしています。