Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
02d923e
Git docs structured data
YashJain14 Jun 18, 2024
9188707
(add) scrapper.md
YashJain14 Jun 18, 2024
64c3fbd
Merge branch 'web-slate:main' into main
YashJain14 Jun 18, 2024
7649e67
GitAI LLM
YashJain14 Jun 20, 2024
6c80d49
Merge branch 'web-slate:main' into main
YashJain14 Jun 20, 2024
9bb5c85
Update agents.md
YashJain14 Jun 20, 2024
3b366db
Merge branch 'web-slate:main' into main
YashJain14 Jun 20, 2024
d6aa27e
stackoverflow scrapping scripts
YashJain14 Jun 27, 2024
4951649
Merge remote-tracking branch 'refs/remotes/origin/main'
YashJain14 Jun 27, 2024
c159ccd
add github tagged QnA form stackoverflow
YashJain14 Jun 27, 2024
7b34fe4
Merge branch 'web-slate:main' into main
YashJain14 Jun 27, 2024
a7ee194
Merge branch 'web-slate:main' into main
YashJain14 Jul 1, 2024
bfc1546
GitQA RAG
YashJain14 Jul 1, 2024
cea30b3
Merge remote-tracking branch 'refs/remotes/origin/main'
YashJain14 Jul 1, 2024
6d6229a
Delete GitAI_LLM/GitQA_RAG/chroma_db/30cdeae3-424b-45b8-b9fe-7281c237…
YashJain14 Jul 1, 2024
23a83e3
Delete GitAI_LLM/GitQA_RAG/tran.py
YashJain14 Jul 1, 2024
7022e37
Create requirements.txt
YashJain14 Jul 2, 2024
c7df0e6
Function Calling Agent
YashJain14 Jul 3, 2024
679e706
Merge remote-tracking branch 'refs/remotes/origin/main'
YashJain14 Jul 3, 2024
b0c2fee
Merge branch 'web-slate:main' into main
YashJain14 Jul 3, 2024
07b4a61
agent
YashJain14 Jul 18, 2024
6453b48
organized repo
YashJain14 Jul 18, 2024
6256504
HF link to fine tuned models
YashJain14 Jul 18, 2024
e7a15dc
hf link
YashJain14 Jul 18, 2024
af46084
rename RAEDME.md to README.md
YashJain14 Jul 18, 2024
b424ae9
adding contribution instructions
YashJain14 Sep 2, 2024
e51b16e
Merge branch 'web-slate:main' into main
YashJain14 Sep 2, 2024
399153e
updated comntributing steps
YashJain14 Sep 4, 2024
99f7cde
Merge remote-tracking branch 'refs/remotes/origin/main'
YashJain14 Sep 4, 2024
0d096c4
delete function calling part
YashJain14 Sep 4, 2024
2c5a125
Update Keys
YashJain14 Sep 4, 2024
c28a11e
Commit changes before pull with rebase
YashJain14 Sep 4, 2024
fb37747
updated code
YashJain14 Sep 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 49 additions & 12 deletions CommandRetrieval/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

# Git Commands Retrieval System

This appraoch implements a retrieval system for commonly used Git commands using vector embeddings and similarity search. It consists of two main components: a vector store creation script and a query interface.
This approach implements a retrieval system for commonly used Git commands using vector embeddings and similarity search. It consists of two main components: a vector store creation script and a query interface.

## Components

Expand All @@ -12,8 +11,7 @@ This script creates a vector store from a JSON file containing Git commands.
#### Features:
- Loads Git commands from a JSON file
- Uses HuggingFace embeddings (all-MiniLM-L6-v2 model) - Sentence Transformers
- Creates a persistent a Chroma vector store

- Creates a persistent Chroma vector store

### 2. Git Commands Search

Expand All @@ -31,15 +29,11 @@ This script provides an interactive interface to query Git commands.
```
pip install langchain langchain_community langchain_huggingface chromadb sentence_transformers
```

2. Prepare your Git commands data in a JSON file named `GitCommands.json` in the `CommandRetrieval` directory.

