Git LLM Troubleshoot is a package designed to help users troubleshoot and resolve common Git mistakes. Users can describe their Git-related issues in plain text, and the package will use llmatch-messages to provide structured, step-by-step solutions. The system guides users through fixing errors, understanding Git commands, and recovering from accidental changes, ensuring they can confidently manage their version control workflows.
- Plain Text Input: Describe your Git-related issues in plain text.
- Structured Solutions: Receive step-by-step solutions tailored to your specific problem.
- Flexible LLM Integration: Use the default
ChatLLM7fromlangchain_llm7or integrate with other LLMs like OpenAI, Anthropic, or Google.
You can install the package using pip:
pip install git_llm_troubleshootHere is an example of how to use the git_llm_troubleshoot function:
from git_llm_troubleshoot import git_llm_troubleshoot
# Example usage with default LLM
response = git_llm_troubleshoot(user_input="I accidentally deleted my branch.")
print(response)user_input(str): The user input text to process.llm(Optional[BaseChatModel]): The LangChain LLM instance to use. If not provided, the defaultChatLLM7will be used.api_key(Optional[str]): The API key for LLM7. If not provided, theLLM7_API_KEYenvironment variable will be used.
You can use other LLMs by passing your own LLM instance to the git_llm_troubleshoot function.
from langchain_openai import ChatOpenAI
from git_llm_troubleshoot import git_llm_troubleshoot
llm = ChatOpenAI()
response = git_llm_troubleshoot(user_input="I accidentally deleted my branch.", llm=llm)
print(response)from langchain_anthropic import ChatAnthropic
from git_llm_troubleshoot import git_llm_troubleshoot
llm = ChatAnthropic()
response = git_llm_troubleshoot(user_input="I accidentally deleted my branch.", llm=llm)
print(response)from langchain_google_genai import ChatGoogleGenerativeAI
from git_llm_troubleshoot import git_llm_troubleshoot
llm = ChatGoogleGenerativeAI()
response = git_llm_troubleshoot(user_input="I accidentally deleted my branch.", llm=llm)
print(response)By default, the package uses ChatLLM7 from langchain_llm7 with its default free tier rate limits, which are generally sufficient for most use cases. If you require higher rate limits for ChatLLM7, you can obtain a free API key by registering at https://token.llm7.io/. You can then provide this API key either by setting the LLM7_API_KEY environment variable or by passing it directly to the git_llm_troubleshoot function using the api_key parameter.
Please report any issues or feature requests on the GitHub issues page: https://github.com/chigwell/git-llm-troubleshoot/issues.
- Eugene Evstafev - hi@eugene.plus
- GitHub Nickname: chigwell
This project is licensed under the MIT License.