현대 개발자를위한 Chatgpt 구동 스위스 군용 나이프! 우리는 AI 기반 CLI GIT 래퍼, 보일러 플레이트 코드 생성기, 코드 검색 엔진, 대화 기록 관리자 등을 제공합니다!

전제 조건 :
chat with documents 사용하려면 벡터 데이터베이스를 사용할 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를 선택하여 응답을 생성하는 데 사용되는 모델을 구성하십시오. GPT 4를 사용하려면 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 토큰 제한 참조), 이는 작동하고 채팅 기록을 유지합니다.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 DIFF 요약은 아직 채팅 지속성을 지원하지 않습니다.
준비/커밋없이 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 mr 의 mf pr 실행하십시오! 풀 요청/병합 요청은 GPT가 생성 한 제목과 본문으로 작성해야하며 PR에 대한 링크는 콘솔에 인쇄되어야합니다.



Mindflow는 문서 청크 용 벡터 임베딩 벡터를 저장하는 재귀 적 계층 적 요약 및 임베딩 기술을 사용하여 문서의 고 처리량 세분화, 처리, 스토리지 및 검색을위한 최첨단 방법을 사용합니다. 또한 채팅 기록은 색인화 된 문서를 통한 쿼리 또는 정기 채팅에 맞는 컨텍스트에 적합 할 수있는 경우 지속됩니다.
미래에 Mindflow는 현대 개발자의 툴킷에서 훨씬 더 중요한 부분이 될 계획입니다. 우리는 전통적인 문서를 버릴 수있는 기능을 추가하고 대신 개인 문서 및 커뮤니케이션 채널과 직접 통합하여보다 원활하고 직관적 인 경험을 제공 할 계획입니다. Mindflow를 사용하면 코드, 문서 및 커뮤니케이션 채널을 사용하여 진정한 "의식의 흐름"을 가질 수 있으므로 프로젝트를 최첨단으로 유지하고 팀과 협력 할 수 있습니다. 우리는 언어 모델로 가능한 것의 경계를 계속 추진하고 개발자의 작동 방식을 혁신하게되어 기쁩니다.