3. Run `VectorStore.py` to create the vector store:

```
python VectorStore.py
```

4. Use `GitCommands.py` to query Git commands:
```
python GitCommands.py
Expand All @@ -64,23 +58,66 @@ The `GitCommands.json` file should contain an array of objects with the followin
"param_description": "The ID or reference of the second commit."
}
]
}
},
...
]
```

## How It Works

1. `VectorStore.py` loads the Git commands from the JSON file, creates embeddings for each command, and stores them in a Chroma vector store.

2. `GitCommands.py` loads the pre-created vector store and waits for user input.

3. When a user enters a query, the script performs a similarity search to find the most relevant Git commands.

4. The retrieved commands are displayed with their descriptions and parameters.

## Customization

- To use a different embedding model, modify the `model_name` parameter in the `HuggingFaceEmbeddings` initialization.
- Adjust the number of results returned by modifying the `k` parameter in the similarity search.

## Contributing

We welcome contributions to improve and expand the Git Commands Retrieval System. Here are some ways you can contribute:

### Enhancing the JSON Data

1. Open the `GitCommands.json` file in the `CommandRetrieval` directory.
2. Add new Git commands or improve existing ones following the established format:
```json
{
"command": "git command",
"description": "Detailed description of the command.",
"parameters": [
{
"param": "parameter_name",
"param_description": "Description of the parameter."
}
]
}
```
3. Ensure the JSON is valid after your changes.
4. Submit a pull request with your updates.

### Improving the Code

1. Fork the repository and create a new branch for your changes.
2. Make your improvements to either `VectorStore.py` or `GitCommands.py`.
3. Test your changes thoroughly.
4. Submit a pull request with a clear description of your improvements.

### Adding New Features

1. Open an issue to discuss the new feature you'd like to add.
2. Once approved, implement the feature in a new branch.
3. Update the README to reflect the new functionality.
4. Submit a pull request with your changes.

### Reporting Issues

If you encounter any bugs or have suggestions for improvements:

1. Check if the issue already exists in the project's issue tracker.
2. If not, create a new issue with a clear title and description.
3. Include steps to reproduce the problem and any relevant error messages.

By contributing, you help make this Git Commands Retrieval System more comprehensive and useful for everyone. Thank you for your support!
3 changes: 3 additions & 0 deletions GitAIAgent/GitAIAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
# "YashJain/GitAI-Qwen2-0.5B-Instruct-MLX-v1"
# )


#####

llm=ChatOpenAI(temperature=0,model="gpt-3.5-turbo")

shell_tool=ShellTool()
Expand Down
26 changes: 22 additions & 4 deletions GitAIAgent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ GitAI Agent is an AI-powered assistant that can execute Git commands through nat
- OpenAI API key
- Git installed and configured on your system

## SetUp
Install Dependencies
## Setup
1. Install Dependencies
```
pip install langchain openai
```

Set up your OpenAI API key:
2. Set up your OpenAI API key:
```
export OPENAI_API_KEY=your_api_key_here
```
Expand All @@ -27,7 +27,25 @@ Set up your OpenAI API key:
Run the GitAI agent script:

```
python GitAI.py
python GitAIAgent.py
```

The agent will prompt you for a Git-related task. Enter your request in natural language, and the agent will interpret and execute the appropriate Git commands.

## Contributing

We welcome contributions to improve and expand the GitAI Agent. Here are some ways you can contribute:

### Enhancing Security with Guardrails

One of the key areas for contribution is implementing and improving guardrails for the shell tool. This involves adding safety checks and input validation to ensure that only safe Git commands are executed. Contributors are encouraged to think about potential security risks and propose solutions.

### Other Contribution Areas

- Enhancing the agent's capabilities to handle more complex Git scenarios
- Improving error handling and user feedback
- Expanding the documentation with more examples and use cases
- Adding comprehensive test coverage
- Reporting issues and suggesting improvements

When contributing, please ensure that your changes align with the project's goals of maintaining a balance between functionality and security.
Loading