Skip to content

Commit a38aeed

Browse files
committed
docs - add more instructions regarding the configuration file / update steps in README
1 parent 2feee49 commit a38aeed

File tree

2 files changed

+42
-12
lines changed

2 files changed

+42
-12
lines changed

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ further explore the starred repositories.
2020

2121
This project/tool uses semantic search and an AI agent as an attempt to solve the above problems.
2222

23-
## Architecture & Implementation Details
24-
25-
[TBD]
26-
2723
## Install (User)
2824

2925
Read below to install `uv`. You haven't done it yet? Come on guys!!
@@ -47,27 +43,47 @@ You should make a copy of it and perhaps call it `rsg-config.toml` (The name of
4743

4844
### Step 1 - Obtain the Github Personal Access Token
4945

50-
[TBD]
46+
This tool fetches your starred github repositories. In order to access to them without incurring rate limits
47+
it is required to use the Github Personal Access Token.
48+
49+
Read this to learn how to obtain it -
50+
51+
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
5152

5253
### Step 2 - Edit the `rsg-config.toml`
5354

5455
- You should provide the Github PAT obtained in Step 1
5556
- You should fill the `[embedder]` section (Supported provider types are - ollama, openai, azure_openai)
5657
- You should fill the `[agent.litellm_params]` section
5758

58-
[TBD] - Don't think above instructions are enough! To update and explain in detail the settings
59+
In `rsg-config.example.toml`, I have added necessary comments to help fill out various configuration.
5960

6061
### Step 3 - Build the database
6162

63+
The real work starts with this step.
64+
65+
At the moment, I use naive RAG technique.
66+
67+
- Information about your starred github repos are downloaded using the GitHub API
68+
- Then the `readme` files of these repos are downloaded. Note - Some repos, do not have `readme` file.
69+
- Then these `readme` files are chunked and their embeddings are stored in a vector store
70+
71+
The data above (including vectorstore) is stored in your computers data directories for example `$HOME/.local/share/rsg`
72+
on macos and linux.
73+
74+
You can change the location of the data by setting the environment variable `RSG_DATA_HOME`
75+
6276
```bash
6377
uvx --from repo-stargazer rsg build --config rsg-config.toml
6478
```
6579

6680
### Step 4 - Run the agent using adk web & ui
6781

68-
The agent is built using Google ADK and I have done somewhat of a hack to be able run the agent
69-
by the built-in fastapi server & user interface. The server & user interface is meant for development needs but
70-
for now it is the only UI there is
82+
Let's see all of it in action.
83+
84+
For the user interface, I am still using the development UI that comes as part of Google ADK.
85+
86+
In near future, would provide a decent UI with out any developer specific elements.
7187

7288
```bash
7389
uvx --from repo-stargazer rsg run-adk-server --config rsg-config.toml

rsg-config.example.toml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
1+
# Read https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
2+
# to learn how to get the GitHub Personal Access Token
13
github_pat = ""
24

3-
45
[embedder]
5-
provider_type = "ollama"
6+
# possible values for provider_type are - ollama, azure_openai, openai
7+
provider_type = "ollama"
68
model_name = "mxbai-embed-large:latest"
79
api_endpoint = "http://host.docker.internal:11434"
10+
11+
# depending on the provider_type you may have to supply other fields
12+
# they are
13+
# api_key <- required by azure_openai and openai
14+
# api_version <- required by azure_openai
15+
# api_deployment <- required by azure_openai
16+
817
chunk_size = 1000
918
chunk_overlap = 120
1019

1120
[agent.litellm_params]
21+
# you can consult LiteLLM documentation to learn
22+
# about how to specify the models
23+
# generally it is "provider"/"model"
1224
model = "azure/gpt-4o"
1325

1426
[agent.litellm_params.provider_config]
27+
# you should provide the necessary fields as per LiteLLM
28+
# documentation for the model provided above
1529
api_key = ""
1630
api_base = ""
17-
api_version = "2024-10-01-preview"
31+
api_version = ""
1832

0 commit comments

Comments
 (0)