juliaturc commited on
Commit
4fb3e53
·
1 Parent(s): 6033d24

Rename index/chat commands to avoid clash with local utilities (#31)

Browse files
Files changed (3) hide show
  1. README.md +10 -9
  2. repo2vec/chat.py +1 -1
  3. setup.py +3 -3
README.md CHANGED
@@ -68,14 +68,14 @@ If you are planning on indexing GitHub issues in addition to the codebase, you w
68
  <summary><strong>:computer: Running locally</strong></summary>
69
  <p>To index the codebase:</p>
70
 
71
- index github-repo-name \ # e.g. Storia-AI/repo2vec
72
  --embedder-type=marqo \
73
  --vector-store-type=marqo \
74
  --index-name=your-index-name
75
 
76
  <p> To chat with your codebase:</p>
77
 
78
- chat github-repo-name \
79
  --vector-store-type=marqo \
80
  --index-name=your-index-name \
81
  --llm-provider=ollama \
@@ -86,14 +86,14 @@ If you are planning on indexing GitHub issues in addition to the codebase, you w
86
  <summary><strong>:cloud: Using external providers</strong></summary>
87
  <p>To index the codebase:</p>
88
 
89
- index github-repo-name \ # e.g. Storia-AI/repo2vec
90
  --embedder-type=openai \
91
  --vector-store-type=pinecone \
92
  --index-name=your-index-name
93
 
94
  <p> To chat with your codebase:</p>
95
 
96
- chat github-repo-name \
97
  --vector-store-type=pinecone \
98
  --index-name=your-index-name \
99
  --llm-provider=openai \
@@ -108,32 +108,32 @@ To get a public URL for your chat app, set `--share=true`.
108
  - To only index a whitelist of files:
109
 
110
  ```
111
- index ... --include=/path/to/extensions/file
112
  ```
113
 
114
  - To index all code except a blacklist of files:
115
 
116
  ```
117
- index ... --exclude=/path/to/extensions/file
118
  ```
119
 
120
  - **Index open GitHub issues** (remember to `export GITHUB_TOKEN=...`):
121
  - To index GitHub issues without comments:
122
 
123
  ```
124
- index ... --index-issues
125
  ```
126
 
127
  - To index GitHub issues with comments:
128
 
129
  ```
130
- index ... --index-issues --index-issue-comments
131
  ```
132
 
133
  - To index GitHub issues, but not the codebase:
134
 
135
  ```
136
- index ... --index-issues --no-index-repo
137
  ```
138
 
139
  # Why chat with a codebase?
@@ -152,6 +152,7 @@ Features:
152
 
153
  # Changelog
154
 
 
155
  - 2024-09-03: `repo2vec` is now available on pypi.
156
  - 2024-09-03: Support for indexing GitHub issues.
157
  - 2024-08-30: Support for running everything locally (Marqo for embeddings, Ollama for LLMs).
 
68
  <summary><strong>:computer: Running locally</strong></summary>
69
  <p>To index the codebase:</p>
70
 
71
+ r2v-index github-repo-name \ # e.g. Storia-AI/repo2vec
72
  --embedder-type=marqo \
73
  --vector-store-type=marqo \
74
  --index-name=your-index-name
75
 
76
  <p> To chat with your codebase:</p>
77
 
78
+ r2v-chat github-repo-name \
79
  --vector-store-type=marqo \
80
  --index-name=your-index-name \
81
  --llm-provider=ollama \
 
86
  <summary><strong>:cloud: Using external providers</strong></summary>
87
  <p>To index the codebase:</p>
88
 
89
+ r2v-index github-repo-name \ # e.g. Storia-AI/repo2vec
90
  --embedder-type=openai \
91
  --vector-store-type=pinecone \
92
  --index-name=your-index-name
93
 
94
  <p> To chat with your codebase:</p>
95
 
96
+ r2v-chat github-repo-name \
97
  --vector-store-type=pinecone \
98
  --index-name=your-index-name \
99
  --llm-provider=openai \
 
108
  - To only index a whitelist of files:
109
 
110
  ```
111
+ r2v-index ... --include=/path/to/extensions/file
112
  ```
113
 
114
  - To index all code except a blacklist of files:
115
 
116
  ```
117
+ r2v-index ... --exclude=/path/to/extensions/file
118
  ```
119
 
120
  - **Index open GitHub issues** (remember to `export GITHUB_TOKEN=...`):
121
  - To index GitHub issues without comments:
122
 
123
  ```
124
+ r2v-index ... --index-issues
125
  ```
126
 
127
  - To index GitHub issues with comments:
128
 
129
  ```
130
+ r2v-index ... --index-issues --index-issue-comments
131
  ```
132
 
133
  - To index GitHub issues, but not the codebase:
134
 
135
  ```
136
+ r2v-index ... --index-issues --no-index-repo
137
  ```
138
 
139
  # Why chat with a codebase?
 
152
 
153
  # Changelog
154
 
155
+ - 2024-09-06: Updated command names to `r2v-index` and `r2v-chat` to avoid clash with local utilities.
156
  - 2024-09-03: `repo2vec` is now available on pypi.
157
  - 2024-09-03: Support for indexing GitHub issues.
158
  - 2024-08-30: Support for running everything locally (Marqo for embeddings, Ollama for LLMs).
repo2vec/chat.py CHANGED
@@ -73,7 +73,7 @@ def main():
73
  parser.add_argument("--llm-provider", default="anthropic", choices=["openai", "anthropic", "ollama"])
74
  parser.add_argument(
75
  "--llm-model",
76
- help="The LLM name. Must be supported by the provider specified via --llm_provider.",
77
  )
78
  parser.add_argument("--vector-store-type", default="pinecone", choices=["pinecone", "marqo"])
79
  parser.add_argument("--index-name", required=True, help="Vector store index name")
 
73
  parser.add_argument("--llm-provider", default="anthropic", choices=["openai", "anthropic", "ollama"])
74
  parser.add_argument(
75
  "--llm-model",
76
+ help="The LLM name. Must be supported by the provider specified via --llm-provider.",
77
  )
78
  parser.add_argument("--vector-store-type", default="pinecone", choices=["pinecone", "marqo"])
79
  parser.add_argument("--index-name", required=True, help="Vector store index name")
setup.py CHANGED
@@ -6,7 +6,7 @@ def readfile(filename):
6
 
7
  setup(
8
  name="repo2vec",
9
- version="0.1.5",
10
  packages=find_packages(),
11
  include_package_data=True,
12
  package_data={
@@ -15,8 +15,8 @@ setup(
15
  install_requires=open("requirements.txt").readlines() + ["setuptools"],
16
  entry_points={
17
  "console_scripts": [
18
- "index=repo2vec.index:main",
19
- "chat=repo2vec.chat:main",
20
  ],
21
  },
22
  author="Julia Turc & Mihail Eric / Storia AI",
 
6
 
7
  setup(
8
  name="repo2vec",
9
+ version="0.1.6",
10
  packages=find_packages(),
11
  include_package_data=True,
12
  package_data={
 
15
  install_requires=open("requirements.txt").readlines() + ["setuptools"],
16
  entry_points={
17
  "console_scripts": [
18
+ "r2v-index=repo2vec.index:main",
19
+ "r2v-chat=repo2vec.chat:main",
20
  ],
21
  },
22
  author="Julia Turc & Mihail Eric / Storia AI",